Muse plays NetHack
A model plays NetHack and writes its own lessons.
StatusBuilt · 2026
Designed and directed, built with coding agents
The problem
An agent that runs unattended repeats its mistakes, and can apply a move twice when a reply goes missing.
What I built
- A setup where a reasoning model plays a real NetHack character through a browser bridge, run after run, unattended.
- After every run it reviews its own transcript and writes lessons into a notebook; the most reinforced lessons go into the next run’s prompt.
- Every call has exactly three outcomes: ok, a game error, or uncertain. An uncertain reply is never repeated; the agent recovers and looks again.
- Cost went from $0.0196 per call to about $0.00008 per game turn, through four measured changes.
How it stays safe
- A lost reply is a fact, not a retry.
- A spend cap, and a supervisor that backs off after a crash.
- The learning is a notebook you can read and edit by hand, not fine-tuning.
Anatomy
- Terminal
- Map as ASCII, not JSON (recreated)
- Vitals
- Three outcomes per call
- A recorded death
- A lesson it wrote
- Cost per turn
Numbers
- 133lessons it wrote itself
- 101unattended runs
Stack
- Node
- OpenRouter
- WebMCP
- agent-browser
Sources
- From the project’s repository
- NetHack engine: neohack.dev by Tobi Lütke. NetHack by the NetHack DevTeam.