Sleeper Agent
A draft tool that keeps my fantasy football autopick list in the right order.
Python
Next.js
React
TypeScript
Cloudflare Workers
Cloudflare KV
Last season I finished 12th of 13 in my FPL Draft league. The champion literally let autopick make all fifteen of his picks. In FPL Draft, friends take turns picking real Premier League players, and once someone picks a player, nobody else can have him. If your clock runs out, the site's autopick just takes the highest available player on your watchlist.
Turns out the watchlist matters more than picking live. Sleeper Agent puts the right players on my watchlist in the right order, and keeps re-sorting it while everyone else picks.
That's the war room running a practice draft against bots from seat 9 of 12, with made-up team names. Every time a bot picks, the list updates for who's still available and how likely each player is to still be there on my next turn.
Grading my last draft
Before writing any code, I graded my own draft from last season. I compared every pick against the average pick of its round, using the points the player actually scored.
I took four midfielders in the first four rounds and didn't take a defender until round 8, even though mid-round defenders were the best value in the whole draft. My first ten picks finished way behind their rounds. The last five, made by autopick, finished well ahead.
So the job was just to give autopick a better list. The draft order snakes from first to last and back again, so from seat 9 the waits between my picks alternate between short and long. Every decision basically comes down to betting on who survives the next wait.
Valuing each player
Everything starts with one number per player, his projected points for the season. The model builds that from last season, and the biggest thing is figuring out which parts actually repeat. Appearances repeat, while finishing mostly doesn't, so the model swaps most of a player's goal and assist points for what his chances were worth using xG and xA from Understat.
Harry Wilson is the clearest case. About 30 of his points last season came from finishing above his chances. My board ranks him 89th, while the public drafts I collected were still taking him around pick 46.
Minutes come from a model over six seasons of real data that checks how much similar players played the next year. Regulars lose more minutes than you'd think, and my first hand-tuned guess was way too kind to them.
Projected points still aren't draft value. A 160-point defender and a 160-point midfielder are pretty different picks, because the midfielder you can get later for free is much better than the defender you can get later for free. So the board ranks everyone by value over replacement, which is a player's points minus those of the best player at his position that nobody needs.
Bruno Fernandes projects about 20 points more than Haaland. After replacement, they're almost level, since a free forward is much worse than a free midfielder.
The last number is the sleeper score, which shows how far the model's value sits above what the market pays.

Tyrick Mitchell is the textbook sleeper. Managers usually took him around pick 146. On draft night, autopick took him for me at pick 81.
Looking one pick ahead
Knowing who's best isn't enough to decide who to pick now, because the best player might still be there next turn while the second best won't.
The official ranks don't tell you when players actually get drafted. So a crawler collected about 15,000 complete public drafts to build a curve for each player showing the chance he's gone by any pick. From that curve, I get the chance he lasts from now until my next turn.1
At pick 9 on draft morning, Gabriel had a 20% chance of lasting to my next pick at 16. Virgil had 92%.
The score that orders the list looks one step ahead. A player's score is his value now plus the expected value of the best player I can still get next time if I take him.
Virgil has the higher value. Gabriel has the higher score, because taking Gabriel almost always leaves Virgil for later, while taking Virgil rarely leaves Gabriel.2 On draft night, autopick took Gabriel for me at 9, and Virgil was still there at 16.
How other managers draft
The practice bots needed to act like real people with real rosters, so I fit an opponent model on the same public drafts. For each pick, it predicts which position a manager takes and then how far down the board the pick lands. Managers ignore a missing position for most of the draft, then everyone fills it at once. A manager with no keeper takes one about a quarter of the time in round 10, and every single time in round 14.
Humans and autopick act nothing alike. In the early rounds, autopick takes the top-ranked legal player most of the time, while humans in the middle rounds almost never do. That gap is the whole reason a well-ordered watchlist is worth building.
Backtesting the board
My first simulator said all the clever parts worked. The problem was it scored squads with my own projections, and a model that grades itself mostly agrees with itself.
So the backtest rebuilds an August 2025 board using only the data that existed then. It runs hundreds of drafts against bots that draft like real managers, then scores each squad by what its players actually scored that season.
A random seat finishes 7th on average. Roster-aware value, which priced each pick by what it added to my likely lineup, was the first simulator's favorite. In the backtest it was the worst, so I deleted it. The lookahead stayed.
After that, every new idea had to improve the finish on seasons it wasn't fit on. The biggest rejection was a late-season minutes trend. It had the best training numbers of anything, and in the replays it cut the title rate by more than half. Turns out the minutes model and the market had already priced in the role change, so the trend just counted it twice.
Draft night
Since the site's autopick acts on the watchlist by itself, keeping it sorted to my board basically turns autopick into my agent. A crash or a dropped connection can't cause a missed pick. The worst case is autopick using the last list.
So the draft guard reads the draft every few seconds. When something changes, it scores the top legal players, keeps only positions that still leave a legal squad, and sends the whole ordered list to my watchlist in one request.
That's the real list between my first two picks. Szoboszlai went at 10 and Guéhi at 15, and Virgil stayed first the whole time.
When the list started stacking a third and fourth defender, I added a penalty mid-draft, and the guard picked it up on restart. Autopick made 13 of my 15 picks from that list. By round 10, it had taken five defenders. Last season, my first defender came in round 8.
Managing the season
A draft is only one night, and a season has 38 deadlines. Looking back at last season, I also dropped good players. Van Hecke went to the waiver wire in gameweek 5 and scored 132 more points for someone else.
To test in-season moves, a season simulator drafts with the engine and then plays a real past season week by week, with lineups and waiver swaps on every side.
Drafting a good squad and leaving it alone finishes near the bottom, because the waiver wire wears every advantage down. Judging players by form without luck, using xG instead of goals, beat judging them by points in every season I tested.
That policy runs as a Cloudflare Worker around each deadline. If a better legal XI exists, it fixes the saved lineup, so a late injury gets handled on the next run. A player in the current best XI can only be dropped if he's ruled out. Trades are only ever suggested, because a bot sending trade offers on its own would annoy everyone.

Every run logs what it did and why to a decision feed. The board is public at pl.arne.ai/rankings, so the league can argue with it.
Six weeks in, I've won five, lost one, and I'm still top of the table. Most of it came from the back five that autopick took.
- If F(k) is the chance a player is gone by pick k, the chance he lasts from now to my next pick is (1 − F(next−1)) / (1 − F(now−1)). Short leagues end before a late player's turn comes, so the curves treat them as censored data (a weighted Kaplan–Meier estimate) instead of reading "never drafted" as "bad". ↩
- Take Gabriel now, and Virgil is back at 16 92% of the time: 90.0 × 0.92 = 82.8. In the other 8%, Guéhi is certain to last and fills in, for 0.08 × 85.9 = 6.9. That's 89.7 on top of Gabriel's value, for 176.4. Take Virgil now, and Gabriel is back only 20% of the time, for 176.1. ↩