Spacewar! Early A.I. Research and the World’s First Video Game

“Can machines think?” Posed by Alan Turing in his 1950 paper “Computing, Machinery, and Intelligence,” this question remains debated by Artificial Intelligence (AI) researchers and philosophers of science to this day.1 In this seminal paper, Turing introduced the world to the Imitation Game, also known as the Turing Test, which challenges an “interrogator” to differentiate a human from a machine.2 The new scientific endeavor of computing brought to the fore by Turing sparked a surge of attention from scientists dreaming of exploring the analog between minds and machines.

Two such scientists were Marvin Minsky and John McCarthy. In 1951, while teaching at Princeton University in New Jersey, Minsky created SNARC (Spatial-Numerical Association of Response Codes), the first “neural net,” a form of AI computing designed to mimic the neurons of the brain.3 In the same decade, John McCarthy, a professor at Dartmouth College in New Hampshire, designed LISP (LISt Processor), the first widely used AI programming language.4 Despite differing approaches, they shared a strong belief that the brain was a machine, and thus a machine could be programmed to mimic a brain.5 By 1959, both men were professors at the Massachusetts Institute of Technology (MIT) where they soon formed the world’s first AI research laboratory.6 Granted the rare opportunity to break new scientific ground, Minsky and McCarthy had their work cut out for them.

The initial research focus of the MIT AI lab was in creating intelligent machines, yet how to accomplish this was an open question.7 Minsky and McCarthy knew, however, that they needed talented programmers to unlock the power of emerging computer technology. Enter the self-proclaimed “hackers,” a handful of enthusiastic computer programming and design students (mostly from MIT and Harvard) who relished in the endless possibilities of computers.8 Once under their supervision, Minsky and McCarthy offered these students direct access to then state-of-the-art computers and encouraged experimentation.9 What arose from these unencumbered “hackers” working under the guidance of AI pioneers Minsky and McCarthy? Spacewar! The world’s first video game.

The story of Spacewar! – a competitive space warfare video game created by a group of students in the MIT AI Lab in 1962 – is a fascinating case study in creative experimentation that results in both intended and unintended outcomes. A video game may not have been a research priority for Minsky and McCarthy, but the viral enthusiasm and foundational computing knowledge Spacewar! contributed to early AI research is noteworthy. Minsky and McCarthy facilitated the creation of Spacewar! not by ordering its development, but by harnessing the creative enthusiasm of the “hackers.” The end game was never to develop consumer electronics, but to learn how to truly use computers, in service of one day creating machines with minds.10 Ultimately, however, video games have proven to be not only important in the early years of AI, as seen in the case of Spacewar!, but have continued to act as a vector for continued developments in the field even today.

To better understand this historical throughline, it is important to define AI and to survey its brief history leading up to the founding of the MIT AI Lab in 1959. According to the Cambridge Handbook of Artificial Intelligence, AI can be defined as “the field devoted to building artifacts capable of displaying, in controlled, well-understood environments, and over sustained periods of time, behaviors that we consider to be intelligent, or more generally, behaviors that we take to be at the heart of what it is to have a mind.”11 In fact, the term Artificial Intelligence was coined by McCarthy himself at the 1956 Dartmouth Conference, in which 10 early machine intelligence enthusiasts gathered to contemplate the possibilities of using computer programs to model human cognition.12 Notable attendees include McCarthy and Minsky; Claude Shannon, who in 1950 wrote the innovative paper “Programming a Computer for Playing Chess”; and Arthur Samuel, who spawned the field of machine learning with his 1953 self-learning checkers program.13 What is especially notable here is the prevalence of games in early AI research. This includes Turing’s “Imitation Game.”

Games play such a prominent role in this research because games are systems that represent models of the world and the behaviors within it, and thus they possess a defined set of rules that can be programmed.14 By the late 1950s, research was shifting beyond the limited bounds of game rules into developing programming languages that could facilitate more complex human-computer interaction.15 This shift in complexity was made possible by advancements in computing technology that allowed for the programming and processing of increasingly complex rule sets. And the MIT AI Lab gained early access to these game-changing computers.16

In the late 1950s and early 1960s, computers were mainframes; enormous, screenless boxes, manually operated with loud tapes and punch card readers.17 They were often used to perform large calculations and to create data-based simulations, such as 1959’s “The Management Game,” which simulated a competition between three detergent companies, possessing modules in research, production, finance, and marketing. There was no visual interface and the user manually input data and interpreted the data output.18 The computer that initially served as the training ground at the MIT AI Lab was one such mainframe, the TX-0, which filled a small room and held a three million dollar price tag (Fig. 1).19

Fig. 1: The TX-0
(Graetz, J. Martin. “The Origin of Spacewar!” Creative Computing 7, no. 8 (1981): 60-61)

