Table of Contents

Overview

In short

  • Five years to a working loop. A LeagueSandbox fork in 2020, LLM-written policies in 2025, then Brokenwings, a season-1 server complete enough to train on, in April 2026.
  • April: a PPO stack that beats the engine bot about 80% of the time, and the lesson that every “throughput” problem was an engine bug.
  • September: fastsim, a numba reimplementation held frame for frame to the server: about a million samples a second, 360 agent-years of experience a day.
  • The best checkpoints have never seen a server, and probing them shows HP-difference machines.

Following on from part 1, we now move towards our first step. Implementing our methodology for creating superhuman League of Legends AI agents by simulating the game server at orders of magnitude faster than realtime to then dedicate all of our compute away from simulation and towards the actor/trainer.

History

First it would be good to introduce the entire history of my attempts at RL agents and League of Legends before arriving at how it was implemented for the brokenwings project. If you want to understand other peoples methods then refer to part 1 which still remains a good starting point.

  1. Late 2019OpenAI FiveBeats the Dota 2 world champions from self-play.
  2. Late 2020pylolA LeagueSandbox fork with a pysc2-style env on the patch 4.20 client.
  3. 2021–2023TLoLImitation learning from replays, via memory reading.
  4. Early 2025Voyager-styleAn LLM rewrites a Python policy from its own episodes.
  5. Apr 2026BrokenwingsPPO on a season-1 server; beats the engine bot ~80%.
  6. Sep 2026fastsimA frame-exact simulator at about a million samples a second.
Six attempts at the same idea. Everything before April 2026 stalled on the environment rather than the learning.

OpenAI Five

In late 2019, I saw OpenAI Five beat the world champions at Dota 2 and I was awestruck. How is it possible that by just having an AI system play against itself it was possible for it to beat the world champions at arguably the most complex e-sports title ever made? Simply by playing against itself and self-discovering how to achieve this?

The first thing I did was investigate how it was achieved and I learned about reinforcement learning, imitation learning and game playing AI in general. Then I realised that Riot Games allows players to download replay files (*.rofl) and that it must somehow contain data useful for imitation learning. After viewing the ROFL files in a visualiser I realised that it looked really random? I figured that this must mean it had high entropy, which means the data was encrypted. I then investigated how to get data out of the replay files using scripting engines on the live running replay client which culminate in the TLoL series on this blog.

Pylol

However I also discovered the reinforcement learning and simulation approach. In late 2020 I forked my own version of LeagueSandbox and haphazardly adapted it for reinforcement learning using a duct-taped architecture (redis as the IPC, copied pysc2 into pylol), and even streamed a working version of the system to Twitch.tv where viewers could choose the champ by using chat commands.

I copied enough of the pysc2 lib (Starcraft II lib from Deepmind x Blizzard) which communicated with the LeagueSandbox server and used the real patch 4.20 client and had a fully working training loop!

I even got it fully working inside of a sharable Google Colab here.

Although at this stage I stopped as I felt that continuing required expanding on LeagueSandbox itself and at the time I thought that I didn’t have the raw compute to achieve intersting results.

I was actually more interested in getting the source code for the infamous Chronoshift project and was active on their discord server shortly before the infamous Riot Zed incident.

After this the RL-based efforts die down and I switch over to imitation learning for years afterwards as I felt that I’d never be able to use the simulator approach due to the sheer engineering and harsh fidelity requirements.

Voyager

repo

Many years later, in early 2025, I had more spare time and decided to re-ignite the League RL-style approach based on a different fundamental understanding. Perhaps the RL approach is inefficient not because of our simulator, but the sample efficiency of our learning method? What if we could use LLMs with their strong pre-existing world knowledge to learn how to play League of Legends?

The main basis of this idea were several RL / game playing LLM based projects from 2023 and my research into agentic coding systems in 2024.

  • Voyager (NVIDIA et al., May 2023): a GPT-4 era agent that played Minecraft open-endedly by proposing its own tasks, writing JavaScript skills against the game’s API, and keeping the ones that worked in a retrievable library with no gradient updates at all. It reached diamond tools 15× faster than ReAct/AutoGPT-style baselines. But it saw the world as text and spent an LLM call per decision.
  • Eureka (NVIDIA et al., October 2023): GPT-4 given an environment’s source code writes reward functions, which are trained in parallel and refined from their own training statistics. It beat human-written rewards on 83% of 29 tasks and taught a simulated hand to spin a pen. It only works because Isaac Gym makes training sixteen candidates at once cheap - using the LLM designs, a fast simulator does the learning.

