NetHack+: a configurable environment for long-horizon agent research
At first glance at research on NetHack, one might wonder why so much of it looked at training rewards and methods, when the bitter lesson would suggest that the biggest lever is scaling data. Taking a deeper dive, you find that the data within NetHack is practically unusable: high-quality human data is unlabeled, and because current agents play so poorly, their data isn’t very useful either. One such work estimates that even 100 times the current data would likely raise the score by only about 10%.
But why is data the limitation in a small video game that we can simulate? Why haven’t we generated as much data as we want, to scaffold models into producing high-quality data? This work figures out how to get higher-quality data.
Limited visibility into the game and outdated research platforms have made it hard to develop intuition for what high-quality data looks like, so we first release NetHack+, a rewritten game engine that replaces NLE and gives us one research platform, with integrations into Prime Intellect’s Verifiers, Gym and PufferLib.1
We provide the capability to evaluate models with modern or custom harness: compared with BALROG’s, ours raises the median scores of the models we tested by 13 to 38% while cutting the cost by 7 to 92×. We additionally provide a new metric BALmin to mitigate reward-hacking behavior that we identify while running our evaluations.2
We also introduce Prime-Agent-Explore, a new algorithm in the spirit of AlphaZero that leverages MCTS ideas to increase data quality. With matched compute, it beats keeping the best of k independent lives by 1.6× at k = 5 and 2.8× at k = 30.
Finally, when we train on this data, we see an improvement over normal training: adding Prime-Agent-Explore traces to the bot games used to fine-tune a behavior-cloning policy raises its mean BALmin from 0.37% to 0.91%, 38% higher than adding the same amount of single-life language-model games.
In summary, we take on three problems with how NetHack agents are evaluated:
- The harness. BALROG's harness gives a model raw keys and a short history, so its leaderboard measures that harness as much as the model. We built a sandboxed harness around NetCore, a small set of skills such as pathfinding and exploration. We also give the model its full trace instead of the last 16 observations and let it play through any agent harness, such as Claude Code or Prime Agent.
- The engine. NLE holds one game per process, since a game built in the 1980s was never designed to run several games at once, and it cannot save or restore a game or change how the game is set up. We gathered the game's global variables into one struct per game, so one process now holds many games, saves and restores are very fast, and settings such as fog of war, locked doors and where monsters spawn can be changed, as described in the appendix.
- The metric. BALROG's score rewards depth on its own, so diving looks like progress, and we therefore report a balanced version, BALmin, next to it.
- Prime-Agent-Explore. Beyond the score itself, we want to know whether an agent can turn more compute into more progress, since good play is exactly the data NetHack has always lacked. Prime-Agent-Explore saves checkpoints as the game progresses, and when the agent dies, an orchestrator chooses a checkpoint to resume from and writes a high-level plan for the next life. With 30 attempts, Prime-Agent-Explore improves GLM-5.2 from 1.32% BALmin on a single life to 11.38%, while keeping the best of 30 independent lives, each started from the beginning of the game, reaches only 4.15%. With 15 attempts, removing either the choice of checkpoint or the plan does the same as, or worse than, the best@15 independent lives, but combining them reaches 9.53%.
Background
Video games have long been machine learning benchmarks, from chess and Go to backgammon and Pokémon. In the last year language models have reached human level at Pokémon battles, Baba Is AI, and several games in the BALROG benchmark suite for LLM game agents, and much of that progress came from the harness around the model (its memory, tools and skills).
NetHack, first released in 1987, is one of the most difficult and longest-horizon video games: the goal is to descend around 50 dungeon levels, pick up the Amulet of Yendor and bring it back up to the surface, all without dying, and only 1.8% of the 46,796 human games (NetHack Learning Dataset) end in a win. Furthermore, games range from 30,000-50,000 moves, giving NetHack an incredibly long-horizon game as well. NetHack is considered so hard that a running joke in the community defines AGI as an agent that can solve it. Ever since then, however, progress on the full game then stayed largely dormant, and the hand-written bot that won the challenge remained the strongest agent until this September. 3
On the standardized BALROG NetHack leaderboard, most frontier models score under 4% on their progress metric, and the best entry, GPT-6 Astra, reaches 13% at about $100 a game.
All entries as a list
- Jun 2020 In June 2020, the NetHack Learning Environment wrapped NetHack 3.6 as a gym environment that ran at about 14,400 steps per second, which made it one of the fastest rich environments of its time.
- Sep 2021 MiniHack used NetHack's level language to build small custom tasks. Agents have since largely solved them, without that transferring to the full game.
- Dec 2021 At the NeurIPS 2021 NetHack Challenge, after 631 submissions, the hand-written bot AutoAscend won with a median score of 5,300, nearly three times the best neural entry, and no agent came close to finishing the game.
- Nov 2022 The NetHack Learning Dataset released 10 billion transitions from 1.5 million human games and 3 billion from AutoAscend, which made imitation learning possible at scale.
- Jun 2023 Imitation learning with hierarchy and more compute improved neural agents (Piterbarg et al., Tuyls et al.), but symbolic bots still led by more than four times in median score.
- Sep 2023 Motif used Llama 2's preferences over game messages as a reward and beat an RL agent trained on the score itself, an early sign that a language model's knowledge of the game could help.
- Mar 2024 NetPlay gave GPT-4 a library of interruptible NetHack skills. It played sensibly but averaged a score of 285, against AutoAscend's 11,342.
- Nov 2024 BALROG made NetHack one game in a standard LLM benchmark. The best model at launch reached 1.6% on its progress metric, and the leaderboard has since climbed to 13.2% (GPT-6 Astra, September 2026).
- Aug 2025 Scalable Option Learning trained hierarchical RL agents on 30 billion frames of NetHack, at about 35 times the throughput of earlier hierarchical methods.
- Jan 2026 Glyphbox let a model write Python against the game, and GPT-5.2's best run reached dungeon level 10.
- Apr 2026 An ICLR 2026 blog post argued that NLE's interface hides menus, inventory and attributes that an agent needs.
- Sep 2026 In September 2026, an RL agent trained with PufferLib reportedly passed AutoAscend's challenge score, five years after the challenge.
- Sep 2026 A week later, GPT-6 Astra ascended on a public server after 37,140 turns, on its third attempt, in a harness it built for itself with a human's help.
- Oct 2026 This post: an engine that holds thousands of games per process and forks them in microseconds, a sandboxed harness with interruptible skills, and a search algorithm that turns more compute into more progress.
Gameplay
Because NetHack+ turns constants that are hard-coded in NetHack into settings, the same seed can be generated with smaller rooms, more traps or locked doors, or played with faster monsters and the whole map revealed. Figure 4 steps through the values of ten of these settings on one seed, rendered by the WebAssembly build of the engine that also runs in your browser (Figure 3), where a game can be played, undone and restored live.
Metrics
Because NetHack’s real reward, ascending, is almost never attained by bots, many NetHack papers have presented their own progress metric, and the standard one comes from BALROG, as defined below.
where \(d\) and \(x\) are the maximum dungeon level (Dlvl) and experience level (XL) attained across a rollout, and \(p_d(d)\) and \(p_x(x)\) are the human-derived progression mappings from BALROG, which estimate the probability of eventual ascension among human games that reach dungeon level \(d\) or experience level \(x\), respectively. We denote this metric BALmax.
As seen in Figure 5, every model we evaluate reaches dungeon levels 5 to 8 on average at only experience level 2 to 3, whereas winning human players gain experience as they descend.
We find that human games that spend more than 20% of their time with a 3% lead for dungeon level over experience level have a win rate 70% lower than human games that spend the same share with experience level ahead (3.9% versus 13.1%). To avoid rewarding this behavior, we instead propose the BALmin equation, which takes the minimum of the dungeon level and experience level score, akin to maxi-min game theory metrics.
We therefore present BALmin as a more conservative metric than BALmax that cannot be increased by descending alone while remaining predictive of ascension.
Evaluation Results
To re-benchmark models from the BALROG suite, we evaluate GPT-5.6 Sol, GPT-5.6 Luna, Gemini-3.7 Flash, Qwen-3.8 Max and GLM-5.2 on five fixed seeds with three runs each. Each model plays with the Prime Agent harness, equipped with NetCore, our set of eight skills: explore, pathfinding, fight, kick, apply an item, rest, pray, and press a raw key, plus an observe call that returns the full map and inventory without spending game time. One skill call can run for up to 100 game turns, but it hands control back whenever a decision is needed (a level change, a nearby hostile, a sharp drop in HP or food about to spoil), and it never answers a game prompt for the model. A game ends when the hero dies, and we show both harnesses playing the same seed below (Figure 6).
Because so little progress has been made on the full game, we choose our default settings to reduce perception and control difficulties in NetHack, enabling evaluations to focus on the long-horizon decisions. Specifically, we turn fog of war off and always list the inventory and the visible monsters when returning observations. We report fog-of-war results separately where we have them.
Ours vs. BALROG's Harness
How much progress can we gain by switching to our harness? We evaluate three models in both BALROG's harness and ours within our game engine, NetHack+, with full vision. Ours scores higher for all three models on both metrics, at 7–92× lower cost per game.
| Model | Median BALmin | Median BALmax | Cost per game | |||
|---|---|---|---|---|---|---|
| BALROG | Ours | BALROG | Ours | BALROG | Ours | |
| DeepSeek V4.1 Flash | 1.81 | 2.25 | 2.27 | 6.66 | $0.99 | $0.03 |
| GLM-5.2 | 1.75 | 1.97 | 2.42 | 5.90 | $82.61 | $0.90 |
| Gemini 3.1 Pro | 1.75 | 2.42 | 2.42 | 12.56 | $75.49 | $10.87 |
Table 1. BALROG harness versus ours. Single-attempt evaluations inside NetHack+ with full vision. BALmin and BALmax are in %, and cost is the mean per game in USD. Bold marks the better configuration.
We find that these advancements stem from a reduction of LLM turns from 3,465 to 194 per game on average across the three models. However, despite these coarser actions, our agents also descend much faster, spending 124 in-game turns per dungeon level reached against 1,036 in BALROG’s harness, a net decrease of 88% actions.
Agent Gameplay versus Human Gameplay
Figure 7 compares, for each agent, the median BALmin of the runs still alive against game turns, next to the median of 433 winning human games from NLD. While they are alive, single lives keep roughly the pace of winning players, but they die by 2.0 to 2.9%, about where a winning player is around turn 2,000 (2.4%). Our new algorithm, Prime-Agent-Explore, keeps pace with winning players for the first 2,000 turns or so and then falls behind, reaching 6.0% at 10,000 turns against their 11.7%.
| Agent | n | BALmin mean | median | BALmax mean | Dlvl | XL | median run beats % of human games |
|---|---|---|---|---|---|---|---|
| Humans (NLD) | 46,796 | 5.41 | 2.12 | 8.05 | 6.48 | 5.04 | – |
| GPT-6 Astra, BALROG harness, fog of war | 5 | 4.03 | 3.69 | 13.24 | 9.80 | 5.20 | – |
| Gemini-3 Pro, BALROG harness, fog of war | 5 | 1.84 | 1.54 | 6.77 | 5.60 | 3.40 | 30.9 |
| GLM-5.2 | 15 | 1.32 | 1.85 | 9.96 | 8.00 | 2.33 | 41.6 |
| GPT-5.6 Sol | 15 | 1.65 | 2.08 | 5.28 | 6.47 | 2.67 | 45.3 |
| GPT-5.6 Luna | 15 | 1.50 | 1.85 | 3.79 | 5.53 | 2.27 | 41.6 |
| Gemini-3.7 Flash | 15 | 1.47 | 1.85 | 9.80 | 8.33 | 2.20 | 41.6 |
| Qwen-3.8 Max | 15 | 1.74 | 2.12 | 4.56 | 4.73 | 3.40 | 52.4 |
Prime-Agent-Explore
Because NetHack+ checkpoints and restores games in constant time, we can additionally evaluate the performance of language models when we provide them with a simulator for NetHack. Inspired by the perspective of Go-Explore, we hope, in the long run, to leverage the play of models with simulators to train models that play without one.
To this end, we create Prime-Agent-Explore, which saves checkpoints periodically throughout standard play and, upon timeout or death, allows an orchestrator to restore one of them and continue playing from it. Much like AlphaZero, it pairs a learned model with search, in that the language model decides what to do, classical planning in NetCore's skills (such as A* pathfinding) carries it out, and the orchestrator's choice of checkpoint turns repeated attempts into a tree search over game states.
Procedure
We save a checkpoint every 20 model calls during play, whenever the dungeon level or experience level changes, and whenever the agent calls a save skill. Between attempts, an orchestrator reads a summary of the last attempt and the list of every checkpoint (depth, experience, health, hunger, score), picks one to resume from, and writes a short plan for the next attempt. Checkpoints are files written with NetHack's own level and save formats plus the state the refactor made visible, so an attempt resumes in a fresh process. The in-memory fork is meant for algorithms that branch thousands of times, whereas this one branches only a few dozen.
Search makes it easy to cheat without meaning to, so we limit the information passed between attempts. A resumed agent gets the conversation that led up to its checkpoint, a summary of the last attempt and the orchestrator's plan. It sees nothing from attempts that branched elsewhere, meaning no other traces, death causes or item positions. We also don't restore the random number generator, so that the orchestrator can't memorize what a seed will do. (In the released version, a resumed agent starts with fresh memory instead.)
Orchestrator Example
As an example of the orchestrator's choices, in one run attempt 9 reached dungeon level 10 at experience level 7 and died there under-leveled. The orchestrator then turned down the deepest checkpoint and went back to one on level 8 with full health, telling the next agent to stay on that floor and fight until it reached experience level 8 or 9 (Figure 8).
What the orchestrator reads (excerpt)
ROUND 10.
LAST ATTEMPT (#9 from c87): died, max Dlvl 10, 613 calls.
Your directive was: Find the stairs down to dlvl 8 by exploring every room and
searching walls with no visible exit. Fight one monster at a time in corridors,
retreat and rest to full HP at the first sign of damage, and eat fresh corpses
immediately when Hungry — do not let yourself reach Fainting.
[…]
STANDING OF THE RUN (computed, not opinion):
UNDER-LEVELLED BY 2 against the winners' pace. At Dlvl 10 the hero is XL 7; the
median winner first reaching Dlvl 10 is XL 9. […]
CHECKPOINT ARCHIVE: 123 saved state(s) in 120 distinct measured position(s).
EVERY id below is a legal choice […]
id from Dlvl XL dXL HP hp% food turn score kind
[…]
c112 c111 8 7 +1 70/70 100% Normal 9104 3440 cadence
c113 c112 8 7 +1 69/70 99% Normal 9131 3445 cadence
c114 c113 8 7 +1 40/70 57% Normal 9173 3445 cadence
c115 c114 8 7 +1 42/70 60% Normal 9217 3445 cadence
c116 c115 8 7 +1 8/70 11% Normal 9262 3505 cadence
c117 c116 8 7 +1 48/70 69% Hungry 9457 3545 cadence
c118 c117 9 7 +2 53/70 76% Hungry 9481 3595 level-entry
c119 c118 9 7 +2 51/70 73% Hungry 9493 3663 cadence
* c120 c119 10 7 +2 60/70 86% Hungry 9535 3713 level-entry
c121 c120 10 7 +2 56/70 80% Hungry 9548 3486 cadence
c122 c121 10 7 +2 33/70 47% !Weak 9557 3486 cadence
c123 c122 10 7 +2 14/70 20% !Weak 9559 3486 cadence
[…]
Choose the checkpoint the next player resumes from, and write it a DIRECTIVE:
one or two sentences of concrete instruction for THIS attempt. […]
What it replies
Analysis: Attempt 9 was hugely productive — reached dlvl 10, up from dlvl 7. But the hero is now under-levelled by 2 (XL 7 at dlvl 10, winners are XL 9). The death spiral on dlvl 10 (c120→c122 !Weak→c123 !Weak 14HP) shows the hero went too deep too fast without enough experience. […]
The right move is NOT to resume from the deepest point. c120 is Hungry at 86% HP on a floor that killed the hero. Instead, I'll step back to c112 — dlvl 8, XL 7, 70/70 full HP, Normal food. The hero is only +1 dXL there (1 level short of pace, manageable). The directive should be to farm XP on this floor before descending. This is exactly the "slow is not failing" scenario — the hero needs to catch up on experience.
{"checkpoint": "c112", "directive": "You are under-levelled for your depth — stay on this floor and kill monsters one at a time in corridors until you reach XL 8 or 9 before descending further. Rest to full HP after every fight and eat fresh corpses to stay fed. Do not go down the stairs until you have gained at least one experience level.", "rationale": "c112 is the safest checkpoint near the frontier (dlvl 8, full HP, Normal food); the hero rushed to dlvl 10 at XL 7 and died — farming XP here to reach XL 8-9 before descending is the correction."}
c120, marked *) for c112 (highlighted) on level 8 at full health. Elisions are marked […]; the text is otherwise as logged.Multi-attempt evaluations
| Agent | n | BALmin mean | median | median run beats % of human games |
|---|---|---|---|---|
| Prime Agent + NetCore (GLM-5.2), single life | 15 | 1.32 ± 0.30 | 1.85 | 41.6 |
| Best@30 (GLM-5.2, 30 attempts) | 3 | 4.15 ± 0.46 | 3.69 | 76.4 |
| + explore (GLM-5.2, 30 attempts) | 7 | 11.38 ± 1.33 | 11.70 | 92.0 |
| + explore (GLM-5.2, 100 attempts) | 3 | 20.43 ± 2.52 | 17.91 | 94.3 |
| + explore (fog, GLM-5.2, 30 attempts) | 5 | 6.03 ± 0.58 | 5.08 | 85.8 |
Table 2. Multi-attempt evaluations. BALmin in %, means ± standard error over runs. Best@30 keeps the best of 30 independent lives. Fog denotes evaluation with fog of war enabled. The single-life row is from the table above, for reference.
The effect is large, as BALmin rises 8.6× over one life and BALmax 3.5×. The seven runs average dungeon level 18.4 at experience level 8.6, and the median run beats 92% of human games. Against the median of 433 winning human games (Figure 7), it keeps pace for the first 2,000 turns or so and then falls behind, so that at 10,000 turns it is at 6.0% BALmin while winning players are at 11.7%. With fog of war on, which is the setting BALROG uses, it reaches 6.03% BALmin and 30.93% BALmax, against 4.03% and 13.24% for GPT-6 Astra on a single life in BALROG's harness. Our runs cost about $51 per seed against Astra's $101, though our price includes a cache discount the leaderboard numbers don't.
Best@k versus PAE@k
Part of that gain comes from simply having more attempts. To separate the two, we compare PAE@k (Prime-Agent-Explore with k attempts) with Best@k, which runs k independent lives and keeps the best-scoring one. The two spend their attempts differently. Every life in Best@k starts again from the beginning of the game, so its search tree has height one, as with flat Monte Carlo rollouts, whereas PAE@k chooses which saved state to expand next, much as Monte Carlo tree search selects a node (Figure 9). PAE@k beats Best@k on BALmin at every k, by 1.6× at k = 5 and 2.8× at k = 30, and the gap grows with k.
| Model | k | Best@k (BALmin) | PAE@k (BALmin) | Gain |
|---|---|---|---|---|
| GLM-5.2 | 5 | 2.84 | 4.61 | 1.6× |
| GLM-5.2 | 10 | 3.26 | 7.45 | 2.3× |
| GLM-5.2 | 30 | 4.15 | 11.70 | 2.8× |
Why does Explore work?
| Configuration (15 attempts) | n | BALmin | BALmax | Max Dlvl | Max XL |
|---|---|---|---|---|---|
| No checkpoint choice and no plan | 5 | 2.45 ± 0.30 | 5.28 ± 1.86 | 6.0 ± 1.2 | 4.6 ± 0.4 |
| No checkpoint choice (resume the latest) | 5 | 2.81 ± 0.99 | 5.50 ± 1.77 | 5.2 ± 1.6 | 5.2 ± 1.0 |
| No plan | 5 | 4.21 ± 0.35 | 15.88 ± 4.39 | 10.6 ± 1.4 | 6.4 ± 0.2 |
| Prime-Agent-Explore (both) | 5 | 9.53 ± 1.38 | 21.56 ± 4.35 | 13.0 ± 1.8 | 8.4 ± 0.4 |
Table 3. Orchestrator ablations with GLM-5.2 and 15 attempts, 5 runs each. Without a checkpoint choice, each attempt resumes from the latest checkpoint, and without a plan, the next attempt gets no directive. BALmin and BALmax are in %, means ± standard error over runs. Bold marks the best configuration.
Generalization to Fog-of-War
| Model | Standard (1 life) | Explore (30 attempts) | Exploration score |
|---|---|---|---|
| GLM-5.2, full vision | 1.32 | 10.99 | +9.66 |
| GLM-5.2, fog of war | 1.36 | 6.03 | +4.67 |
Table 4. Generalization to Fog-of-War. Each cell shows the configuration's BALmin, in %.
We find that our improvements from Prime-Agent-Explore are diminished but carry over to the fog of war setting, increasing performance to 4.43x the standard score.
Behavior cloning on Prime-Agent-Explore data
In addition to generalized performance to the fog of war setting where language models can play with a simulator, we also test distillation of these traces. In this section, we show preliminary results that search policy traces can be distilled into a policy that plays without a simulator.
We fine-tune the 167M-parameter behavior-cloning Mamba model from Tuyls et al. on 1M transitions. The baseline uses 1M transitions of AutoAscend data, and the experimental condition swaps 11% of it for Prime-Agent-Explore traces (the attempts that make up each run's best result, concatenated). That raises mean BALmin from 0.37% to 0.91% and median BALmin from 0.00% to 1.54%. Swapping the same share for single-life language-model games instead reaches only 0.66% mean and 0.00% median.
| Fine-tuning data | Mean BALmin | Median BALmin | Mean BALmax | Median BALmax |
|---|---|---|---|---|
| No fine-tuning | 0.15 | 0.00 | 1.83 | 2.08 |
| AutoAscend, 1M transitions | 0.37 | 0.00 | 3.04 | 2.91 |
| AutoAscend 895k + LLM 112k | 0.66 | 0.00 | 2.98 | 2.91 |
| AutoAscend 895k + Prime-Agent-Explore 112k | 0.91 | 1.54 | 3.20 | 2.91 |
Try it
Play NetHack+ in your browser at liu-jonathan.com/nethack. To run the evaluation yourself, see NetHack-hub.
Acknowledgments
This work is completed as part of the Prime Intellect Reinforcement Learning Residency. We thank Prime Intellect for its generous support, as well as mentorship from Seth Karten, Alex R. Zhang, Sebastian Müller. We also thank Professor Karthik Narasimhan for discussions and advice.
- How we rebuilt the engine, so that one process holds thousands of games and a saved game restores in about 20 microseconds, is described in the appendix. ↩
- Every model we evaluated goes deeper faster than it gains experience. That raises BALROG's score, which counts depth on its own, but it leads the agent into fights it can't win. ↩
- GPT-6 Astra ascended this September, but in a single supervised game, meaning that it played on a public server, on its third attempt, in a harness it wrote itself, while a person suggested strategies and stopped and resumed its sessions over twelve days. ↩
