AFLgains / AIFL

Research blog

Claude Code can be a football analyst

I built a simplified Australian Rules Football game engine, developed a powerful team with agent-driven hill climbing, and then trained a neural network to score the play. Then I asked Claude to analyse past games and find a way to win.

Author
AFL Gains
Published
November 2026
Code
github.com/AFLgains/AIFL

TL;DR

Given only historical game data and a position-rating tool, Claude studied how three teams played Australian Rules Football and found their weaknesses. It explained its findings in a scouting report for each team. Then it showed that its analysis worked: it changed our team's code, and our team's win rate against each opponent increased substantially.

Introduction

Imagine you were an opposition analyst for a football team.

A good opposition analyst watches film of the opposition, works out how a team plays, finds what it does badly, and tells their own side what to change in order to increase the chance of winning the next game. They never see the other team's notes / playbook or anything else. They infer it from the limited resources they have.

The central question of this research was: could Claude Code be a good opposition analyst?

To test it I used my favourite sport to watch: Australian Rules Football. But real football data is a poor place to test this. The only way to check a game plan is to run counterfactuals: play the game repeatedly and check if the winning probability improved (impossible in real life). So I needed a simulation of the sport that could replay any fixture thousands of times.

So, I made an 8-a-side approximation of Australian football: a game engine with real physics. I then created a harness around this engine where any "rule-bot" (a set of Python functions) or LLM (with sufficient instructions) can play. Over 60 teams were created. The creation process was a mixture of experimenting with different rules and instructions.

Teams were ranked using an Elo score. To get extremely powerful teams (high Elo score), agent-driven hill climbing was used to evolve teams. Coding agents wrote changed copies of the best team, and a copy was kept only if it got a higher Elo.

From these games, 1,620,741 positions were gathered and a neural network was developed that rates any position on the ground.

Claude was then given a task: Given only historical play data on the team we're trying to beat and the aforementioned neural network as a scenario tool, infer the opposition's predominant play style and formulate a strategy to beat them.

Claude did this well. In every test, its plan increased our team's win rate against the opponent that it studied, with only three small changes to the team's code. With no limit on changes, Claude wrote a new team that beat the best bot available, the champion of the evolved teams, in 78% of games, without ever seeing that bot's code or playing against it. Along the way, Claude rebuilt each opponent as a practice bot from the data alone, and predicted its own results before the real games.

Figure 1. A real game, and what the network thinks of it. Every dot is a player in a simulated match between two evolved bots. The strip underneath is a neural network's running answer to one question: who scores the next goal? Blue is one team, orange is another, and each tick is a goal. Drag along the strip to move through the game.
BUILDA football engine with kicks, marks, tackles and fatigue8 v 8on a 140 × 100 m oval
EVOLVEBots compete and improve over 38 rounds+452Elo over the best hand-written club
PREDICTA network learns who scores next from any position3.2Mlabelled rows, from 1,620,741 positions
ANALYSEClaude studies the games and writes a scouting report3reports, one for each opponent, from game data only
TESTClaude changes its own team and plays the real opponent3% → 78%win rate against the champion, which Claude never played

Game mechanics

The game engine is a simplified form of Australian football: eight players a side, two midfielders, three defenders and three forwards, playing four-minute matches on an oval. Goals are worth six and behinds one. The engine handles the whole contest: running and energy, kicks with real flight and error, marks and spoils, ground balls, tackles, holding the ball, and set plays with a man on the mark. It does not include every rule of the real game. There are no ruck contests (a ball-up is simply a loose ball between two midfielders), no interchange bench and no quarters. The only free kicks are for holding the ball and for a kick that goes out on the full, so there are no free kicks for high contact, a push in the back or deliberate out of bounds, and no 50-metre penalties. Players also cannot bump or shepherd an opponent.

I wanted it close enough to the real sport that football ideas transfer, without being so detailed that nothing can be learned from it. A kick travels at about 22 metres a second, so a kick to a leading player takes time to arrive, and the player must still be free when it lands. A player who sprints runs out of energy in about 7 seconds and is then slower, so a team cannot sprint everywhere. A player who runs with the ball must bounce it every 15 metres, and about 30% of bounces are fumbled. Each of these rules forces a decision, and a team's tactics are the decisions it makes.

Pressure is incorporated. Every opponent near the ball carrier adds to a pressure score, and that score makes kicks, handballs, marks and gathers worse. It falls away quickly with distance, so a defender who gets three metres closer can change the whole contest.

Move the defenders

