A maze puzzle hidden within an Atari 2600 video game
bbc.com
bbc.com
https://arxiv.org/pdf/1811.02035.pdf
> The basic maze generating routine had been partially written by a stoner who had left. I contacted him to try and understand what the maze generating algorithm did. He told me it came upon him when he was drunk and whacked out of his brain, he coded it up in assembly overnight before he passed out, but now could not for the life of him remember how the algorithm worked.’
I've written very similar code for my 6502 roguelike game.
The tricky bit isn't just getting the desired look, it's having a non-repeating maze layout that doesn't hit dead ends. Seems hard to me..
https://writings.stephenwolfram.com/2017/06/oh-my-gosh-its-c...
So you conceivably could generate mazes with a cellular automaton.
But Entombed doesn't. Figure 6 in the paper shows the geometry of the rule:
c d e
a b X
So it samples bits from the previous row, but also from the current row. In cellular automaton terms, the previous row is the previous timestep, but the current row is the current timestep, and a cellular automaton can't compute cells based on cells in the same timestep.That 128 bytes includes stack. No graphics memory at all.
I coded my maze generators in 6502 assembly - the same CPU the Atari uses. Mine was for the NES, which is more powerful than the Atari (2KB vs 128B of RAM, for example), but I think I know what I'm talking about.
The idea that some day, some researcher may reverse-engineer one of these things tickles me.
"Brilliant" code that is hard for engineers to understand is not necessarily brilliant code.
The things I consider to be my finest moments are not opaque in that way.
They interviewed a co-creator who claimed it did always make solvable mazes, which is probably where the BBC journalist got confused.
Other than the random elements, there's one exception: 11001 -> 0, which directly leads to a nice downward branching structure.
(I should add section 4 of the paper tries to explain why this is archaeology, with lots of stuff about "material culture". I did not find it convincing.)