How it works

Voyager’s loop has three parts: an iterative prompting mechanism (run the skill, feed back what happened, rewrite), a skill library (keep what worked, retrievable), and a curriculum (pick the next task). I kept the first two and fixed the task — an Ezreal mirror on Old Summoner’s Rift, cooldowns off, four decisions a second, 25-second episodes — so the only thing the loop had to learn was how to win a duel. Below is each part as it exists in the repo.

The policy is code. One Python function, act(self, observation) → (action_id, args), over three actions: no_op, move (y, x), spell (slot, (y, x)). Movement is clamped to ±400 units at 100-unit resolution — a 9×9 grid. The starting policy was 43 lines: walk at the enemy and cast Q on alternate ticks.

# checkpoints/0.py — the whole strategy
if int(observation["game_time"]/250) % 2 == 0:
    return (1, [enemy_champ_x, enemy_champ_y])          # move at them
else:
    return (2, [[0], [enemy_champ_x, enemy_champ_y]])   # Q at them

The experience is a notation, not JSON. Voyager fed GPT-4 a text description of the Minecraft state; I fed Claude one line per tick in a format I thought of as PGN for League — compact, human-readable, and complete enough to replay the fight in your head, the way a chess game fits in a text file:

T1279|ME100,100,(6801,7096),L1,G35,K0D0|Q0W0E0R0|ENY100,100,(395,-193),L1|PROJ[1073741853,0,0,2000,EzrealArcaneShift][1073741854,60,-234,2000,EzrealMysticShot]|ACT[move,auto,spell_0,...]

Time; my HP%, mana%, position, level, gold, K/D; my four cooldowns; the enemy’s HP%, mana%, offset from me, level; every projectile as [owner, dx, dy, speed, name]; the legal-action mask. A 25-second episode is a hundred of these lines. The relative offsets are the point — (395,-193) and a projectile at (60,-234) is enough to see that something is about to land, and the model worked out perpendicular dodging from dx, dy on its own.

The prompt is a fixed template. Every iteration sends the same six blocks — the only things that change are the current policy, the latest episode, and the growing history:

You are T1 Faker, the best League of Legends player in the world.
You are observing an autonomous scripting bot acting on a hand-crafted Python policy...
You must improve the policy based on its gathered experience...

<game_context>     cooldowns are disabled                      </game_context>
<observation-spec> the notation above, explained               </observation-spec>
<action-spec>      no_op / move / spell                        </action-spec>
<current-policy>   {the act() the bot just played}             </current-policy>
<experience>       {100 lines of notation}                     </experience>
<history>          {every previous <thinking>, concatenated}   </history>

Return: <thinking>…</thinking><policy>…</policy>

plus two guardrails: thinking capped at 4,000 words (“we want fast iteration”), and an AST validator on the returned code — must define act(self, observation), no eval/exec/open/getattr/setattr — before it is hot-swapped into the running agent.

The skill library is the checkpoint directory. Every accepted iteration writes three timestamped files: the policy, the model’s reasoning, and the full prompt that produced it. The policy is Voyager’s executable skill; the reasoning is the part Voyager didn’t keep.

The experience buffer is what stops it forgetting. Each prompt’s <history> is every previous _thinking.txt concatenated, with this instruction:

You MUST use this information to avoid cyclically updating your policy and forgetting parts of the policy which have already been learned.

Without it, an LLM rewriting a policy from one episode’s evidence oscillates — fix the dodging, lose the aggression, fix the aggression, lose the dodging. With it, the traces show the model citing itself. Iteration two:

From history: “spam E (Arcane Shift) directly on the enemy — it’s a targeted blink that deals damage” — but E range is only ~475, we need to close the gap first.

and by iteration five it opens with a digest of everything learned so far before touching the code:

