Researchers still don't know why this Atari 2600 game works

Shawn Knight

Posts: 12,316   +120
Staff member

Launched on the Atari 2600 in 1982, it tasks players with traversing down a continuous vertically-scrolling maze while trying to dodge enemies. Since early game cartridges didn’t have a wealth of memory to store static maze designs, the developer relied on a technique that would procedurally generate the maze – that is, build it on the fly.

Intrigued, John Aycock from the University of Calgary, in Alberta, Canada, and Tara Copplestone from the University of York in the UK, took a closer look and what they found… well, they simply couldn’t explain. “It was a very deep rabbit hole,” Aycock told the BBC.

As the publication notes, the game’s maze is generated in a sequence.

The game needs to decide, as it draws each new square of the maze, whether it should draw a wall or a space for the game characters to move around in. Each square should therefore be “wall” or “no wall” – “1” or “0” in computer bits. The game’s algorithm decides this automatically by analyzing a section of the maze. It uses a five-square tile that looks a little like a Tetris piece. This tile determines the nature of the next square in each row.

The logic that determines what the next square should be is confined within a table of possible values in the game’s code. “Depending on the values of the five-square tile, the table tells the game to deposit either wall, no wall or a random choice between the two,” the BBC added.

The tricky bit is that nobody can seem to figure out how the table was made.

Having exhausted other possibilities including retro-engineering the table, the researchers reached out to one of the people involved in the game’s development, Steve Sidley, yet even he remembered being confused by the table at the time. Sidley told the researchers:

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.

Studying old video game code could be immensely useful for modern-day developers, especially those working on VR and other resource-limited platforms. Who knows how many other genius techniques and weird quirks have yet to be discovered in long-forgotten games.

Masthead credit: Swill Klitch

Permalink to story.

 
When I needed to write an algorithm that would make procedural mazes where you could always reach the exit no matter where the game spawned the player and the exit, I made a "path tracer" which started from the centre, and went two paces in a random direction it hasn't been to yet, recording its previous location to the stack after every move, until there were no unvisited spots left around it. Each time there are no unvisited spots around, it travels back to the previous position from the stack until it reaches the point where an unvisited spot is nearby, and it travels to that spot, continuing the initial algorithm. When it finished, it left me with a map of everywhere the "tracer" went that was a perfect randomly generated solvable maze.

I can only imagine that something along the lines of that might be used in Entombed, perhaps with weighted random generation so that it goes down more than it goes anywhere else.
 

tragicallyhip

Posts: 85   +15
More progress can be made by getting drunk and stoned first then try again to figure out how he did it, to straight on the first attempt....seriously.
 
  • Like
Reactions: CPO2U

Mithan

Posts: 93   +83
Incredibly efficient code that nobody can figure out... written by a stoner who was too blitzed to remember how he himself came up with the algorithm. Brilliant.
There are people that think that being wacked out (LSD, etc) allows us to see and communicate with people in other dimensions.

There are some ancient civilizations that went deep into human sacrifice and did it all with their shaman's and such wacked out on different drugs, leading some current researchers to believe that what is happening is that people who "trip" may be running into people in other dimensions, who then advise us to kill other people for blood lust.

Its pretty wacked, but certainly interesting and fascinating. Might even be true!

Anyways, what if this guy tapped into another dimension and they gave him the code?

Highly unlikely, but not impossible.

You never know!!!!!!!!!!!
 

NahNood

Posts: 133   +70
"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."

Must be very similar to how later bioware stuff was programmed.
 

Darth Shiv

Posts: 2,043   +625
Incredibly efficient code that nobody can figure out... written by a stoner who was too blitzed to remember how he himself came up with the algorithm. Brilliant.
lmao... and this folks is how knowledge is lost to the ages!
 
There are people that think that being wacked out (LSD, etc) allows us to see and communicate with people in other dimensions.

There are some ancient civilizations that went deep into human sacrifice and did it all with their shaman's and such wacked out on different drugs, leading some current researchers to believe that what is happening is that people who "trip" may be running into people in other dimensions, who then advise us to kill other people for blood lust.

Its pretty wacked, but certainly interesting and fascinating. Might even be true!

Anyways, what if this guy tapped into another dimension and they gave him the code?

Highly unlikely, but not impossible.

You never know!!!!!!!!!!!
Wine of the Dreamers, 1951, John D. McDonald
Sixty-nine years ahead of his time
Perhaps it was one of Them that 'done this'
Someone should go and ask
 

EClyde

Posts: 2,220   +869
There are people that think that being wacked out (LSD, etc) allows us to see and communicate with people in other dimensions.
When whacked on LSD everything can be much more clear and it isn't that what was thought can't be recalled but the clarity is gone. Get it?
 

kimo1

Posts: 46   +64
Good health is nowadays criminally punishable. Herbal and mental cures that people have used for tens of thousands of years are now all prohibited by law. And replaced with poisons and fake science. FDA only allows to be miserable and suffer from cancer.
 

ET3D

Posts: 1,695   +342
Studying old video game code could be immensely useful for modern-day developers, especially those working on VR and other resource-limited platforms.
Not really. "Resource-limited platforms" of these days have (many) thousands of times more processing power and millions of times more RAM than the Atari 2600. While studying old algorithms is of academic interest, there's no problem to replace them with less efficient (but more readable) implementations.
 

trgz

Posts: 304   +87
Being old enough to have encoded directly into assembly (8080/Z80) in the early 80s I'm slightly surprised to hear that it's not easily decipherable as it'll not have been 'asssembled' down from a higher language (try understanding that stuff!). I only ever hacked a few things back in the day (Jet Set Willy and an Epsom printer driver are the only ones that spring to mind) but much smarter people than me, that can still code in assembly, would still be around. I saw the reddit links and do rather think that trying to redo it in Python or any modern high level language is probably not going to work due to all of the 'fun' (or mind-bending things) you could do in machine code, though someone seems to have made a good stab at recreating it. Interesting
 
  • Like
Reactions: Bamda

MaxSmarties

Posts: 93   +23
Coded it up in assembly while drunk ? Frankly speaking I don’t believe it. I used to code in assembly at the time, and it was a time consuming extenuating activity.
 
  • Like
Reactions: Hexic and trgz