Many of the students who joined Minksy and McCarthy in the AI Lab did so for the opportunity to utilize such an otherwise inaccessible technological marvel as the TX-0. Later interviews also exemplified a shared belief amongst the group that computing technology would fundamentally transform the world. This mentality is what ushered in their self-proclaimed title as “hackers.”20 The title came from the concept of a “hack,” which they described as a project undertaken to not just fulfill a constructive goal, but to do it with technical prowess, style, and genuine pleasure.21 Thus, to be a hacker, one had to both love computing to the core while creating technically innovative programs with pizazz. It makes sense that Minsky and McCarthy welcomed the hacker culture, facilitating its growth through access to the TX-0.22

During these initial years, Minsky and McCarthy were well aware that translating a philosophy of machine intelligence into complex programs depended upon an understanding of how to manipulate computers to do their bidding.23 Minsky was quoted as saying that “in this environment, there were several things going on. There were the most abstract theories of artificial intelligence that people were working on, and some of (the hackers) were concerned with those, most weren’t. But there was the question of how do you make the programs do these things and how do you get them to work.”24

In the fall of 1961, the conditions changed for the hackers. No longer were they restricted to the scheduling woes of the TX-0 (there were many parties on campus interested in experimenting with the machine).25 Digital Equipment Corporation donated it’s new PDP-1 (Programmed Data Processor-1) minicomputer to MIT, a sizable donation considering it’s $120,000 price tag (Fig. 2).26 The feeling among the hackers was exuberance. Because MIT paid nothing for the PDP-1, the hackers presumed Minsky and McCarthy would allow its use in more recreational experimentation. Sure enough, that was the case. Minsky and McCarthy let the hackers free on the PDP-1.27  A little more than a year later, Spacewar! emerged.

Fig 2: The PDP-1 (Computer History Museum)

Spacewar! was a two-player battle game that pitted torpedo firing spaceships against one another (Fig. 3). This was a far cry from the data driven detergent company simulations of “The Management Game.” What made Spacewar! a video game was that it used a video display, a feature made possible by the PDP-1.28 Additionally, it was the first game to convey a completely fictionalized space.29 Recall that the hackers referred to a “hack” as a project undertaken to fulfill a constructive goal with genuine pleasure, technical prowess, innovation, and style.30 Spacewar! was the definition of a hack.

Fig 3: Starting positions in Spacewar! (Graetz, J. Martin. “The Origin of Spacewar!” Creative Computing 7, no. 8 (1981): 61)

The introduction of the PDP-1 video display fundamentally changed the way the hackers approached their work. The idea to, in his own words, “combine a grade-B science fiction movie with a $120,000 toy [the PDP-1]” was first introduced by hacker Stephen “Slug” Russell.31 Through an immense effort, Russell wrote the foundational program for Spacewar! in early 1962, but it was raw and incomplete.32 Russell’s fellow hackers quickly put their own mark on the game. What resulted was confirmation that Minsky and McCarthy succeeded in facilitating rapid growth in programming aptitude on the newest available technology.   

Within the AI Lab, the hacker mentality drove simultaneous creative innovations on the game itself and the production of programming knowledge. Peter Samson noted the unrealistic nature of the random dots that represented stars. Instead, he wanted accuracy. Meticulously inputting data from the American Ephemeris and Nautical Almanac, Samson programmed an accurate representation of the night sky (in the northern hemisphere), including the relative brightness of stars.33 Despite this, spaceships flew unaffected by the Newtonian realities of space. Thus, Dan Edwards programmed a gravity effect, allowing spaceships to be affected by a star’s relative gravity, and permitted the use of a “gravity assist” to rapidly increase speed.34 As much as the hackers wanted the gravity effect to also alter torpedo trajectory, the PDP-1’s extremely limited 9 bytes of memory (an average 5 page word document is 30,000 bytes) forced them to tolerate torpedoes that defied the laws of physics.35

As longer gaming sessions took place, operating the game via the switchboard became too cumbersome. In response, Alan Kotok and Bob Saunders raided materials from the Tech Model Railroad Club (of which they were members), creating joysticks out of wire, wood, and switchboard hardware (Fig. 4).36 J.M. Graetz, whose first-hand account of these events proved highly valuable for this research, programmed a ‘hyperspace’ move, which allowed a player to jump (i.e. disappear) to escape certain destruction, with the caveat of reanimating randomly.37 The cherry on top was Russell’s final addition of a score keeper.38 When it was all said and done, the hackers displayed Spacewar! to great fanfare at the May 1962 MIT open house.39 Onlookers marveled at this truly novel creation, where you could actually be a spaceship. I’d imagine most spectators had no idea that a multi-billion-dollar global industry had just been unleashed upon the world.

Fig. 4: Peter Samson (right) and Dan Edwards playing Spacewar! on the PDP-1 with the custom joysticks; circa 1962. (Digital Equipment Corporation, Accession 102664292, 1962, Computer History Museum)

