AlphaDefect Crushes Slay the Spire 2 With an 80% Win Rate
A PPO-trained agent wins up to 80% of runs at Slay the Spire 2's highest difficulty, where human players manage just 11 to 20%.
Takeaways
- AlphaDefect wins 62-77% of Ascension 10 runs greedily, 68-80% with test-time search.
- Human players win just 11-20% of uploaded runs at the same difficulty.
- One PPO network per character handles every in-run and out-of-combat decision.
- Training ran for 1.3 to 6.7 billion decisions per character across six classes.
- Removing learned card/relic/enemy embeddings drops the win rate to zero.
- Source code is released via the first author's page; covers six STS2 characters.
Researchers have released AlphaDefect, a reinforcement learning agent for Slay the Spire 2. On Ascension 10, the game’s hardest difficulty, it wins 62% to 77% of runs across six characters when acting greedily and 68% to 80% with test-time search. Uploaded human runs from players of all skill levels have win rates of 11% to 20% at the same difficulty.
| Player or mode | How decisions are made | Win rate |
|---|---|---|
| Uploaded human runs | Players of all skill levels | 11% to 20% |
| AlphaDefect, greedy | Chooses the policy’s highest-ranked legal action | 62% to 77% |
| AlphaDefect, search | Uses additional computation to evaluate choices during play | 68% to 80% |
The result matters beyond this game because AlphaDefect combines a standard reinforcement learning algorithm with a carefully structured representation of cards, relics, enemies, and visible game state. Its strongest gains appear tied to that representation, although training still requires billions of decisions for each character.
Delayed rewards make every card choice count
Slay the Spire 2 is a single-player roguelike deck-builder in which each run links card rewards, relics, shops, map routes, and combats across several acts. Random card draws, map layouts, encounters, and rewards force the player to plan without knowing the exact sequence ahead.
An early card choice can determine whether a deck survives a boss many fights later. Reinforcement learning systems must connect that eventual win or loss to decisions made much earlier, a problem known as credit assignment. The long delay and heavy randomness make it difficult to identify which choices caused the outcome.
Earlier agents, including search systems such as Spire Mentor and policies from Chen and Xie, were evaluated on the original Slay the Spire or on different game versions and protocols. Those results provide historical context rather than a controlled benchmark. The AlphaDefect authors describe their system as the strongest publicly reported Slay the Spire 2 agent as of November 2026.
One policy handles the whole run
AlphaDefect trains a separate neural network for each character using proximal policy optimization, or PPO. Map navigation, card rewards, shop purchases, relic choices, and combat actions all flow through the same policy.
PPO is a policy-gradient algorithm that updates an agent while limiting how far each new policy moves from its predecessor. That constraint helps stabilize training over long sequences of randomized decisions. During greedy evaluation, the network selects its highest-ranked legal action. Test-time search spends additional computation evaluating candidate choices before acting.
The observation design carries much of the system’s game-specific engineering. Each card, relic, and enemy becomes an entity record containing a learned identity embedding and attributes drawn from game data. The engine also supplies consequences computed from public state, such as expected damage associated with an enemy’s visible intent.
These records give the policy consistent inputs across very different decision types. A card’s identity, cost, effects, upgrades, and current context can influence combat choices through the same model that evaluates rewards or purchases.
Entity encoding drives performance
Ablation tests show that the representation is central to the reported results. A version without entity identities failed to win a run, indicating that the trained policy depends on recognizing specific cards, relics, and enemies.
Removing the engine-computed consequences reduced the win rate by 8.3 percentage points. Those derived features spare the network from reconstructing every implication of visible state during training, while keeping the inputs grounded in information available to a player.
Each character consumes billions of decisions
Training each character required between 1.3 billion and 6.7 billion decisions. The six separately trained characters are the Defect, Regent, Silent, Fool, Ironclad, and Necrobinder. The learning-curve figure includes runs labeled with game versions v0.111.0, v0.113.0, and v0.113.1, while the reported evaluations cover two versions current in November 2026.
Evaluation uses test seeds held out from training. A seed fixes elements such as card offers, enemies, and map structure, so separating training and test seeds reduces the chance that the agent succeeds by memorizing favorable runs.
Techniques developers can reuse
- Unify decision types. A common observation and action interface allows one PPO policy to handle navigation, rewards, purchases, and combat within a character’s run.
- Encode named entities. Learned embeddings let the policy distinguish cards, relics, and enemies whose strategic value extends beyond generic numerical attributes.
- Derive features from public state. Engine-computed consequences can expose useful implications of visible information without granting access to hidden state.
- Add inference-time planning. Search improves the trained policy by roughly 3 to 8 percentage points, depending on the character.
- Hold out procedural seeds. Seed separation provides a cleaner test of generalization in deterministic, procedurally generated environments.
The headline comparison has limits
- Training produces a separate network for every character, leaving cross-character transfer unreported.
- Interaction counts reach billions per character, making the method data-intensive even before hardware and wall-clock costs are considered.
- The human baseline aggregates uploaded runs from players of all levels, leaving direct comparison with top-ranked players unresolved.
- Prior agents used different games, versions, seeds, and evaluation protocols, so cross-system rankings remain approximate.
- Performance depends on specific game versions, which matters for a title whose cards, balance, and mechanics can change during development.
Code and authors
The first author’s release announcement says the source code is available from the lead author’s page. The paper lists Qiyue Chen, Taian Yu, Junpei Komiyama, and Haobo Huang as authors.