Digging deeper into the Stanford port

Spacewar at Stanford, and the first tournament

One thread of Spacewar!'s long journey runs west to the Stanford Artificial Intelligence Laboratory (SAIL), where the game became the centre of a working culture and then, on one evening in 1972, the occasion for what is often called the first video-game tournament. The same place produced the definitive multi-player version of the game and the article that first carried hacker culture to a mass audience.

the lab and the program
SAIL and Ralph Gorin

The game goes west

Spacewar! running on a vector display at the Stanford AI Lab
Spacewar! on a display at the Stanford AI Lab.
Spacewar! travelled to Stanford with the people who had made it: Steve Russell, one of the original MIT authors, brought it to the Stanford computers in the mid-1960s. At SAIL, the laboratory John McCarthy had founded in the hills above the campus, it found a permanent home on the lab's PDP-10. The version that mattered was maintained by Ralph Gorin, the lab's head system programmer and, in Stewart Brand's words, its "most avid Spacewar nut".

Gorin's Space War, revised in September 1971 and again in February 1972 with R. Taylor, was a long way from the two-ship duel of 1962. It supported up to five ships at once, with a richer physics and a set of options a player could turn on or off. Its source survives and is hosted here, recovered from the Stanford SAILDART archive and cleaned back to readable assembler.

the 1972 olympics
19 October 1972

The Intergalactic Spacewar Olympics

Players at the 1972 Intergalactic Spacewar Olympics at the Stanford AI Lab, with Pam Hart
Players at the Intergalactic Spacewar Olympics, Stanford, 1972 (below Pam Hart).
On the evening of 19 October 1972, the writer Stewart Brand, founder of the Whole Earth Catalog, brought a case of beer and a Rolling Stone sponsorship to SAIL and ran the Intergalactic Spacewar Olympics. Gorin ran the PDP-10 and set up the game. Three events were played on the lab's display screens: a five-player free-for-all, a two-against-two team match, and singles duels. The free-for-all went to Bruce Baumgart, a graduate student; the team title to Tovar and Robert E. Maas; the singles to Tovar. The prize was a year's subscription to Rolling Stone, and the beer.

Brand's article, "SPACEWAR: Fanatic Life and Symbolic Death Among the Computer Bums" (Rolling Stone, 7 December 1972), opens with a sentence that reads now like a prophecy: "Ready or not, computers are coming to the people. That's good news, maybe the best since psychedelics." It was among the first times the closed world of the research labs, its games and its values, was described from the inside for a general readership. The Olympics are now widely cited as the first video-game tournament; as Brand likes to point out, the first Pong machine would not be switched on for another six weeks.

code as instrument
The reading

A game that edits its own rules

Bruce Baumgart, winner of the five-player free-for-all at the 1972 Intergalactic Spacewar Olympics, at a terminal
Bruce Baumgart, winner of the five-player free-for-all, at the 1972 Olympics.
The Stanford version went furthest of all the ports in what we would now call modifiability: it let the players change the game while it ran. Gorin's source carries a routine, GETNAM, that reads named parameters from the console and writes them into the running program, so the block of constants that fixes gravity, fuel, torpedo speed and the rest became a live editor for the rules of the world. Where the MIT game hard-coded its physics, the SAIL game exposed it.

This is the same move the laboratory made with everything else it touched: the artefact is not a fixed object but a configurable instrument, opened up for the user to retune. The Olympics could set "expert" parameters precisely because the game had been built to be reset. Read as code, Gorin's Space War is less a program than a small piece of apparatus, the constants block grown into a console.

build your own spacewar
Alan Kay's sidebar, 1972

A game you could build for $730

Alan Kay outside the Stanford Artificial Intelligence Laboratory, 1972
Alan Kay outside the Stanford AI Lab, 1972.
Brand's article closed with an invitation. In a sidebar headed "Your Own Spacewar", Alan Kay, then at Stanford and soon to lead the group at Xerox PARC that built Smalltalk and imagined the Dynabook, argued that a modest Spacewar could be built cheap. "You can do motion with a couple of integrators," he told Brand: a Heathkit sixteen-integrator analogue computer, about $700 as a kit, "two layers of integrators to get an inverse-square law, so you should be able to get gravity and orbits with that one," plus "a few bits of digital memory" for the ship outlines and explosion patterns. The controls were "trivial": the front end of a model-aeroplane radio controller, two joysticks and the potentiometers, about $30.

And Brand printed Kay's own sketch of the program, written not in PDP assembler but in a LOGO-like turtle-graphics notation (penup, pendown, forward, right), the same family of ideas Kay was then turning toward Smalltalk and a computer simple enough for children. The ship is drawn as a turtle walks its outline; the physics is the four lines of moveship; the whole game is a page of readable procedures:

Facsimile of Alan Kay's Spacewar pseudocode listing as printed in Rolling Stone, 1972
Kay's listing as printed, Rolling Stone, 1972.
to ship :size
  penup, left 180, forward 2 * :size, right 90
  forward 1 * :size, right 90
  pendown, forward 4 * :size, right 30, forward 2 * :size
  right 120, forward 2 * :size
  right 30, forward 4 * :size
  right 30, forward 2 * :size
  right 120, forward 2 * :size
  left 150, forward :size * 2 * sqrt 3
  left 330, forward :size * 2
  right 60, forward :size * 2
  left 330, forward :size * 2 * sqrt 3
  penup, left 90, forward :size, right 90
  forward 2 * :size
end to

to spaceship :pilot :thrust :steer :trigger
  use :numtorps :location (:x :y) :speed :direction
  repeat
    moveship
    if :trigger and :numtorps < 3
      then create torpedo :speed :direction :location
    ?crash :self
    display ship
    pause until clock = :time + :movelag
end to

to moveship
  make :speed be :speed + (:spscale * :thrust)
  make :direction be :direction + (:dirscale * :steer) rem 360
  make :location:x be :location:x + (:lscale * :speed * cos :direction) rem 1024
  make :location:y be :location:y + (:lscale * :speed * sin :direction) rem 1024
end to

to display :obj
  penup, moveto :location, turn :direction
  create :obj :size
  if :thrust > 0 then create flame :size
  if :thrust < 0 then create retro flame :size
  pause until clock = :time + :framelag
end to

to ?crash :object
  find all (create spaceship :s)
    if :object = :s
      and /:object:location:x - :s:location:x/ < close
      and /:object:location:y - :s:location:y/ < close
      then explode :s, explode :obj
end to

to explode :object
  penup, moveto :object:location
  flash
  finish :object
end to

to torpedo :speed :direction :location
  use :thrust 0
  bump :numtorps
  moveship
  if not (0 < :location:x < 1024 and 0 < :location:y < 1024)
    then debump :numtorps, finish :self
  ?crash :self
  display :torp
end to

to start
  repeat ask "how many will be playing?" times
    create spaceship ask "pilot's name?"
    stick.(make :sn be ask "stick number?").y
    stick :sn:x
    stick :sn:but
  end repeat
  repeat
    if (make :char be ask) = "s" then done
    find all (create spaceship :x)
    start :x
end to

The full listing, with the flame, flash, retro and torp stubs and the sample run Brand printed, is transcribed here.

It is a striking document. Ten years after Spacewar! needed a $120,000 PDP-1 and a roomful of expertise, Kay was sketching it as a weekend project, a few hundred dollars of analogue kit and radio-control joysticks, written in a language a child could read. "Though no one has done it yet," Brand admitted, but the gesture makes the article's argument concrete: the game, and the machine under it, were about to belong to anyone who wanted them. The pseudocode is the personal computer arriving as a recipe.

why this belongs here
A game's other inheritance

The moment the culture went public

Stewart Brand, 1972
Stewart Brand, 1972.
If Cambridge shows Spacewar! as an argument that persuaded a laboratory to take interactive graphics seriously, Stanford shows it as a culture becoming visible to itself. Brand was one of the first to witness and write about it. A few years earlier he had been one of Ken Kesey's Merry Pranksters, a figure in Tom Wolfe's The Electric Kool-Aid Acid Test and the organiser of the 1966 Trips Festival; in 1968 he founded the Whole Earth Catalog. His move from psychedelics to computers, the two joined in that opening line, is the counterculture turning into what we now call personal computing, the shift the historian Fred Turner calls "from counterculture to cyberculture". Brand's piece named that culture, its "computer bums", its ethic of play as serious work, its conviction that the machine belonged in the hands of individuals, and put it in front of a readership that had no idea the research computers were already being used this way. The line from this evening runs directly to the personal-computer movement that Brand would go on to help define.

"Four intense hours, much frenzy and skilled concerted action, a 15-ring circus in ten different directions, the most bzz-bzz-busy scene I've been around since Merry Prankster Acid Tests ... and really it's just a normal night at the AI Project, at any suitably hairy computer research project. Something basic ... These are heads, most of them. Half or more of computer science is heads. But that's not it. The rest of the counterculture is laid low and back these days, showing none of this kind of zeal. What, then?" Stewart Brand, Rolling Stone, 1972.

The game written "mainly for fun" at MIT had, ten years later and a continent away, become the thing a generation pointed to when it wanted to say what computers were really for.

← Back to the versions and the ports table

sources
On this page

References