Each opponent adds exp(−(distance / 5 m)²). The total is capped at 2.

Figure 2. Pressure, using the engine's formula. Drag the orange players. One player at 3 m does more than two at 8 m.

Almost nothing in the engine is certain. Every contest is stochastic, weighted by the players' skills and the pressure on them. This matters because it simulates how the same position can be played out many times and end differently, just like real sport. This is also why a game plan has to be judged over hundreds of games, not one.

The harness

A team is anything that can read the state of the game and return orders. The way this works is that about once a second (and again after a kick, a possession or a stoppage), the engine stops and asks both teams what they want. Each player then gets an order from the harness: for example, run here, kick there, contest the mark, spoil, tackle that player. Physics runs on between decisions, and orders stand until they're changed.

There are two types of teams: a Python bot (a "rule-bot") that encodes its instructions in code and a large language model that can output its decisions for a given input (state). For LLMs, both traditional text-in-text-out LLMs AND decision-based LLMs (e.g., JEV) were experimented with.

State in

→

The coach

→

Orders out

Figure 3. The decision loop. The state and orders are cycling through the real decisions from the game in Figure 1.

Evolve a team worth analysing

At first, Python teams were hand-written from scratch using common sense.

But in order to run the experiment, we needed a team worth studying. A hand-written club has obvious habits, so I needed something stronger, and stranger, than I could write myself.

To do this, I used agent-driven hill climbing to evolve new clubs. In each round, coding agents wrote changed copies of the current best bot. Each copy played the strongest bots on the ladder. A copy became the new champion only if it got a higher Elo. The process had these steps:

  1. In rounds 1 to 7, two coding agents (red and blue) each wrote one bot in each round.
  2. All bots played against each other, and each bot got an Elo rating. Five hand-written bots stayed in the pool as fixed reference points.
  3. From round 8, each round started from the bot with the highest Elo (the champion).
  4. Each round made one to three new bots (candidates). Each candidate was the champion with one or more changes. For example, candidate round_08a lets a set-play taker hold the ball for 4 s, not 3 s.
  5. Each candidate played the 10 highest-rated bots. If a candidate got a higher Elo than the champion, it became the new champion.
  6. Some changes were first tested alone. The changes with a positive result were then put together in one bot.

The process ran for 38 rounds. After round 36, the ladder had 9,448 games. The best bot, round_36a, had an Elo of 2,036. The best hand-written bot had an Elo of 1,584, an increase of 452 points. With this difference, the expected win rate of round_36a against that bot was 93%.

Elo by round

Each dot is one bot. The line is the best so far.

Climb botsEarlier red and blue teams
Figure 4. The climb. The ratings are scaled so that the five hand-written clubs average 1,500. The shaded band shows the range of four of them. The fifth, zoo:keeper, is much weaker (1,316) and is below the chart. One bot from the climb, round_29b, crashed on every decision and is also below the chart. Hover over a dot to see the bot.

The best team, round_36a, was then selected as one of the opponents in the analyst experiment. Its strategy is a long stack of ideas added and evolved progressively one at a time: who reaches the landing spot first, which kicks are worth taking, endgame shot selection when a behind would win the match. It's good in ways that are difficult to see from outside, which makes it the perfect candidate for study.

Teach a network to read the play

An analyst can do more than count events. An analyst can look at one frozen moment of a game and say if the position is good or bad. I wanted to give Claude a tool that does this. For this tool, I needed a neural network that answers one question for any position: which team scores the next goal?

Labels: play each position forward

The network learns from labelled positions. A naive label would be to encode the team that scored the next goal in the real game. This label has a problem: it shows which team was stronger, not which position was better. A strong team in a bad position still gets a good label.

So I used a different label. The method is similar to the method that chess engines use. The steps are:

  1. Take a position from a real game.
  2. Make a copy of the game at that moment.
  3. Give control of both teams to the same strong bot, round_29a.
  4. Play the copy until a team scores a goal (the "rollout").
  5. Record which team scored.

Both teams now use the same bot. Thus, the only difference between the teams is the position of the players and the ball.

0blue scored next
0orange scored next
–blue's share so far
–the network's rating
Figure 5. One position, 64 futures. Real rollouts from three moments of the game in Figure 1. round_29a controls both teams. Each line is the path of the ball until the next goal. The training data has one rollout for each position, so the network must learn the probabilities from millions of single results. With 64 rollouts, each share has an error of about 6 points either way.