Despite the commercial potential, nobody involved made a dime from Spacewar!, although this is largely due to the game’s most significant feature – its portability.40 Within months, the hackers, with Minsky and McCarthy’s blessing, shared the code for Spacewar!. Anyone with a PDP-1 and some programming skill could program their own copy and it spread like wildfire, inspiring legions of new programmers to continue pushing the boundaries of computer programming.41 In fact, the original Spacewar! code formed the basis for the world’s first coin operated game Galaxy Game and first mass produced video arcade game Computer Space, both released in 1971.42 A 1972 article in Rolling Stone chronicled the “First Intergalactic Spacewar Olympics” (i.e. a Spacewar! Competition held at Stanford’s AI lab), which can even be seen as a precursor to modern video game tournaments.43 In short, AI research spawned the video game industry.

Inversely, the impact of Spacewar! on AI research was immense. In the early 1960s, expectations were sky high that a machine could one day possess a human-like mind.44 But Minsky and McCarthy must have questioned how 9 bytes of memory would get them there. They addressed this dilemma by encouraging the tenacity of enthusiastic students thrilled at the prospect of a paradigm shift. While Spacewar! was of little immediate value to the goal of creating a machine with a mind, it served as a defining beacon in showing the power, and fun, of scientific inquiry with computers. And while Minsky and McCarthy’s dream of programming a machine with a human-like mind has yet to be realized, AI continues to increase in complexity, and video games have come to play a major role in driving this innovation. Today, AI directs the increasingly realistic behavior of the many computer-controlled characters (NPCs) that inhabit video game worlds, with no signs of slowing down. Unknown to Minsky, McCarthy, and the hackers of Spacewar! in 1962, video games would come to act as a significant vector in driving modern AI innovation.


  1. Alan Turing, “Computing, Machinery, and Intelligence,” Mind: A Quarterly Review of Psychology and Philosophy 59, no. 236, 1950, 433. ↩︎
  2. Ibid., 433-434. ↩︎
  3. Stan Franklin, “History, Motivations, and Core Themes.” In The Cambridge Handbook of Artificial Intelligence, edited by Keith Frankish and William M. Ramsey, 2014, 19. ↩︎
  4. Steven Levy, Hackers: Heroes of the Computer Revolution, 1994, 47. ↩︎
  5. Konstantine Arkoudas and Selmer Bringsjord. “Philosophical Foundations.” In The Cambridge Handbook of Artificial Intelligence, edited by Keith Frankish and William M. Ramsey, 2014, 39-40. ↩︎
  6. Levy, Hackers, 48. ↩︎
  7. Noah Wardrip-Fruin, Expressive Processing: Digital Fictions, Computer Games, and Software Studies, 2009, 98. ↩︎
  8. Levy, Hackers, ix. ↩︎
  9. Ibid., 48. ↩︎
  10. Ibid., 59. ↩︎
  11. Arkoudas and Bringsjord, Cambridge Handbook of Artificial Intelligence, 34. ↩︎
  12. Franklin, Cambridge Handbook of Artificial Intelligence, 18. ↩︎
  13. Ibid, 17-18. ↩︎
  14. Wardrip-Fruin, Expressive Processing, 81. ↩︎
  15. Levy, Hackers, xiii. ↩︎
  16. Ibid., 48. ↩︎
  17. J. Martin Graetz, “The Origin of Spacewar!” Creative Computing 7, no. 8, 1981, 60. ↩︎
  18. Mark J. P. Wolf, The Video Game Explosion: A History from Pong to Playstation and Beyond, 2008, 32; “The Management Game” was created by Cohen, Cyert, and Dill at Carnegie Tech in Pittsburgh, PA. ↩︎
  19. Graetz, “The Origin of Spacewar!,” 58. ↩︎
  20. Levy, Hackers, ix. ↩︎
  21. Ibid., 10. ↩︎
  22. Ibid., 60. ↩︎
  23. Ibid., 59. ↩︎
  24. Ibid., 59. ↩︎
  25. Graetz, “The Origin of Spacewar!,” 58. ↩︎
  26. Levy, Hackers, 41-42. Adjusted for inflation, $120,000 in 1961 is worth $1,232,211 in 2023. ↩︎
  27. Graetz, “The Origin of Spacewar!,” 60. ↩︎
  28. Ibid., 41-42. ↩︎
  29. Mark J. P. Wolf, Encyclopedia of Video Games: The Culture, Technology, and Art of Gaming, 2012, 42. ↩︎
  30. Levy, Hackers, 10. ↩︎
  31. Ibid., 49. ↩︎
  32. Graetz, “The Origin of Spacewar!,” 60. ↩︎
  33. Ibid., 64. ↩︎
  34. Ibid., 64. ↩︎
  35. Ibid., 64. ↩︎
  36. Graetz, “The Origin of Spacewar!,” 62. ↩︎
  37. Ibid., 60. ↩︎
  38. Levy, Hackers, 54. ↩︎
  39. Ibid., 55. ↩︎
  40. Ibid., xiv. ↩︎
  41. Wolf, Encyclopedia of Video Games, 42. ↩︎
  42. Ibid., 281. ↩︎
  43. Brand, Stewart. “Spacewar: Fanatic Life and Symbolic Death Among the Computer Bums.” Rolling Stone (Dec. 7, 1972). 50-58. ↩︎
  44. Wardrip-Fruin, Expressive Processing, 98. ↩︎

Posted

in