Superhuman AI for Generals.io Using Self-Play Reinforcement Learning
summary
The gist
The gist The agent reaches superhuman play for GENERALS.IO, an RTS game requiring both longhorizon planning and short-term tactics under strong imperfect information, by using a JAX-native simulator
In short
The agent achieved superhuman play in GENERALS.IO, an RTS game with imperfect information, by using a transformer policy trained end-to-end via self-play reinforcement learning. It combines spatial patches with temporal tokens to plan long horizons and execute short-term tactics effectively.
Key concepts
- JAX-native simulator
- A custom simulation engine built using JAX that allows the agent to run the game at extremely high speeds, reaching tens of millions of frames per second on a single GPU. This removes data bottlenecks, enabling fast, end-to-end training pipelines.
- Transformer Torso
- The agent's policy uses a transformer architecture. It processes spatial patches from the game view and combines them with temporal tokens that summarize the opponent's army and land count over a recent history of 512 steps to understand strategic context.
- Top-Advantage Filtering
- A technique used during training to improve sample efficiency. Instead of using all transitions, only the top 25% of rollouts from each batch, ranked by the critic's predicted advantage score, are kept for further learning.
Terminology used across episodes
This episode discusses
- Superhuman AI for Generals.io Using Self-Play Reinforcement Learning · Paper Radio
- Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm
- Dota 2 with Large Scale Deep Reinforcement Learning
- Deep Reinforcement Learning from Self-Play in Imperfect-Information Games
- Reevaluating Policy Gradient Methods for Imperfect-Information Games
- Scalable Decision Making for Games of Imperfect Information · Paper Radio
- Artificial Generals Intelligence: Mastering Generals.io with Reinforcement Learning
- Proximal Policy Optimization Algorithms
- Stop Regressing: Training Value Functions via Classification for Scalable Deep RL
The paper
Superhuman AI for Generals.io Using Self-Play Reinforcement Learning · Read on arXiv
Matej Straka, Viliam Lisıy, Martin Schmid
Department of Applied Mathematics, Charles University · Department of Computer Science, Faculty of Electrical Engineering, Czech Technical University in Prague · EquiLibre Technologies, Inc.
We present a superhuman AI agent for Generals.io, a real-time strategy game that combines long-horizon planning, imperfect information, and combinatorially large state and action spaces. Much prior work on large games relies on heavy machinery such as leagues of past opponents, reward shaping, and human data. We instead train a transformer policy with plain policy-gradient self-play on the sparse win/loss reward, and carefully ablate which ingredients carry the performance: an exponential moving average of the parameters is consistently the stronger deployment policy, and training only on the highest-advantage samples halves the cost of a training iteration. With seven days on four GPUs the agent reaches superhuman play: it ranked first in all ten weekly standings of a two-month deployment on the public 1v1 ladder, and it beat the two strongest humans 189-67 and 32-18. We also release a JAX-native simulator that reaches over 40 million frames per second on one GPU.
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: We're looking at the paper: "Superhuman AI for Generals.io Using Self-Play Reinforcement Learning".
Jane: Here's the gist of the paper. The gist The agent reaches superhuman play for GENERALS.IO, an RTS game requiring both longhorizon planning and short-term tactics under strong imperfect information, by using a JAX-native simulator and a transformer policy trained end-to-end with sparse win/loss reward <ref:2606.23348#pg2> How it works The core of the agent's training involves a self-play reinforcement learning loop utilizing Proximal Policy Optimization (PPO) <ref:2606.23348#pg6>.
Tom: The training objective is defined by the loss function L(θ) = −J(θ) − α H(πθ) + β Lvalue(θ), which combines the on-policy policy-gradient surrogate J(θ), an entropy bonus H(πθ), and a value-function loss Lvalue(θ) <ref:2606.23348#pg4>.
Jane: To ensure stability, the paper employs an exponential moving average (EMA) of policy parameters, which is found to be "consistently the stronger deployment policy" than the last iterate <ref:2606.23348#pg6>.
Tom: Furthermore, top-advantage filtering is used by keeping only the "top 25% of transitions from each rollout batch, ranked by the critic’s predicted advantage" to improve sample efficiency <ref:2606.23348#pg8>.
Title and authors: Tom: So we're diving into this paper titled "Superhuman AI for Generals.io Using Self-Play Reinforcement Learning". It’s about an AI agent that gets superhuman performance in a real-time strategy game called Generals.io, which is a game that needs both long-term planning and quick tactical moves while there’s not much information about what the other player is doing <ref:2606.23348#pg1>.
Jane: It sounds like this paper presents an AI that learns to play a complex game where you have to plan ahead for the whole match while also reacting quickly to immediate threats, all under conditions of imperfect information <ref:2606.23348#pg1>. What does that mean for someone just watching a video of the game?
Lu: It means they're developing an agent capable of handling the strategic depth required for these kinds of games, which usually requires more than just smart short-term moves <ref:2606.23348#pg1>. This isn't just about reacting; it’s about figuring out how to manage resources and anticipate where the opponent will be next <ref:2606.23348#pg1>.
Meng: For us in production, that implies an AI that can handle a lot of complexity, which is hard when the environment isn't perfectly known <ref:2606.23348#pg1>. We see a lot of this stuff fail because it gets overwhelmed by the sheer number of possibilities <ref:2606.23348#pg1>.
Lalam: I see this paper focuses on training an agent to reach superhuman play in Generals.io, and the core idea is using self-play reinforcement learning for that goal <ref:2606.23348#pg1>. It sets out to create a system that learns by playing against itself and improving its strategy through that process <ref:2606.23348#pg1>.
The paper's summary: Tom: Okay, so the summary of "Superhuman AI for Generals.io Using Self-Play Reinforcement Learning" is that they trained their agent for four days using four NVIDIA H200 GPUs and it reached #one on the public leaderboard of over five thousand human players <ref:2606.23348#pg1>. They also mention that a main enabler of this was a JAX-native simulator that can run at tens of millions of frames per second on just one GPU <ref:2606.23348#pg1>.
Jane: Tens of millions of frames per second is fast; that’s what lets the training happen so quickly, which is important when you’re using self-play reinforcement learning <ref:2606.23348#pg1>. So, the summary points out that they used a policy-gradient loop combined with sparse win and loss rewards to train this vision transformer policy end-to-end <ref:2606.23348#pg1>.
Lu: The use of a vision transformer policy trained end-to-end is interesting because it suggests the agent learns to process the game state in a way that combines spatial information with temporal context, which is key for RTS games <ref:2606.23348#pg1>. It's about how it represents what’s happening on the grid over time <ref:2606.23348#pg1>.
Meng: Training end-to-end with sparse rewards is tough because you don't get feedback often, but if it works, that means the agent learned a really good way to navigate those sparse signals <ref:2606.23348#pg1>. I wonder how stable that learning process actually is when you're only getting those occasional win or loss signals <ref:2606.23348#pg1>.
Lalam: The summary emphasizes that they used a policy-gradient loop and sparse win or loss rewards for training the vision transformer policy, which is how they achieved superhuman performance in Generals.io <ref:2606.23348#pg1>. It’s the core recipe they used to get that result <ref:2606.23348#pg1>.
The paper's improvements: Tom: Now, this paper points out several things they did to make their method better, and one of the key improvements is using an exponential moving average of policy parameters instead of just the last iterate <ref:2606.23348#pg6>. They claim that this EMA is "consistently the stronger deployment policy" than just taking the last update <ref:2606.23348#pg6>.
Jane: So, if you’re deploying this agent after training, they suggest using an exponential moving average of its policy parameters instead of just using the very last set of weights from their training run <ref:2606.23348#pg6>. That’s a practical tip for getting better results when you put the model into action <ref:2606.23348#pg1>.
Lu: And they also used top-advantage filtering, where they keep only the top twenty-five percent of transitions from each rollout batch, ranked by the critic’s predicted advantage to improve sample efficiency <ref:2606.23348#pg8>. That means they aren't training on every single game outcome; they are focusing their learning on the most impactful moments <ref:2606.23348#pg1>.
Meng: Improving sample efficiency is crucial because collecting data in these complex environments is expensive, and filtering down to the top twenty-five percent of advantage seems like a smart way to manage that cost <ref:2606.23348#pg1>. But I have to ask, does this filtering method risk discarding some subtle but important learning signals we might miss <ref:2606.23348#pg1>?
Lalam: The paper also mentions a spawn-distance curriculum, which is a technique where they gradually raise the minimum distance between generals over training, moving from small distances to covering the whole game distribution <ref:2606.23348#pg6>. That helps ensure they learn to capture the opponent's base rather than just relying on sparse win or loss signals <ref:2606.23348#pg1>.
Conclusion: Tom: So, to wrap up "Superhuman AI for Generals.io Using Self-Play Reinforcement Learning," we see that using a JAX-native simulator, training end-to-end with policy gradient and sparse rewards, plus things like the EMA and top advantage filtering really leads to superhuman results against both humans and prior state of the art bots <ref:2606.23348#pg1>.
Jane: The main implication for us is that policy-gradient methods can actually scale up to games with long horizon planning, even those with strong imperfect information, provided you have a good simulator and smart training techniques <ref:2606.23348#pg1>. It shows that the approach works when you combine the right architectural choices like the transformer torso and careful training objectives <ref:2606.23348#pg1>.
Lu: From a research standpoint, they show that self-play with this specific setup can outperform other methods in this domain, which is significant for understanding how these algorithms learn complex spatial and temporal dynamics <ref:2606.23348#pg1>. It pushes the idea that these methods can handle the strategic complexity of RTS games <ref:2606.23348#pg1>.
Meng: I think what matters for us is how this translates to actual deployment; they've shown a path to building agents that can operate at a high level in real-time strategy environments <ref:2606.23348#pg1>. But we still have the question of running this type of setup at scale and what breaks when you move beyond these controlled training scenarios <ref:2606.23348#pg1>.
Lalam: The paper "Superhuman AI for Generals.io Using Self-Play Reinforcement Learning" concludes that policy-gradient methods can scale in large games <ref:2606.23348#pg1>. It points toward future work looking at how these methods handle different game formats like 2v2 and free-for-all play <ref:2606.23348#pg1>.
Tom: That sounds like the next frontier, exploring how this works in less controlled situations, which is where we need to be watching for the next papers <ref:2606.23348#pg1>.
More episodes
- 2605.17429-Radial-Angular Geometry for Reliable Update Diagnosis in Noisy-Label Learning
- 2605.18170-Buffer-Parameterized Machine Learning Surrogate Models for Cross-Technology Signal Integrity Analysis and Optimization
- 2605.21783-Certifying Whether to Adapt: Baseline-Relative PAC-Bayes-MMD Guarantees for Test-Time Adaptation
- 2605.23395-Convex Compositional Reasoning Models
- 2606.02398-Local Conflict, Targeted Repair: A Perturbation Analysis of Multi-Domain RL
- 2606.07845-Reward and Behavioral Measures of LLM Coordination in Dining Philosophers
- 2606.22304-Encoder-Decoder Manifold Alignment for Idempotent Generation
- 2606.26189-Clue-Guided Money Laundering Group Discovery
- 2606.26473-When Does Quality-Aware Multimodal Fusion Matter? A Leakage-Safe Diagnostic for Decision-Level Dependence
- 2606.26617-Compute Allocation in Bilinear Contrastive Representation Learning via Scaling Laws