From history: previous iterations showed — don’t just spam R from long range; need to close distance; need to dodge between casts; E blink is great for repositioning AND damage; orbit enemy at ~500 range; interleave dodge and cast.

That is the whole mechanism: Reflexion-style verbal memory, persisted to disk, prepended to every call.

Five iterations, one a minute. The 8 March run, 04:08 to 04:13:

# lines what it read in the notation what it changed
0 43 — walk + Q on alternate ticks
1 86 HP falls symmetrically 100→88→72→59→32→19→5; “we walk in a straight line, every enemy Q comes from the same diagonal, we never dodge”; projectiles carry dx,dy dodge perpendicular to the projectile vector; use all four spells; with no cooldowns, spam E
2 135 bot didn’t move for 4 s; both R’s land at T2265 and HP drops to 64% for both; “R has a long travel time and both hit each other equally” approach at an angle while casting; don’t poke with R from max range
3 124 distance never closes below ~5,000; “game_time increments by ~250 each step, so game_time // 250 gives a tick counter” tick-based action cycling; always move or cast, never idle
4 160 we’re at 4%, enemy at 31%; “the E blink puts us right on top of the enemy where we eat all their abilities” E to a flank, not onto the target; dodge between every cast
5 141 enemy at 29%, us at 61% — ahead; movement still predictable; ACT lists auto and we never use it interleave auto-attacks; only dodge projectiles actually closing; E for damage, never escape

The last policy is the demo build — commit message: “latest policies, far better for demo, more aggro.”

What the loop could and couldn’t do. It could read a fight from text and reason about it correctly — the tick-rate derivation, the geometry, the “both R’s hit each other” diagnosis are all right. It kept its lessons. And it was still writing if/else with a frontier-model call per episode, which is a fine way to discover a strategy and no way at all to execute one at 250 ms. That was the division of labour I took forward.

I thought about scaling this up and then realised, training an RL agent is just more efficient. However, this taught me that LLMs can be highly efficient for diagnosing agent behaviour which becomes crucial for the work in brokenwings.

Brokenwings (First Attempt)

Ok so we now have the history: years of attempts at agents in half-baked simulators with nothing to show for it beyond LLM-written Python that could sort of dodge, and agents that maximised their distance from each other. What’s different now?

Two things. Agentic coding, which turns “expand LeagueSandbox” from a year of evenings into a week. And Brokenwings: a patch 1.0.0.126 (season 1) game server in the LeagueSandbox C# lineage that, bugs aside, faithfully reimplements the game as it was. It’s the Chronoshift I’d wanted since 2021, and in April 2026 it was complete enough to iterate on. A lot of the original game’s logic lived in Lua on the client back then, so there was also a lot less server to rebuild.

The bridge, 23–24 April

Bottleneck
none yet
Lesson
a toy that works is the dangerous kind.

The fork starts on 23 April with ChildrenOfTheGraveRL: a TCP server inside the engine speaking newline-delimited JSON. It emits observations at a fixed rate timed by game time rather than loop count, and takes noop, claim, teleport, move, chat — the last of which exposes the engine’s forty-odd !cheat commands for free. Three engine hooks make it an RL environment rather than a remote control: a post-tick callback, an _aiPaused check in the behaviour tree so claim actually silences the scripted bot, and a HEADLESS flag with force_start so a bots-only game runs with no client attached.

By the end of the second day it also had attack (through the same order path a human client uses), reset (wipe level, gold and stats, or keep them), spell and level_spell, and richer observations: buffs, per-slot spell level and cooldown, the full stat line, current target and move order. Two bugs from those two days are worth recording because every reimplementation hits them: casts bypassed the engine’s cast-request handler, so champions never turned to face the target and cleanup never ran; and the missile’s start and end point were the same, so it deleted itself on its first tick. The fix for the second is the axis rule that haunts every League tool — a ground target is (x, 0, y), with altitude in the middle.

On the Python side: a Gym env with frame_skip=8, a reward of HP change plus a kill bonus plus gold as a stand-in for creep score, and the first SB3 PPO run. Thirteen discrete actions (eight move directions, attack, Q/W/E/R), fourteen observation numbers, random opponent. Two tasks: flee, where it learned to spam Ezreal’s E; and combat, where it learned to weave auto-attacks between spells — it found Ezreal’s passive on its own, in an afternoon, from fourteen numbers.

