Obaseki
Resume
AI agents

GafferScore AI agent

Analyses every Premier League club each week and gives the likeliest scorelines and results.

Runs weekly. Its insights go to players inside GafferScore.

Stack
PythonCatBoostPoisson model

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:

  1. Fetch the fixtures and scrape recent match data for every club.
  2. Rate every club on attack and defence.
  3. Adjust for lineups, so a missing key player moves the numbers.
  4. Predict. A Poisson model turns expected goals into a probability for every scoreline, and a CatBoost model adds to it.
  5. Write the predictions and the analysis to the game’s database, where players see them in the Gaffer view.
  1. Match data fixtures and recent results
  2. Club ratings attack and defence, lineup adjustments
  3. Poisson + CatBoost scoreline and result probabilities
  4. Analysis written for each fixture
  5. GafferScore players see it before predicting
Parts I built

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