gaffer
An advisor-only Fantasy Premier League tool. Every week it downloads the public FPL data, predicts every player's points with a set of machine-learned models, plans your transfers several gameweeks ahead with a mathematical optimizer, and tells you what to do — in the terminal, in an HTML report and in a local web app.
What it never does
It never logs into FPL and it never makes a transfer. It reads public FPL endpoints only. You apply its advice yourself, in the official app.
The models
Points are predicted by parts rather than in one go. Six LightGBM component models each predict one piece of a player's score, and the pieces are assembled into expected points with FPL's own scoring table:
- Minutes — did not play, came off the bench, or started: the chance of playing and of a 60-minute appearance.
- Attacking — goal and assist rates, blended with Understat xG history.
- Team — a Dixon-Coles goals model per fixture for clean sheets and goals conceded, optionally blended with bookmaker odds at a fitted weight.
- Defcon — the chance a player clears the defensive-contribution threshold.
- Saves and Bonus — goalkeeper save points, and bonus through the BPS system.
A final calibration layer corrects the level bias in the assembled numbers. Every number carries its uncertainty too: a range of what a player might actually score, from football's own variance plus the model's error. The bands are wide, and the project treats that width as the finding, not a bug. Penalties and set pieces are priced explicitly, from who actually took each penalty.
Then an injury and news pass adjusts each player's chance of playing, from injury tables, two predicted-line-up sources and the official flag. Applied last is your own pin, because you watched the press conference and the model did not.
The planner
The squad is planned by a multi-period mixed-integer program (PuLP for the modelling, HiGHS to solve, CBC as the fallback): transfers, captain, vice, bench order and chips together, over a receding horizon. It plans several weeks ahead, you play only the first, and next week it plans again.
- Transfers priced across the horizon. A dynamic program values holding a free transfer, so taking a points hit now competes fairly with banking the transfer.
- Chip timing as optimal stopping. A chip plays when this week's gain clears the bar of what waiting could still buy. On a replayed season it was the biggest measured win in the project's history.
- A scenario sweep. The board is re-solved many times under calibrated noise, and a move that wins in only a handful of those solves is dropped as noise-chasing.
- Restraint. A transfer ladder prices every level of appetite, from banking up to three hits, on one shared set of simulated outcomes. The advice steps up a rung only when the higher one wins often enough, and says which step it refused and why. On the replayed 2024-25 season it finished nine points behind the unrestrained planner, well inside the spread between seeds, for a third of the hits.
- A real bench. Bench order, the reserve keeper and the vice-captain are priced by each player's actual chance of appearing rather than population averages.
- A league tilt. With a mini-league set, the planner leans towards differentials when you are chasing and towards covering rivals when you are defending. Reported expected points stay the raw model numbers.
The honesty rails
Honesty over polish is the first of the project's design principles. A number the tool cannot back up is not shown: missing data reads as a dash, never as zero; an empty state says why it is empty; a probability carries its sample size or its error bar where one exists. Every layer degrades gracefully and says so, rather than blocking or guessing.
- Degradation rails. A large share of the Python test suite pins the honesty rules and the counts a later change must not move silently. A rail that fails tells you which rule the edit crossed, and its message names the file that owns it; the rule is never to edit a rail to make it pass.
- A golden board. One recorded gameweek is replayed through the whole weekly solve and compared byte for byte with committed files, so a refactor that says "no diff" has shown something.
- Docs held to the code. Tests fail when the guide or the README leaves out a command, an API route, a module or a scheduled job, names a file that does not exist, or quotes a pin that disagrees with the rail that holds it. Others fail when a module opens without a docstring, when a click in the web app has no keyboard path, or when CI leaves out a gate the project names.
- Gates before shipping. Every feature faces a pre-registered bar on held-out data or a season replay, with season claims made over several seeds and the spread quoted. Features that failed were withdrawn and recorded, not shipped hopefully. The current model cycle, opened on 7 October 2026, works the same way: its first test kept the model as it was, because the measured difference sat inside twice the standard error over five seeds, and most of its other changes are already in the code, switched off by default, waiting on season replays and readings that have not run yet.
- A decision ledger grades the tool, not just the model — transfers, captaincy, bench and chips — with the rule that a week you agreed with the model is evidence of nothing.
- A checked brief. The week's advice is also written up as prose by a language model, and checked mechanically so every number and every name in it is in the facts it was given.
The web app
The same advice is served as a local web app in six hubs — This Week, Planning, Players, League, Live and Model — reading the same files the command line writes, so the terminal, the report and the app can never disagree. Under the week's brief, a question box answers your own questions from the same facts and under the same truth check, and the answers are never saved. In the League hub, the Field panel prices your week against 300 synthetic managers drawn from the sampled top-10k ownership, and states its limits beside the number. It also gives the chance that your total after this week reaches the projected total for 10,000th place, taken from the daily reading at that rank plus its average weekly rise; until two gameweeks are banked, and once the week is under way, it says why it has no number. It is drawn in one design language: hairline rules rather than cards, tabular figures, and colour spent only where it means something. Pages render in dark and light, and at phone width.