Each position gives two rows of data, one for each team. The ground is mirrored, so each team always attacks in the same direction. The inputs do not include the score or the clock. This is intentional: bots change their play when they are in front or behind, and the network must rate only the position.

The network is a simple multilayer perceptron. It has 269 inputs, three hidden layers (512, 512 and 256 units) and one output. The inputs give the position and velocity of all 16 players and the ball, the pressure on each player, and the state of the ball.

Figure 6. The network during a game. The real activations of the network at each decision, from the same game, at match speed. The inputs on the left show which players have the largest effect on the rating. This effect is calculated from the gradient. It is a sensitivity, not an explanation: a bright player is a player that the rating is sensitive to at that moment.

What the network learned

The inputs do not tell the network about the 50 m arc. They also do not tell it that the corridor is more dangerous than the wing. Figure 7 shows the training labels and the predictions of the network, side by side, by ball position.

They scoreWe score
What actually happened in rollouts
What the network predicts
Figure 7. The ground, as the network sees it. Mean next-goal share by ball position, from 3,241,482 rows. The team always attacks to the right. Hover for the values. The two maps must agree (and they do). This shows that the network fits the data well.

How good is the network?

I measured the network in two ways: on games that it did not see in training, and against the true value of single positions.

Calibration. I put the predictions on held-out games into bins. For each bin, I compared the mean prediction with the actual share of next goals. The points are on the diagonal (Figure 8, left), so the network is well calibrated. When the network gives a team 70%, that team scores next in approximately 70% of those positions.

Accuracy. On held-out games, the network predicts the team that scores next correctly in 69% of positions. This number can seem low. But goals have a large random component (see Game mechanics), and many positions are close to 50:50. No predictor can be correct in all positions. To find the maximum possible accuracy, I measured the true value of a set of positions:

  1. Take 250 positions at random from held-out games.
  2. For each position, make a copy of the game and play it to the next goal. round_29a controls both teams, as in the training labels.
  3. Do step 2 100 times for each position. Do not count rollouts that end with no goal.
  4. The true value of the position is the share of the rollouts in which each team scored.

A perfect predictor knows this true value, and it always picks the team with the higher value. On these 250 positions, a perfect predictor is correct in approximately 72% of positions. The network is correct in 70%. The gap is small because many positions are close: in 28% of the positions, the true value is between 40% and 60%.

Log loss. Accuracy only shows if the predicted team was correct. Log loss also measures the quality of the probability. A lower value is better. On the same 250 positions:

PredictorLog loss
Coin toss (always 50%)0.693
The network0.578
Perfect predictor (the floor)0.558

The floor is the lowest log loss that is possible. The result of each rollout is random, so a predictor that knows the true value still has some loss. For one position with true value p, this loss is the binary entropy, −(p ln p + (1 − p) ln(1 − p)). The floor is the mean of this value over the 250 positions. The value of p comes from a finite number of rollouts, so this mean is slightly too low. The calculation adds a correction of 1 / 2n for each position, where n is its number of rollouts that ended in a goal (92 on average).

From a coin toss to the floor, the possible improvement is 0.135. The network gets 0.115 of this, which is 85%. On all held-out games, the log loss of the network is 0.579.

Single positions. Figure 8 (right) compares the network with the true value of 500 positions. These are the 250 random positions, plus 250 positions chosen to cover the full range of predictions. The mean error is 8 points, and the correlation is 0.92. Some of this error comes from random variation in the 100 rollouts.

Held-out games

Predicted share against actual share

Against 100 rollouts

500 sampled positions. Each position was played 100 times.

Figure 8. How accurate is the rating? Left: predictions on held-out games, in bins, against the actual share of next goals. Right: the network against the true value of 500 positions. Each position was played 100 times.

The test: Claude as a football analyst

With the simulation engine, the strong bot, and the neural network to rate positions ready, I had enough to see if Claude could be an opposition analyst. In this experiment, Claude was told that it was working for a fictional team, the "Power", which was preparing for an upcoming match. Three opposition teams were tested: the Giants, the Eagles and the Sharks.

For each opposition team, Claude got two pieces of information to help it prepare:

  1. Data on the opposition, and the rules of the game
  2. A position rating tool

Its goal was to analyse the opposition, write a scouting report, and then propose a small, limited change to the Power's strategy to improve the Power's performance against that opposition. The change was made to the code that defines the Power's strategy: at most 3 separate changes and 30 changed lines. In practice, each plan changed only 3 to 7 lines. This limit simulates a coach who has only one week to prepare for the next match: there is time for a few targeted changes, not for a new game plan. Claude got the Power's code only after it had finished the scouting report.

