Researcher Uses AI and Formal Verification to Unearth Three NetHack Bugs
davidbau · x · 2026-09-27
David Bau shares his hands-on workflow learning formal methods coding with AI assistance: he found three reproducible bugs in NetHack's polymorph code (src/polyself.c) — a deleted light source that was never created, cleanup executed twice per polymorph causing double damage rolls, and decisions still made by the superseded form's rules (fatally stripping water-walking boots while standing in lava).
Formal verification then revealed a hole in his first fix: a second form change triggered by polymorph damage is mishandled. He filed issue #1682 with a companion PR and asks how to avoid missing issues when checking assumptions.
More from coding & agent
- OpenCode's Space Bunny builds a self-tested HTML game and fixes its own two bugs — Aiden_Tech_Ai · 2026-09-27
- Gemini now connects to Airtable, Linear, Adobe and more — 10 workflows to try — alifcoder · 2026-09-27
- User denies Chrome permission, Codex pivots to in-app browser instead — andimarafioti · 2026-09-27
- Opus 5.5 plus the right skills equals a junior video editor: 4 open-source picks — lxfater · 2026-09-27
- OmO V5 ships as desktop app with auto model selector teased next — jasonkneen · 2026-09-27
- They killed 27 of 30 agents and rebuilt around 3 — maintenance forced the rethink — AmosBarJoseph · 2026-09-27