That’s the dangerous moment. It worked, so every problem after it looked like a training problem.

The engine fights back, 25–27 April

Bottleneck
everything
Lesson
every throughput number was an engine bug in a performance costume.

Mirror self-play went in on the 25th — the opponent is the live policy seeing the game from its own side — plus several servers in parallel on threads (fine, because each env mostly waits on a socket), auto-launched servers, action masking with MaskablePPO, and missile observations: every live missile’s position, velocity, team and whether it’s an auto-attack, eight nearest per champion, taking the observation from 14 to 110 numbers. Masking cooldowns and mana ended the “spam R” strategy on the spot.

Then three days of this:

Symptom Looked like Actually was Fix
Self-play results skewed from the first run the policy reset set level to 1 but kept the stats from past level-ups: a stat snowball undo Stats.LevelUp on reset; a drift check now shows zero
Respawned opponent dying instantly the policy a stale AttackTo order surviving reset reset clears all orders
Throughput capped, servers looked CPU-bound server CPU (ObjectManager.Update at 94% of a core) Python: makefile(buffering=0) read one byte per syscall, each fighting the GIL buffering=65536 — 117 → 1,139 trial-fps at 8 lanes, 6.5×
Tick rate falling from 30 Hz to 5.7 Hz over fifty minutes memory the .troy parser read “key missing” (−1) as “lives forever”, so particles never died and vision updates grew to 917 ms per second 30 s particle cap, plus gauges counting objects by type
Long runs dying nothing in the logs a spell re-cast while its previous cast was still finishing (navgrid limit → movement stops → cast cancelled → script re-casts) threw inside a reusable awaiter log and drop the second continuation; also removed an out-of-bounds array access someone had left in Spell.cs for debugging
152k-step model losing to the 40k model 24% of the time, 35% double-KOs mirror collapse, regression rock-paper-scissors: against the engine’s own bot the 152k model won 80.6% and the 40k 77.8% evaluate against something outside the lineage

And one near-miss: the docs briefly recommended TICK_RATE=120 for a free 1.8× speedup, until someone asked whether anyone had checked the physics at 120. Nobody had. It was reverted, and it’s the first appearance of a bug that wasn’t properly fixed until the ScaledDeltaTime audit in September.

Every row in that table was first filed as a training problem. The same lesson lands again in September, harder: a minion running a map-wide A* search every tick, filed for weeks as “throughput decay.”

Scaling out, 27–29 April

Bottleneck
self-play standoffs
Lesson
the OpenAI Five appendices are a checklist, and you will use all of them.

The cloud setup went in on the 27th: Graviton spot instances (1,024 approved vCPUs), Linux fixes (the server was launching powershell.exe from a monitoring class and crashing), spot-shutdown handling, runs synced to S3, core pinning that knows Graviton has no hyperthreading. The plan was deliberately dumb: each box trains alone, checkpoints go to S3, cross-box tournaments pick winners. No distributed PPO. A Docker image followed, then about eight fixes to the Docker image.

On the training side the problems were now the right kind. Mirror training settled into a defensive standoff where both sides ended every episode on 188 HP. Two fixes, both straight from the OpenAI Five paper: a snapshot pool (Appendix N) so some episodes are played against a past checkpoint, and HP/mana jitter at reset (Appendix O.2) so no two episodes start the same. Head-to-head and sweep evaluation tools, batch size scaling with env count, and the Python tooling split out as riftgym with the image down from 2.18 GB to 444 MB.

Where April ended

A working 1v1 PPO stack: auto-launched servers, five lanes a server, both sides trained, masking, missiles, evaluation against checkpoints and the engine bot. Checkpoints beat the engine bot about 80% of the time. Still open: minions ending games; the deeper “a cast can run while it’s still running” bug behind the crash (only the crash had been handled); and physics at any timescale other than 1×.

Then nothing for four months. What came back in September was the same fork with a different question: not “does it learn” but “how fast can it learn” — and the answer to that is the field report and the next two sections.