1. The data that Claude gets

A real analyst works from video. Video shows where each player goes, but it does not show the orders from the coach. Claude gets the same type of data. The engine records each order to each player, but Claude does not get the orders. Use the toggle in Figure 9 to see how much the orders show.

Figure 9. Movement and orders. With orders on, each line shows where a player was told to go. A dashed line is a jog. These lines are equivalent to the playbook of the other team. Claude does not get the orders of any team, including its own team.

All data goes through a whitelist. Claude gets a data field only if the field is on the list. A test fails if any other field gets through.

Claude gets

  • All games of the opponentPlayer and ball positions, and public match events
  • All games of its own clubIncluding 20 games against the opponent
  • The rulesThe laws of the game, with no team tactics
  • The position ratingThe network, as a tool for experiments
  • After its report: the code of its own clubAnd a blank template, a very short example and a practice engine

Claude does not get

  • The source code of any opponentOr the shared code that many bots use
  • The orders of any teamIncluding its own club
  • Player energyA camera cannot record fitness
  • Kick targets and powerOnly where the ball landed, not where the kicker aimed
  • The identity of each clubNo list connects a club name to its bot
Figure 10. What Claude gets. All clubs have anonymous names. Each session works in a sandbox, with no access to this repository.

Claude's team is the Power. The Power is a simple club of medium strength. It was written from scratch, and it shares as little code as possible with the bots that it plays. Thus, a better result is more likely to come from a weakness of the opponent, not from shared code.

ScoutClaude studies the season. It writes a report on how the opponent plays and where it is weak.
PlanA new session gets the report, the code of the Power and a practice engine. It can make a maximum of 3 changes and 30 changed lines. For the Sharks, one more session has no limit.
TestClaude cannot play the real opponent. It writes its own model of the opponent from its report, and tests each change against that model over many games.
GradeI play the plan against the real opponent on 200 new seeds, from both ends (400 games). I play the original Power on the same seeds, and compare the two.
Figure 11. One run. The 3-change limit is like a coach with one week to prepare. The session with no limit is like a coach with a full off-season. Each brief has the same goal: beat this one opponent. Each session ran in its own sandbox, with no internet and no access to this repository.

2. The position rating network as a tool for the analyst

The position rating network lets Claude do experiments on positions. Claude can take a moment from a game, move a player and get the change in the rating. Figure 12 shows this. The map shows the rating with the ball carrier at each point on the ground. All other players stay in the same positions.

They scoreWe score
–where the carrier really was
–the spot you've chosen
–change
Figure 12. What if the ball were here? Drag the ball. Each cell of the map is one call to the network. In each call, the carrier moves to that cell and all other players stay where they are. Blue players are on the carrier's team. The holes in the map come from the positions of nearby players. A coach can see this, but a box score does not show it.

This tool turned out to be one of the key unlocks for Claude. Here are some interesting examples of how Claude used the tool during its analysis:

1. Claude checked the tool before it used it. The Giants analyst made 300 real positions again from the game data. It rated each position with the tool and compared the rating with the rating stored in the data. The correlation was 0.96 when a player held the ball, 0.89 for a loose ball and 0.78 for a ball in flight. The Sharks analyst did the same check. For a ball in flight, its correlation was only 0.40 to 0.48, because it could not make the flight of the ball again from the data. So it used the tool only on positions where a player holds the ball.

2. A test with the tool became part of a plan. The Giants carry the ball with little pressure. Claude found 268 frames from the head-to-head games where a Giant held the ball and no Power player was within 4 m. In each frame it moved the nearest Power player to 2.5 m in front of the carrier, and rated the position again. The rating moved 1.4 points towards the Power (standard error 0.1). It moved towards the Power in 90% of the frames, even after allowing for the opponent that the player left unmarked. This test actually became one of the strategies for play against the Giants: the nearest Power player closes down a Giants carrier within 12 m.

3. The tool stopped an idea. The intercept data suggested that the Power should kick wide against the Giants: 15–17% of kicks through the centre were intercepted, and 0–4% of wide kicks. But only 65 kicks were wide, and the tool preferred central landing spots. Claude did not recommend the idea.

4. The tool gave the Sharks analyst a rule for each kick. Claude wrote the value of a kick as: P(kept) × the rating if the Power holds the ball at the landing spot, plus (1 − P(kept)) × the rating if the nearest Shark holds it there. It fitted P(kept) on 16,000 kicks from the league. The result: better choices of target alone were worth only about 1 point, because the Power's forwards were always covered. The forwards needed more space first. The same rule is the centre of the plan with no limit (see Results).

