Unearthing Entombed
New York Public Radio transcripts are created on a rush deadline, often by contractors. This text may not be in its final form and may be updated or revised in the future. Accuracy and availability may vary. The authoritative record of New York Public Radio’s programming is the audio record.
Speaker 1: Simon Parkin writes about technology for The New Yorker. He was on the show recently to talk about playing video games with his kids during the pandemic. At the same time, he was working on a story from the dawn of the video game age about a game that came out when Simon was barely out of diapers. Simon's partner in telling radio stories is our producer, Alex Barron. Here's Simon, and Alex.
Alex: Once upon a time, specifically the early 1980s, in a far off land, Santa Monica, California, there's a bunch of hippies making video games at a place called Western Tech. One of the projects they were working on was a game for the Atari 2600 called Entombed.
Simon: In Entombed you play as an archeologist who is trying to escape from an underground catechu.
Alex: This is a video game from the early '80s so your character is just a little stick figure that you navigate through this blocky maze that scrolls up from the bottom of the screen.
Simon: If you get stuck, then the maze pushes you to the very top of the screen and you die.
Alex: Now the programmers working on Entombed had a big problem.
Simon: They didn't want the player to just play the same maze over and over again, because that will be boring but Atari cartridges had a tiny amount of memory on them, like two kilobytes. That's about 1000 times smaller than a photograph you might take on your mobile phone today, not nearly enough room to store a bunch of different maze designs.
Alex: They came up with this idea. What if instead of drawing a bunch of different mazes, and trying to fit them all into that tiny bit of memory, what if instead of that, they just wrote some code that could draw mazes. Then you wouldn't have to store all the mazes. You just have to store the code and it could generate a new maze every time the new game started.
Simon: These days, there's a term for this kind of coding. It's called procedural generation and it's a big deal in video games today.
Alex: Like, if you've ever played Minecraft, every time you start a new game, it gives you a new map, that map is created with procedural generation.
Simon: Here's the problem though. In the early '80s, nobody really knew how to do this yet so for weeks and weeks, the programmers on Entombed are banging their heads against this problem. They just can't settle on the right algorithm.
Alex: The legend goes-- One night, one of these Western Tech programmers, these early techies goes out to a bar and gets super drunk, and also super stoned and he blacks out. When he wakes up in the morning, he's at home and he discovers that while he was blacked out, he wrote an algorithm to generate a maze for Entombed. Not only does he not remember how he wrote this algorithm, but he doesn't remember how the algorithm works.
Simon: He checks it, looks it over, and realizes that this really is the solution to the problem they'd be looking for.
Andrew Reinhardt: In the case of Entombed, we're taking a look at procedural generation and its evolution. This is one of the earlier examples of proc gen used in game code.
Simon: This is Andrew Reinhardt. He's an archaeologist but Andrew doesn't do his digging in ancient burial sites or marketplaces. He does his digging in video games.
Andrew: First of all, let me explain that I was a trained classical archaeologist. I was a pottery specialist and I don't know if this will get me into trouble but I don't see a difference between the archaeology, it was pot that was gotten out of the ground, or of a coin, and the archaeology of digital artifacts. All of these analyses that we might do of games yields the same answers about what people were thinking about, what they were doing to entertain themselves, what they were doing to make a living.
Alex: Legends like the mysterious maze generation algorithm of Entombed, you hear them more and more. We're maybe 60 years into the digital age now and the things that happened in the very early days of the digital world are growing mysterious to us. Even when we're talking about early versions of technologies that we still use, like procedural generation, how those technologies came about, and why can become shrouded in mystery.
Simon: Performing archeology on digital artifacts like Entombed can help us better understand how we got to where we are right now with technology.
Alex: We decided to do some digital archaeology of our own. Simon and I are keen to try to solve this mystery, but we are not archeologists, so we need some help from you to figure out how exactly we go about this.
Andrew: Yes, there's a method to [unintelligible 00:05:14]
[crosstalk].
Alex: Teach us the method, Andrew.
Andrew: Teach us the method, Oh, Young Jedi.
[laughter]
Andrew: All right, you have this digital thing in front of you in this case it's a video game for the Atari 2600. What do you do? You can decompile the source code so that you can see what the inscriptional evidence is? How does the code look, how is it organized-
Alex: Well, we're not computer scientists, so we actually can't decompile the source code.
Simon: Fortunately, there's somebody who has already been researching this particular artifact and he is a computer scientist.
John Aycock: I am John Aycock. I am an associate professor in computer science at the University of Calgary and I study old computer games.
Alex: John Aycock teaches modern computer science students about old game.
John: I had never heard of this one before. I didn't know anyone who had ever played it and I just tripped across and I said, "Amaze, that might be interesting."
Simon: Aycock cracked open the code a bit like an archeologist, rolling back a stone on an actual tomb.
Alex: Entombed is written in something called assembly language. It's a very early computer coding language that's very easy for computers to process, but really very hard for human beings to understand.
Simon: Back in the 1980s, when people wrote assembly code, they usually included comments within that code, basically plain English sentences that would tell a human what the assembly code did.
Alex: But unfortunately that did not happen with Entombed.
John: There's no comments, there's no variable names, there's really nothing conveying any information at that stage and what I have to do is I have to start with that and reconstruct a lot of the meaning as to what was going on in the code.
Simon: Eventually, John was able to figure out what the code was doing. Do you want to try and explain this, Alex.
Alex: I'll give it a shot. The maze generation algorithm is trying to draw a maze that's challenging enough to keep the player entertained but isn't actually impossible to solve. It does that, I guess, by going block, by block across the screen and trying to decide if each block should be part of the wall of the maze or part of a path through the maze. Okay, are you with me so far?
Simon: Right, I think so, so if I had like a sheet of square paper and I was trying to draw a maze really quickly by coloring in certain blocks and leaving other blocks blank, I can just look at it and see which ones to do for the maze to make sense. Whereas the computer can't actually look at it in that way and is using some mathematical algorithm to figure it all out.
Alex: Right, exactly. It's actually taking some data about the maze it's already drawn, plugging it into this algorithm and then the algorithm makes the call about whether a particular block should be part of the maze wall or part of the path. The problem is that nobody can figure out exactly what the relationship is between the data that goes into the algorithm and the answer that comes out.
John: The generation of this maze relied on this very odd table in the game and it was using this to somehow produce this maze and I was fortunate enough to get in touch with the programmer and the programmer actually didn't have any idea how it worked either because it had been something that had been handed off to him.
Simon: It's this programmer, who first tells John Aycock the story we told you. The saga of the drunken coders in the bar.
[background noise]
Simon: There didn't seem to be an indication that there was some intoxication involved in the production of this code. The programmer John talked to is a guy named Stephen Sidley.
John: [unintelligible 00:09:16] Stephen, how are you?
Stephen Sidley: Good, fine. Thank you. I just wanted to ask you guys--
Alex: Stephen Sidley was a recent UCLA grad when he got hired to work at Western Tech.
Stephen: The company was full of a bunch of crazed drunk and stoned misfit youth with bare feet and long hair and torn clothes and social awkwardness and those were the sorts of people at the beginning who were interested in video games.
Simon: Surely after he was hired, Western Tech dumped a half-finished game in his lap.
Stephen: I was told to pick up and finish a game that they were writing, which was called maze at the time and eventually was renamed as Entombed. No manuals, no understanding of how the machine worked, nobody's sitting around me, total utter fear.
Alex: Sidley asks one of these hippies around the office where this code that he's working on came from.
Stephen: The following story rolls out. The person who had started this game had divined this well drunk and stoned in a Mexican bar drinking tequila for one night.
Simon: Sidley told John Aycook his story but it was also told to Sidley second hand and we wanted a primary source here.
John: Do you happen to remember the name of the guy who wrote the algorithm?
Stephen: I want to say Newell but I may be mixing him up with somebody, so no I wouldn't fall on my sword about that.
Alex: You can sometimes get the feeling that the internet puts all of the information in the world right at your fingertips, but the internet can also be the world’s largest haystack, and this guy Newell turned out to be a needle.
Simon: We find an interview on an Atari fansite from 2008 with a guy called Paul Allen Newell. He does say that he worked on the Entombed maze generation algorithm. I have to know join an Atari message board and send a message to the guy who did the interview.
Alex: But the only email he has for Paul Allen Newell is dead.
Simon: We can't find him on Facebook or on LinkedIn and he doesn't seem to have a webpage.
Alex: I take his name and this defunct email address we have and just start scouring the internet. I find that email pops up a lot on a message board for-- Honestly, I'm not actually totally sure what it's for. It's what seems to me to be a bunch of very smart people talking in a very technical way about coding. Eventually though I find one post from a few years ago where Paul is complaining about having to change his email address.
I take his name and run it back through the search function on the board to see if anybody else is posting with his name but from a different address, and that's how I unearthed an email I've never seen before. We cross our fingers and send a message.
Paul: When I got the email first thing I did was I checked up to find out who you were and just to make sure this was for real, and I'm going, "Oh dear, it is for real."
Alex: Paul Allen Newell is retired now, he lives in southern California.
Simon: Like Sidley he was hired at Western Tech right out of UCLA.
Paul: I was assigned Towering Inferno which basically is the movie, a video game on the movie. It may have actually been the first time that a movie sold the rights to make a video game out of it.
Speaker 6: Steve McQueen and Paul Newman race against time as one--
Alex: Western Tech was making the video game version of Towering Inferno.
Speaker 6: The Towering Inferno. It's out of control. It was coming your way.
Alex: In that game you play a firefighter who has to rescue people from different floors of this building.
Simon: Each floor of the building was a maze so Paul needed an algorithm that would generate those mazes.
Paul Allen Newell: I and a friend went out one night, had a beer, and I explained the problem and this is Duncan.
Simon: Duncan is Duncan [unintelligible 00:13:20] who is a graduate student in math at UCLA.
Paul: He goes, "Oh, that's no problem, we can just generate an endless maze and you can take static pictures of them." He did the math and he didn't understand how to code so I did the code, and together we just dreamed it up over a couple of beers and wrote it on bar napkins.
Alex: Could you tell me a little bit about what happens? Now you've got these bar napkins, you and Duncan leave the bar.
Paul: I drove Duncan home and I go back to my place and before I go to bed I take all that stuff and just dump it into the machine. Very very rough coding job so I'm not going to forget anything.
Simon: In the retelling of the story that we've heard, the scene that we're given is that you as the author of this algorithm could not remember how you did it, how you did the maths, is that part of the story true in any way?
Paul: No way. First off partially written by a stoner. I don't smoke weed, okay? Very unlikely that I would've been able to have gotten drunk and wacked out if we're out on a bar because how would I have gotten home? I coded it up over the weekend, very unlikely that I'd forgotten the thing.
Simon: This is the point when Paul pulls out a big stack of papers.
Paul: I have in my hand here the entire thing documented, the whole code, paper print out, none of this electronic stuff that was going to die. Got the whole thing, the maze algorithm, the random number generator that I talked and [unintelligible 00:14:54] talked about the whole thing. That's kind of more what happened.
Simon: Where has that been for the last 40 years, where have you kept it?
Paul: My garage.
Simon: Just in a box?
Paul: In a box.
Alex: To review the bidding, there's no smoking pot. There's no Mexican tequila. There's no blackout. There's-
Simon: There's not even Entombed at this point.
[laughter]
Alex: Yes, Paul says he wrote the code for a totally different game and Western tech repurposed it for Entombed. Okay. The question remains then, how did this legend get started in the first place?
Paul: I think what may have happened is either Duncan or I may have used the excuse of forgetting as a way to basically go, "We can't provide you with the documentation."
Simon: This really is a story more about intellectual property than about irresponsible drinking. Paul Allen Newell is an employee of Western Tech so the company owns whatever he made while he was there but he and Duncan had written the algorithm on their own time. Now, they wanted to put their code in the game, but they didn't just want to hand over the keys to their mathematical brilliance.
Alex: Right. Remember how we were talking about how programmers would put comments in their code to explain what it did and the Entombed code didn't have those comments when it went to Stephen Sidley. Well, Paul says that that's how he and Duncan protected their IP, they handed over the code, but not the documentation that explained how the code worked.
Paul: I think this is where the whacked out of our school and couldn't remember it, came in because I don't think we wanted to tell them, "Well, we have the documentation, but we're not giving it to you."
Alex: It's an explanation that, in retrospect, makes a lot more sense than the legend.
Andrew: This is classic archaeology in a way,
Simon: We went back to Andrew Reinhardt, the actual archaeologist, and we told him what we had dug up
Andrew: The fact that they were probably protecting their IP by claiming intoxication during its authorship. Fine, you can believe that story, it's easy to believe. You have to take it with a grain of salt, it's like talking to an artist about their art. You're going to get part of the picture but it's not to be the whole picture.
The best archaeologists will state right up front that this is not 100%, there's always going to be something else to discover, there's always going to be something else to excavate that really adds to the understanding of this particular game with this particular culture of these particular people. Okay, great so here's another example of that and it adds to that data that brings us a little closer to that limit of knowledge that we're always working towards.
Alex: Hello, Steve.
Stephen: Hello everybody, how you doing?
Alex: Hi.
Simon: Hi steve.
Alex: Then all that was left was to relate what we found back to Stephen Sidley, who was, after all, the one who we'd all heard the legend of the drunken coder from in the first-
Alex: Handed over was just the code with no comments. That's what
Stephen: Which I was the lucky recipient of. [laughs]
Alex: Does that like jive with what you remember?
Stephen: Yes, it fits like a glove. Oh, no. I'm tremendously excited by this new twist. I'm going to go tell my wife and my kids about this now. Yes, that would absolutely be the most reasonable explanation I just unfortunately got in the way of it, but everything turned out okay. [laughs]
Speaker 1: Simon Parkin contributes to the New Yorker and Alex Barron is a producer for the Radio Hour.
Copyright © 2020 New York Public Radio. All rights reserved. Visit our website terms of use at www.wnyc.org for further information.