TL;DR
Get the latest gadgets delivered free with Prime
- Fast, free delivery on millions of items
- Prime Video, Amazon Music and more included
- Member-only deals all year
A report published October 18, 2026, breaks down how NetHack generates the Gnomish Mines using randomized floor tiles, four cellular-automaton passes and corridor repairs. The author explains the apparent roles of most rules but says the purpose of the second pass remains unclear.
A report published by BorisTheBrave.com on October 18, 2026, describes how NetHack generates cave-like levels in the Gnomish Mines through a four-pass cellular automaton. The account lays out the rules that reshape a randomized floor-and-rock grid, then points to one pass whose intended effect the author says is still unclear.
The report says generation begins by marking 40% of grid cells as floor, with the remaining cells rock. The game then processes the grid through four passes, counting the floor tiles in each cell’s eight neighboring positions. Different thresholds determine whether a cell becomes rock, floor or stays unchanged.
The first pass updates cells in place, as the scan proceeds. The author describes it as a clustering step: nearby floors and rocks tend to form broader areas. The other three passes are buffered, meaning the game computes results for the grid before applying the changes together. The report characterizes the third and fourth passes as erosion routines that smooth cave shapes and remove small isolated patches.
After the automaton runs, the generator adds corridors to reconnect disconnected caves, according to the report. Its account does not provide measurements of how often that repair is needed or how much the cellular-automaton rules have changed across NetHack versions.
How the Cave Layout Takes Shape
The report offers a concrete explanation of why the Mines can look different from the game’s more regular rooms: their layout is built through repeated local tile rules rather than being composed solely of square rooms. For players and developers, those rules help explain how an initially random map can become a set of connected, cave-like spaces.
The account also highlights how implementation details can affect generated levels. In particular, updating the first pass in place differs from calculating every tile against an unchanged grid. That distinction matters to anyone trying to reproduce or understand the generation process, though the report does not compare outputs from alternative implementations.
NetHack dungeon generation guidebook
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
From Random Grid to Mines
NetHack is a dungeon-crawling game whose levels use more than one generation approach. The BorisTheBrave.com report focuses on the Gnomish Mines because their cellular automaton produces an organic cave appearance, in contrast with the square rooms that make up much of the game, the author writes.
The process described has three broad stages: seed the map with random floor cells, reshape it through four neighborhood-based passes, and add corridors where caves are disconnected. Cellular automata are used here as a practical map-generation method: each cell’s state is adjusted according to nearby cells. The report’s focus is a description of the rules, not an announcement of a new NetHack feature or a change to the game.
“Randomly pick 40% of the cells to be floor.”
— BorisTheBrave.com report
procedural map generation tools for tabletop RPGs
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
The Second Pass Remains Unexplained
The report says the second pass leaves a cell unchanged when it has zero to four neighboring floor tiles, changes it to rock when it has exactly five, and leaves it unchanged with six to eight. The author does not identify why this threshold is used and explicitly asks what it is meant to achieve. No answer from NetHack’s developers or other contributors is included in the supplied material.
The report also does not specify the game version examined, provide source-code references or explain the exact corridor-repair algorithm. Its explanation should therefore be read as the author’s account of the generation process, not as a full technical specification verified here against a particular release.
As an affiliate, we earn on qualifying purchases.
Questions for NetHack Researchers
The immediate open question is the purpose of the five-neighbor rule in pass two. The report invites ideas but does not give a resolution or describe a planned follow-up. Establishing the rule’s original rationale would require further evidence, such as developer documentation, code history or comments from people familiar with the generator.
Readers seeking to reproduce the process would also need to check the relevant NetHack source version and confirm how its scan order, buffering and corridor repairs are implemented. The report gives no announced change to the game or scheduled next milestone; for now, the second pass’s intent remains unresolved in the source material.
dungeon crawler game development kit
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
How does NetHack start generating a Gnomish Mines level?
According to the report, the generator initially marks 40% of cells as floor, leaving the others as rock before applying four cellular-automaton passes.
What does the cellular automaton do?
It checks the number of floor tiles in each cell’s eight-neighbor neighborhood and applies pass-specific rules to create or preserve floor and rock. The report says the final map is also repaired with corridors if caves are disconnected.
Why is the first pass updated in place?
The report says the first pass changes cells as the scan proceeds, a method the author associates with clustering nearby floor and rock. The other passes are buffered and apply their calculated changes to the grid together.
What is unclear about the second pass?
It turns a cell to rock when it has exactly five neighboring floor tiles, while leaving other neighbor counts unchanged. The report’s author says the purpose of that rule is not understood in the account.
Source: hn
Halloween Picks
halloween
As an affiliate, we earn on qualifying purchases.
