The problem
GafferScore players predict the score of every Premier League match each week. The Gaffer is an AI agent inside the game that does the homework: every week it analyses each club and gives the likeliest scorelines and results, so players can see what the numbers say before they lock in.
What I built
I built the engine behind the Gaffer, gaffer-engine, a weekly Python pipeline:
- Fetch the fixtures and scrape recent match data for every club.
- Rate every club on attack and defence.
- Adjust for lineups, so a missing key player moves the numbers.
- Predict. A Poisson model turns expected goals into a probability for every scoreline, and a CatBoost model adds to it.
- Write the predictions and the analysis to the game’s database, where players see them in the Gaffer view.
- Match data fixtures and recent results
- Club ratings attack and defence, lineup adjustments
- Poisson + CatBoost scoreline and result probabilities
- Analysis written for each fixture
- GafferScore players see it before predicting
Key decisions
- A Poisson model as the base. Football scores are low and fairly independent counts, which a Poisson model handles well. It gives a probability for every exact scoreline, which is what players are predicting.
- Lineups matter. Ratings built only from past results miss the team that actually takes the pitch, so the engine adjusts for lineups before predicting.
- It runs on a schedule. The pipeline runs on its own every week, so the Gaffer is always ready before the gameweek deadline.
Results
- Runs weekly, and its insights go to players inside GafferScore.
- Gameweek 9 record: a 37.5% top-3 hit rate across 8 finished matches.
- Code: gaffer-engine on GitHub.