Brokenwings (fastsim)

The fleet, September

Bottleneck
the engine tick
Lesson
self-play looks flat long before it stops improving.

September picked up the April fork with a different question. April asked “does it learn”; September asked “how fast”. Three engine changes turned the bridge into a proper environment.

Step mode: the game loop blocks until the bridge grants a number of ticks, runs exactly those at a fixed 33 ms, emits one observation, and blocks again — with a seeded RNG an episode replays bit-identically, which matters less for science than for debugging, because every engine change can now be A/B tested for frame-identical output.
Headless play proper, with vision computed only for connected peers.
Lane resets: three independent lanes per server, each reset teleporting its pair, restoring resources and respawning its creep waves while the rest of the world persists.

On that, 256 servers on one GH200 — 64 cores and one H100 — fed eight actor processes in pipelined groups, with PPO on a 256-unit LSTM behind a unit-set encoder with attention targeting, the OpenAI Five recipe at a thousandth of the budget. Twelve agent-years of experience a day. The April lesson came back on schedule: fleets lost two-thirds of their throughput within an hour, memory grew, a leak was found and fixed — and throughput still decayed, now with flat memory. The cause was a creep wave spawned near the bottom-lane corner whose next waypoint sat on unwalkable ground on the far side of the map, so every such creep ran a map-wide A* every single tick, and they accumulated for the life of the server. One millisecond per tick each. Then, with waves finally marching correctly, they reached the enemy nexus after six minutes and the game ended, taking the run with it.

What the bot learned, none of it in the reward: last-hitting, riding the wave’s edge, animation cancelling, timing the level-two spike, holding its ultimate, blinking in to finish. I played every checkpoint through the real client, 761 episodes in seventeen sessions. My share of the kills went from 42% against the first bot to 18% against the last, and it out-farmed me five to one in every session. Two findings came only from playing it: the bots had learned to fire R on sight, because inside a thirty-second episode there’s never a reason to hold a free global poke — an episode-design artefact, not a network one; and the checkpoint the ladder rated weaker for declining fights was the first one I couldn’t beat, because the scripted bot it was rated against never punished aggression and a human does. The strongest argument in the project for opponents outside the lineage.

The full report is here: observation and action design, the reward table, the gradient-noise measurements that set minibatch size (300–800 samples for the MLP, ~17,000 for the LSTM, which is also why Five’s batches were a million timesteps), the side-asymmetry fix, and a TrueSkill table over 36,502 games.

The simulator, September

Bottleneck
fidelity
Lesson
fidelity is a method, not a property — record, replay, diff to the first divergence.

The fleet’s ceiling was the engine itself: about 23,000 ticks a second box-wide however the servers were arranged. The 1v1 slice — movement on the navgrid, four spells, autos, vision, damage, death — is thin, so it was reimplemented in Python, compiled with numba, and held to the C# server frame for frame. Most of two days went on float32: trig from the same C library the runtime calls, the bridge’s decimal-text rounding, a squared float that promotes to float64 in numpy exactly as the engine’s arithmetic does, no fused multiply-add anywhere. The batched engine runs 22.5 million lane-ticks a second on the box, bit-identical to the reference; the trainer sustains about a million samples a second, fifty times the fleet, three hundred and sixty agent-years a day. A policy trained there for nine minutes, never having seen the C# engine, passed the server-trained reference on the bot ladder when carried back to the real server.

22.5Mlane-ticks a second on one box, bit-identical to the C# reference
~1Mtraining samples a second, fifty times the fleet
360agent-years of experience a day
9 minof simulator training to pass the server-trained reference
fastsim on one GH200.
The fleet256 servers, one GH200
12
OpenAI Five2018, self-play
180
fastsimone GH200
360
Years of game experience per day of training. One box running the simulator out-collects OpenAI Five's 2018 figure for a much smaller game slice: a 1v1 lane rather than full 5v5 Dota.

