UrFaCT
Your Fantasy Cricket Team
Fantasy cricket has constraints — pick exactly N batsmen, M bowlers, limited overseas players, a budget cap. Every day millions of users pick teams by gut feel. I saw what it actually was: a classic constrained optimization problem.
If I could predict the expected fantasy points of each player for a given match (using historical performance, venue stats, opposition analysis), I could then optimize the team composition to maximize total expected points within the constraints.
I built the entire pipeline — scraped ball-by-ball data from 2016–2021, computed player-level fantasy point breakdowns (batting, bowling, fielding), clustered players by play style (Aggressive / Balanced / Conservative), and ran venue-specific analysis. The product went live during IPL 2021 and was tested by ~50 users.
Result: Teams built through UrFaCT won 70% of the fantasy contests they entered.
Below is an interactive recreation of the team comparison tool — with real IPL 2021 data.
Team Comparison — IPL 2021 Data
Batsmen
| Player | Avg FP | Cr |
|---|
Bowlers
| Player | Avg FP | Cr |
|---|
All-Rounders
| Player | Avg FP | Cr |
|---|
Batsmen
| Player | Avg FP | Cr |
|---|
Bowlers
| Player | Avg FP | Cr |
|---|
All-Rounders
| Player | Avg FP | Cr |
|---|
Data from IPL 2021 season (first 4 matches per team) · Avg FP = Average Fantasy Points per match
The Data Pipeline
Data Collection
Ball-by-ball match data scraped from cricket APIs for IPL seasons 2016–2021. Match scorecards, batting/bowling cards, catches, runouts, stumpings.
Fantasy Point Computation
Calculated fantasy points per player per match using Dream11's scoring rules. Decomposed into batting, bowling, fielding, and bonus components.
Player Clustering
K-means clustering to classify batsmen as Aggressive / Balanced / Conservative. Same for bowlers (Aggressive / Moderate / Expensive). Used for venue-fit analysis.
Venue Intelligence
Analyzed 5 years of venue data: avg first/second innings scores, boundary percentages, pace vs spin wicket ratios. Matched player style to venue profile.
Optimization
Given predicted points and Dream11 constraints (budget, role limits, overseas cap), find the team composition that maximizes expected total points.