The three opponents

Separate Claude analysts were asked to study three teams: the Giants, the Eagles and the Sharks.

Experiment 1

The Giants: an ordinary team

The Giants were a mid-range, hand-written team. Before any change, the Power won 53.6% of its games against the Giants.

Experiment 2

The Eagles: a clever team

Like the Giants, the Eagles were a hand-written team, but slightly stronger. Before any change, the Power won 53.0% of its games against the Eagles.

Experiment 3

The Sharks: the champion

The Sharks were the champion of the evolved teams (round_36a). Before any change, the Power won only 13 of 400 games against them (3.4%).

Experiment 4

Bonus: Unlimited change to the Power

The last experiment removed the limit. A new session got the same Sharks scouting report, the code of the Power and the practice engine. This time Claude could change the Power as much as it wanted, or write a new program. The goal was the same: beat the Sharks. The other rules were also the same: Claude never saw the Sharks' code, and it could practise only against its own model of the Sharks. This is like a coach with a full off-season, not one week.

Results

The scouting reports

These are Claude's scouting reports, unchanged.

These reports were then the basis for how the Power's code was updated to beat its respective opposition. For each opposition, the updated rule set is called the "plan".

Overall results

Each plan played 400 games against the real opponent: 200 new seeds, each from both ends. The original Power played the same 400 seeds. Figure 13 and Table 1 give the results. The win rate counts a draw as half a win, and each ± is two standard errors.

Before
score against the opponent
After Claude's plan
score against the opponent
WinDrawLoss
Figure 13. 400 games, before and after. Each dot is one game against the real opponent. In the score, a draw counts as half a win.
OpponentLimitSize of the changeWin rate beforeAfterGain
Giants3 changes7 lines53.6%69.9%+16.2 ± 6.4
Eagles3 changes3 lines53.0%81.0%+28.0 ± 6.1
Sharks3 changes6 lines3.4%28.6%+25.2 ± 4.7
SharksNone545-line program3.4%77.9%+74.5 ± 4.5
Table 1. The result. Four graded plans from seven Claude sessions: one report for each opponent, one plan for each opponent, and a second plan for the Sharks with no limit.

All four plans gave a reliable gain against their opponent. With three small changes, the Power went from about even to clear favourite against the Giants and the Eagles. Against the Sharks, the same type of plan increased the win rate from 3% to 29%. This is a large gain, but the Power still lost most games. When the limit was removed, Claude devised a plan from scratch that beat the Sharks 78% of the time, up from only 3%.

Figure 14 shows the code changes themselves. Each plan is a small edit to the Power's program, and the comments in the code are Claude's own.

Figure 14. The plan diff. The real changes from each plan with the 3-change limit, against the original Power. Red lines were removed and green lines were added. The note above each change gives Claude's reason for it, from its plan.

Are the plans specific to the opponent? A plan for one opponent can also make the Power better against every club. To check this, each plan also played 8 other hand-written clubs (not the Giants or the Eagles), 40 games against each, on the same seeds as the original Power. The original Power wins 71% of its games against them.

PlanGain against its opponentGain against 8 other hand-written clubs
Giants+16.2+13.6
Eagles+28.0+7.3
Sharks, limit+25.2+20.3
Sharks, no limit+74.5+28.7 (wins every game)
Table 2. Gain against the opponent and against other clubs. Points of win rate. Each gain against the hand-written clubs is an average over 320 games, with an error of approximately ±3–4 points.

Each plan gained more against its own opponent than against the other hand-written clubs. The Eagles plan is the clearest case: +28 points against the Eagles, and +7 against the other clubs. The plans for the Giants and the Eagles also used different changes, and each change came from the scouting report:

How Claude beat the Sharks

The problem. The Sharks analyst found why the Power loses, from the data alone. The Power loses the ball when it kicks out of its defensive 50. Across the league, a kick is kept more often when there is more space at the landing spot (Figure 15). Against the Sharks, 44% of the Power's kicks went to a spot where a Shark was nearer than any Power player. Only 8% had more than 6 m of space. The eight clubs that took most of the Sharks' losses and draws kicked to space: 32% of their kicks had more than 6 m.

Kicks to space are kept

Share of kicks kept, by space advantage at the kick

Who kicks to space

Kicks against the Sharks, by space advantage

