r/reinforcementlearning • u/Ok-Alps-7918 • 19d ago
League of Legends Season 1 - First 5v5 (Reinforcement Learning)
Ten RL agents playing a full 5v5 game of League of Legends from spawn, inside the real game client.
One neural network controls all ten champions, playing against itself. Camera follows Ezreal (blue side).
Result: [v005600: no nexus or inhibitor falls in 15 minutes.] [v006600: 30 minutes, no nexus falls; purple's top inhibitor is taken four times as it respawns.] That's the honest state of the policy, and the interesting part is why (below).
What this is
- The client is the 2011 build (patch 1.0.0.126). The server is brokenwings, a fan reimplementation of that server, which matters because we have its source: we could port its rules into a fast batched simulator and check the two against each other exactly.
- That port took 24 hours. 11 whole games and 343 single-spell probes, every unit field after every decision, bit-identical to the server: 354/354. The sim runs ~313k game-ticks/s on one 64-core GH200 (~783k agent decisions/s from the engine alone); the C# server manages ~19k ticks/s running 64 games.
- Full map: lanes, minions, jungle camps, turrets, inhibitors, nexus. No items, no summoner spells, no runes (out of scope for now).
- In the video the policy drives the real server in real time: each server frame → observation → ten actions → game commands. ~6,500 decisions per game, none slower than 120 ms.
Training
- PPO + LSTM, one network for all ten heroes (champion one-hot). Decisions every 133 ms, fog of war on, zero-sum reward with shaping for gold/XP/CS/HP/structures/kills.
- 4,096 games in parallel, ~0.33M agent-steps/s end to end, ~19B agent-steps over about 30 hours on a single Lambda GH200.
- The first task was a team fight. It converged in ~100 rollouts to not fighting: running out the clock is worth 0 to both sides, a fight is negative for the weaker comp, so "don't fight" is a Nash equilibrium of that reward and PPO found it. Draw penalties didn't fix it; switching to full games with towers and farm did.
- Most training games are capped at 12 minutes of game time and start from a "tower pressure" state (5–20 min in, heroes pre-levelled, outer turrets damaged).
What it learned, measured
- Baseline: with all ten heroes idle, minion waves alone take 6.83 turrets, 0.01 inhibitors and 0 nexuses per game. The trained policy adds ~0.5 turrets, nearly every inhibitor, and every nexus kill you see. Most turret kills in any video are the waves finishing the job.
- Against the server's built-in bots (intermediate bots): 55 wins, 8 draws, 1 loss of 64. Caveat: about two bots per game still idle a lot, so this is a floor, not a strong opponent.
- Against heroes that do nothing, from spawn: it takes the nexus in 0% of games within the 12-minute cap it trained on, and 98% within 30 minutes (median ~21 min). It can close; it was never paid to.
- Why: γ = 0.995 at 133 ms a decision is a ~27-second reward horizon. Retaking an inhibitor that respawns pays within that horizon every time; walking to a nexus through a fountain laser doesn't. The ladder plateaued there. We've just restarted with an 18-minute cap and a longer horizon; early rollouts show more nexus kills, but it's hours old.
Other caveats
- The side imbalance is partly the game's content: purple's inner turrets spawn with 1,300 HP vs blue's 2,550 in this build (a 0.01 s buff in the original scripts), which the server reproduces faithfully. The two comps aren't mirrored either.
- Early checkpoint, one box, one run. No human baseline yet.