Then the laning version collapsed. It matched the server on every trace we had, and could not reproduce the run. Two bugs in bookkeeping the short clean traces never exercised: the game clock never reset, so creeps had been upgraded 213 times by rollout 3,000; and a reset drawn mid-cast froze a champion forever. The method that found those and ten more was the obvious one in hindsight — have the trained policy play on the real server, replay those traces in the simulator, diff to the first divergent frame, read the rule, fix, repeat. Twelve gaps in three days, among them update order by network id, turret timer phase, and a cast time that winds up to 0.10000001 s because the engine multiplies frames by 1/60 in 32-bit float. After the eleventh, every recorded self-play trace replays frame-exact, and a sim-trained checkpoint’s numbers on 24 real servers matched the simulator’s own ladder within noise.

And then the recipe still didn’t reproduce the run. Six replicas on progressively more exact engines all plateaued 45–60 Elo below the fleet’s checkpoint. The gap wasn’t fidelity: the fleet’s four PPO epochs had been harmless because sixteen asynchronous actors fed it varied batches, and in the simulator’s exact on-policy collection the same four epochs overfit each rollout. One epoch closed it. The opponent pool, it turned out, had never worked in any simulator run — every draw was the newest checkpoint at probability 1.00. Both were findable only by rerunning the experiment, and only affordable because a rerun now cost three hours instead of two weeks.

Where September ended

The best checkpoints in the project have never seen a server. The unit of experiment is an hour. And the method that makes an old server exact is mechanical enough to point at a new one.

What the policies actually compute, 29 September

Bottleneck
we knew what they did, not why
Lesson
probe grouped features, not columns — the policy reads redundancy as one signal.

In short

  • Both policies are HP-difference machines. Own HP is the retreat signal, and the critic is almost a linear function of the HP gap.
  • Same information, different heads. league5 is burst-when-ahead: its aggression lives in the ability head. league6 moved it into movement, holding the edge of auto range and kiting.
  • Distance is read as range flags, not a number.
  • Neither reads the race. Elapsed time and CS move no head by more than .01.
  • Method: perturb every column that encodes a quantity together; a single column reads as noise to the policy.

Two checkpoints, probed the same way: league5 v40000, the best kill-game agent (.771 on the real server against canon), and league6 v64400, the laning farmer (lane-win .826). Each played 512 mirror lanes against itself in the simulator, 1,500 decisions a lane, and every fourth decision of one side was recorded in full: the 496-column observation, both LSTM states, the 256-d latent, every head’s logits, the value, the action, the mask. 384k decisions per checkpoint.

Then response curves: replay 4,096 of those decisions with the LSTM context held fixed while one input is swept across its range, and watch what each head does.

  1. Record384k decisions per checkpoint from 512 mirror lanes: observation, LSTM state, latent, logits, value.
  2. FreezeSample 4,096 decisions and hold each one's LSTM context fixed.
  3. SweepWrite one quantity across 9 values into every column that encodes it.
  4. ReadAverage every head over the 4,096 replays: P(attack), expected move, value.
How a response curve is measured. The same recorded decisions are replayed at each sweep value, so any change in the output is caused by the swept input alone, with everything the memory carries held constant.

The first thing the sweeps taught was how to sweep. Changing a single column — rel.dist, or opp.hp_frac — does nothing; a flat line. Change every column that encodes the same quantity together (opponent HP also moves the HP difference and the opponent’s unit-set slot; distance rescales the bearing, the in-range flags and the slot) and the policy wakes up. The network has learned that these inputs agree and reads them as one signal, so a single-column perturbation is just noise it ignores. The grouped curves are the ones to trust.