Power v SharksEight strongest clubs v SharksSharks v Power
Figure 15. Kicks to space are kept. Space advantage is the distance from the landing spot to the nearest opponent, minus the distance to the nearest teammate, at the moment of the kick. Left: all 10,368 kicks of 15 m or more in the season, without shots. Right: the Power against the Sharks, the eight strongest clubs against the Sharks, and the Sharks against the Power. The numbers come from the Sharks analyst's own data files. I ran its figure code again to draw this figure.

The report also found the cause. Each Sharks defender stays 3–4 m from a Power forward. Against other clubs, they stay 5–7 m away. And the Power's forwards stand still: when the Power has the ball in its defensive 50, they move faster than 5 m/s only 4–5% of the time. The strong clubs' forwards do it 23–28% of the time. So the Power kicks to covered players. About half of the Power's chains that start in its defensive 50 lose the ball again inside the same 50. For the strong clubs it is 15–16%.

With 3 changes (28.6%). The plan made the Power kick only to players in space:

  1. A teammate is "free" only with no opponent within 7 m (it was 3 m).
  2. Kick to where the receiver will be, not to where he stands.
  3. With no kick on and no opponent near, run on for up to 0.8 s before a short handball.

With no limit (77.9%). Claude wrote an entirely new program of 545 lines. These are its main ideas, each with the evidence that Claude gave for it:

Other things Claude did

It rebuilt each opponent as a practice opponent. Claude could not play the real opponent. So in each plan session it wrote its own copy of the opponent as a bot, from its scouting report only, and tested its changes against that copy. It then checked each copy against the 20 real games between the Power and that opponent. The copies matched many details of the real play:

OpponentOriginal Power against the copyOriginal Power against the real clubPlan against the copyPlan against the real club
Giants64–72%53.6%83–90%69.9%
Eagles40–69%53.0%88–96%81.0%
Sharks, limit11%3.4%43–73%28.6%
Sharks, no limit13%3.4%93%77.9%
Table 3. Claude's copy and the real opponent. Win rate of the Power. The "copy" columns are Claude's own results from its practice games, against its main copy and the variants it made of it (a range where the copies gave different results). The "real club" columns are the official grades.

The copies were close, but not exact. The copies of the Giants and the Sharks were weaker than the real clubs, and Claude's best-fit copy of the Eagles was a little stronger. In all four cases, the plan did better against the copy than against the real club. Claude expected this. Each plan said that the copy was easier than the real club in some way, and that the real gain would be smaller than the gain in practice.

It predicted its own results. Each plan ends with a forecast, written before the grade:

PlanClaude's forecastResult
Giantsthe win rate goes up "by something like 10–20 points"+16.2 points
Eagles"a 70–80% chance of winning"81.0%
Sharks, limitthat the plan makes the Power favourites: "low"28.6%
Sharks, no limit"a win rate somewhere around 70–90%"77.9%

It changed its own advice when a test disagreed. The Sharks report recommended that the Power's forwards lead for the ball. In the practice games of the plan with no limit, leads made the plan worse: 91% wins with leads, 98% without. Claude found the cause: the Sharks' defenders are faster than the Power's forwards (speed rating 0.66 against 0.58). So a lead does not get the forward free; it only makes him tired. Claude wrote: "Space comes from where the ball is kicked, not from forwards running."

Conclusion

Claude read one season of game data, described how each opponent plays, and found where the Power lost. Each report led to a plan. With three small changes, each plan increased the win rate against its opponent: by 16 and 28 points against the two mid-range clubs, and by 25 points against the champion. Each plan gained more against its own opponent than against other clubs, most clearly against the Eagles. With no limit, Claude wrote a program that beats the champion in 78% of games. It never saw the champion's code and never played it. Claude also predicted each result well, and it said each time that the real opponent would be harder than its practice model.

Figure 16. The Power against the Sharks, before and after. Two real games against the Sharks on the same seed. Before: the original Power loses 2 to 30. After: the Power with Claude's plan wins 14 to 0. Blue is the Power and orange is the Sharks. The strip underneath is the network's rating: who scores the next goal. Both games are typical of their grades: the original Power lost by 25 points a game on average, and the plan won by 8.

Code

The engine, the bots, the position-rating network and this page are on GitHub: github.com/AFLgains/AIFL. The repository also has a public challenge: write a bot that beats round_29a.

Citation

@misc{aflgains2026analyst,
  title  = {Claude Code can be a football analyst},
  author = {{AFL Gains}},
  year   = {2026},
  url    = {https://aflgains.github.io/AIFL/}
}