Final-year project · Web development, data & machine learning
Pitch Rivals
A multiplayer football game inspired by Fantasy leagues where you select cards of players using performance predictions and compete on the results of real matches.
My contribution
I built the complete project: data processing, predictive models, game rules, API, web interface, automated opponent and deployment.

- Final-year project · 9.4/10
- 18 accepted predictive targets
- 75 backend tests
How a matchweek works
Create a league or join with a code. Each matchweek you compete with other participants and the Scavenger, an automated opponent that uses your discarded cards. Everything uses Scouting Points (SP), a virtual currency with no real money involved.
Pick 3 of 5 cards
Each card pairs a footballer with a target, such as scoring a goal. Compare probability and reward, optionally spend SP to reroll the market, then lock three cards. The other two enter the league’s discard pool.
Face the Scavenger
When the draft closes, the automated opponent selects discarded cards by expected value. You can spend SP to take a virtual position against one of its predictions coming true: a short.
Real matches take place
Decisions lock when the matchweek goes live. Outcomes depend on the footballers’ actual performance, not a match simulation.
Review results and standings
Real match statistics are then imported, targets and shorts are settled, and balances and the league leaderboard are updated.

Evaluating models without future information
I built an ETL pipeline using LaLiga data from the 2020/21 to 2024/25 seasons and created historical and recent-form features. Statistics are shifted over time so each prediction only uses information available before the match.
I trained XGBoost models and tuned their parameters with Optuna. Evaluation used a temporal holdout of 1,431 records, separate from training. Eighteen of the nineteen binary targets exceeded the 0.65 AUC threshold; the yellow-card target was rejected.
I also compared isotonic and sigmoid calibration. Since they did not improve results overall, I retained the models’ original probabilities.

Rules, interfaces and consistent results
- FastAPI backend and PostgreSQL storage with data models and database migrations.
- React and TypeScript interfaces for leagues, drafting, matchups, results and the leaderboard.
- 'The Scavenger' automated opponent, selection changes and risk-based mechanics using virtual economy.
- Settlement from actual match statistics and 75 backend tests documented in the thesis.

What this project demonstrates
This is my most comprehensive individual project: preparing data, evaluating models, deciding how to explain them on screen and turning them into game rules. The thesis received a grade of 9.4/10.
The January–July period includes research, development, the written thesis and its defence. The repository history mainly covers implementation.
See the project in action
3:03What the video shows
The recording covers leagues, player and target selection, matchups, results and the leaderboard. Predicted probabilities inform risk and Scouting Points (virtual currency) rewards; actual match statistics settle the targets.
Source code and documentation available.