Sweeping one column vs sweeping the group. Changing only opp.hp_frac or rel.dist leaves P(attack) flat. Writing the same value into every column that encodes it (the HP difference, the opponent's unit slot, the range flags) makes the policy respond. Shaded: inside auto-attack range (600 u) and Q range (1,150 u). Switch checkpoints with the buttons; hover for values.

What they read.

  • Own HP is the retreat signal. Set it to zero and P(attack) falls from .27 to .08 (league5) and .20 to .05 (league6); the expected move swings from −45 u/decision to −265 u, and from −25 to −368 u, away from the opponent. The value head is nearly linear in it, +0.6 at full to −2.7 / −3.4 at zero.
  • Opponent HP turns league5 into an executioner. P(attack) .17 at full opponent HP → .69 at zero, with the move flipping toward them. league6 answers the same signal with positioning — the move goes −103 u → +86 u — and barely changes its attack rate (.15 → .23). Same information, different head.
  • Distance is read as range flags, not a number. Inside auto-attack range league5 attacks at .33–.39, league6 at .13–.15. Just outside AA range and inside Q range, both go quiet. Far away, P(attack) rises again to .30 — because an attack order on a distant target is a walk-in: the engine chases, so “attack” is “move”.
  • league6 kites harder. At point-blank its expected move is −308 u against league5’s −119 u: attack order, step back while the timer runs. This is the kiting loop that was visible on screen, now in numbers.
  • A Q on cooldown makes league5 attack more — .23 → .42. The policy has learnt that Q and autos compete for the same window; when Q is gone it commits to autos. W likewise (.23 → .34). E and R cooldowns move nothing on the ability head.
  • R is priced by the critic and ignored by the actor. Own R off cooldown: value .19 vs .07. Opponent R up: .03 vs .09. The value head knows what the ultimate is worth; the policy head never acts on it at these decision points.
  • The race features are inert. Elapsed time, CS difference, own CS: none moves any head by more than .01. These checkpoints were trained on kill-decided fights and never learnt to read the race — which is exactly the farming-drift problem from the other side.
Response curves for both checkpoints. Rows are the swept input, columns are the head being read, and each column shares one y-axis. Every point averages 4,096 replayed decisions; nine points per curve. Own HP, opponent HP and distance are grouped sweeps; Q cooldown and elapsed time sweep a single column. Hover a panel to read the whole row.

The target head. The fourth head picks a unit slot by attention over the unit-set keys; it’s consulted on about a quarter of decisions, usually with one legal target. A linear readout of the creep logit on the twelve slot fields puts the largest weight on HP per auto-attack (−3.3 / −4.5): fewer autos to kill, higher logit. The argmax agrees with “lowest HP fraction” on ~60% of creep attacks and with “nearest” on only 40–44%. league6 adds recency — a creep that just lost HP is preferred (weight +3.7 vs league5’s +0.4), so it keeps hitting what its wave is hitting, which is closer to real last-hitting. Neither times last hits: only 15–17% of creep attacks land on a creep that dies to one auto, and the mean HP/AD of the pick is 0.8 — several hits away. They farm by attacking low creeps early, not by finishing them.

What the target head attends to. Top: weights of a linear fit of the creep-slot logit on that slot's fields (R² 0.15 for league5, 0.12 for league6; fields that are constant over these rows are omitted). HP change is current minus previous HP as a fraction of max HP, so a creep that has just been hit has a negative value. Bottom: share of creep attacks on which a simple rule picks the same creep as the head.

What it says about the two policies. Both are HP-difference machines, and the critic is almost a linear function of it. league5 is burst-when-ahead: its aggression lives in the ability head. league6 moved its aggression into the move heads: lower, flatter attack rate, movement responses two to three times larger — it fights by holding the edge of auto range and kiting, which is why it finishes fewer episodes and wins more of them. Spells are nearly vestigial in the mirror; W, E and R sit below 1% everywhere.

Caveats

The LSTM state is frozen during a sweep, so anything the memory decides over several decisions is invisible here, and the grouped sweeps can set the features consistently but can’t rewrite what the context remembers. The dataset is mirror play from lane start. And the target-head fit is linear over a bilinear attention, so a low R² is expected.

What came out of it was a to-do list rather than a conclusion: activation patching between low-HP and full-HP decisions to locate the retreat circuit; linear probes on the LSTM for “time since I last attacked”; a sparse autoencoder over the 768k latents. All three ran in October on the modern-patch agents, and that’s Part 3’s story.

What it adds up to

Five years to a working loop. Five months, from the April fork, to a simulator that beats its author and predicts the real server within noise. The constraint was never the game tree, and it was never the network — a 256-unit LSTM is enough for a lane. It was the cost of a game step, and that cost is now an engineering number that fell by orders of magnitude in one week of work.

So now we have a method for massively accelerating simulation throughput, however, what if we don’t have the game servers source code? In Part 3, we will run the same loop against the modern version of the game, with a twist.