'RCB to win IPL 2021' - A Reddit user simulates the remaining season through a Python script

A Reddit user, Adish Jain, decided to program the remainder of the tournament by running a simulation program.

Royal Challengers Bangalore
Royal Challengers Bangalore. (Photo Source: IPL/BCCI)

View : 37.5K

4 Min Read

Get every cricket updates! Follow us on

The 14th edition of the Indian Premier League had to be postponed indefinitely after Covid-19 managed to break inside the strictest of bio-bubbles and Covid cases were reported across different camps in different cities.

While questions were being raised already on the conduction of the league in such testing times, the BCCI had clarified its stance to let things go as per plans until any mishap was not reported. Although once a case inside the bubble was reported, the cancellation clouds grew thicker and eventually, the tournament had to postponed indefinitely in a unanimous decision taken by the BCCI and the IPL Governing Council.

Amidst a host of speculations for windows for completing the curtailed event, which is paused at game number 29, a Reddit user, Adish Jain, decided to program the remainder of the tournament by running a simulation program based on Python to identify the winner of the tournament.

How does the simulation work?

“I made a Python program to simulate an entire season of the IPL (excluding the playoffs) using past data, predictive analysis, and randomization techniques. I mainly wanted to share this because there are some really interesting scenarios in the scorecards or some epic batting collapses, also I think RCB fans will like this one,” he wrote on Redditt, informing about his rather interesting initiative.

Jain explained in the post that he used ball-by-ball data of the last 5 years of the IPL, created a unique identification for every player and stored that data of each ball they played, the pattern of runs scored such as singles, doubles, fours or sixes etc., against the type of bowlers those runs were scored, their mode of dismissals, and even the similarity for the bowlers.

He explains that the model of simulation is not based on machine learning, but it uses statistics to “make the decisions for the batsman” and “uses a randomizer to determine the outcome.”

Jain also mentioned the shortcomings and limitations of his analysis as there were no no-balls or byes. He mentioned that the rotation of bowlers in the simulation is “such that a player with three overs and an economy of 9 is picked over a player with one over and an economy of just 3” and there are no Super Overs, which means a tied will remain a tie.

How did the things stand at the end of the league phase?

As per his simulation, the standings are:

Team Match Won Lost NRR Points
RCB 14 11 3 0.424 22
DC 14 10 4 0.566 20
CSK 14 8 6 0.896 16
PBKS 14 7 7 -0.095 14
MI 14 7 7 -0.175 14
SRH 14 5 9 -0.544 10
RR 14 4 10 -0.418 8
KKR 14 4 10 -0.658 8

What happened in the Playoffs?

Qualifier 1: DC vs RCB

As per the simulator’s result, RCB defeats DC in the first Qualifier after posting 188/6 on the back of Virat Kohli’s 33-ball 66 and Devdutt Padikkal’s 42-ball 63. Although Prithvi Shaw and Marcus Stoinis hit quick-fire cameos: 41 from 42 and 45 from 30 respectively, RCB manages to restrict DC seven short of the target to proceed to the final.

Eliminator: CSK vs PBKS

In the Eliminator clash between CSK and PBKS, a 66-ball 113 from Faf du Plessis and a 34-ball 46 from Ambati Rayudu pushes CSK to 198 in their 20 overs. Out to chase, Chris Gayle (51 from 28), Mayank Agarwal (43 from 40) and a late cameo of 27 from 16 from Nicholas Pooran leads them to a five-wicket victory.

Qualifier 2: PBKS vs DC

A dominating 104 off just 55 from Rishabh Pant takes DC to 182 in the second Qualifier against PBKS. An inspirational bowling performance means that the Capitals manage to restrict Kings by a convincing margin of 41 runs even as Nicholas Pooran fights out with a belligerent half-century.

Final: DC vs RCB

After winning the toss, DC inserts RCB to bat, who set 200 for them to win with both Kohli and Padikkal giving a strong start before Glenn Maxwell blasts off to compensate for AB de Villiers’ golden duck. During the chase, Maxwell removes both Shikhar Dhawan and Rishabh Pant to take RCB to a 50-run victory and their maiden IPL title.

PS: Each match has its own ball by ball log and a scorecard. You can view it here.