26 Kilobytes of Fun: The Games Hidden on Unix V4

Table of Contents

"The games were always the first thing people ran." — Anonymous Bell Labs programmer, 1974

TL;DR: The recently recovered Unix V4 tape contains seven games totaling 26KB. One has machine learning. One plays chess. One hunts a Wumpus. All run on a 51-year-old operating system I booted on FreeBSD.

The Discovery

In December 2025, a nine-track tape found in a University of Utah storage closet yielded the only known copy of Unix Fourth Edition—the first operating system with its kernel written in C. While the kernel source made headlines, I was drawn to something else entirely: /usr/games.

# ls -la /usr/games
-rwxr-xr-x  1 bin       624 Jun 10 1974 moo
-rwxr-xr-x  1 bin     1,562 Jun 10 1974 bj
-rwxr-xr-x  1 bin     2,192 Jun 10 1974 ttt
-rwxr-xr-x  1 bin     2,468 Jun 10 1974 cubic
-rwxr-xr-x  1 bin     5,386 Jun 10 1974 wump
-rwxr-xr-x  1 bin    14,310 Jun 10 1974 chess
-rw-r--r--  1 bin       268 Jun 10 1974 ttt.k
                    -------
                     26,542 bytes total

Seven programs. 26 kilobytes. Less than a favicon on a modern website.

The Games

moo — 624 bytes

The smallest game is a code-breaker. The computer picks a 4-digit number; you guess until you crack it.

# /usr/games/moo
MOO
new game
? 1234
0 bulls; 3 cows
? 3214
2 bulls; 1 cows
? 4123
4 bulls
 4 guesses

Bulls = right digit, right place. Cows = right digit, wrong place.

You might know this as Mastermind (1971), but Bulls and Cows predates the board game by decades. Bell Labs programmers were playing it on paper in the 1960s before someone wrote 624 bytes of C to automate it.

bj — 1,562 bytes

Full blackjack with proper casino rules—in under 2KB.

# /usr/games/bj
Black Jack
new game
Action $10
You have 5,6 = 11
Dealer has T
Double down? y
You have 5,6,T = 21
Dealer has T,8 = 18
You win $40

Features extracted from the binary:

  • Insurance betting (when dealer shows Ace)
  • Pair splitting
  • Double down
  • Proper shuffling

The strings in the executable reveal: A23456789TJQKHSDC — a complete deck representation in 17 characters.

ttt — 2,192 bytes (+ 268-byte knowledge file)

This is the one that surprised me.

# /usr/games/ttt
Tic-Tac-Toe
Accumulated knowledge? y
268 'bits' of knowledge
new game
1
 X | O |
-----------
   |   |
-----------
   |   |

See that "Accumulated knowledge" prompt? The game learns from experience. It maintains ttt.k, a 268-byte file of game states that persists between sessions. Win against it, and it remembers. Play again, and it won't fall for the same trap.

This is machine learning in 1973. Donald Michie had built MENACE (Matchbox Educable Noughts and Crosses Engine) in 1961 using physical matchboxes and colored beads, but this Unix implementation brought the concept to software.

When I beat it:

I concede
134 'bits' returned

It updated its knowledge file. Next time, it'll be slightly smarter.

cubic — 2,468 bytes

Not regular tic-tac-toe. This is 4×4×4 three-dimensional tic-tac-toe—64 positions with 76 possible winning lines.

# /usr/games/cubic
Type y to move first: y
  1111 2222 3333 4444
  1234 1234 1234 1234
1 ---- ---- ---- ----
2 ---- ---- ---- ----
3 ---- ---- ---- ----
4 ---- ---- ---- ----

Four layers of 4×4 boards. The display shows all four layers side by side. Your move is two digits: layer and position.

The impressive part is buried in the binary: I have a force win:

The AI can detect guaranteed winning sequences. In a game with 76 winning lines across three dimensions, that's non-trivial computation for 1973.

wump — 5,386 bytes

The legendary Hunt the Wumpus, created by Gregory Yob in 1973.

# /usr/games/wump
Welcome to 'Hunt the Wumpus.'
The Wumpus lives in a cave of 20 rooms.
Each room has 3 tunnels leading to other rooms.

You are in room 12
There are tunnels to 3,11,13

Move or shoot (m-s) m
which room? 3

You are in room 3
There are tunnels to 2,4,12
I smell a wumpus

Move or shoot (m-s) s
Give list of rooms terminated by 0
2
0
You slew the wumpus

This game invented the survival-horror genre before that was a phrase. You navigate a procedurally generated dodecahedral cave containing:

  • One Wumpus (kills you if you enter its room)
  • Two bottomless pits (instant death)
  • Two super bat colonies (teleport you randomly)

Your only weapon: five arrows that can travel through multiple rooms. Your only intel: sensory warnings.

"When you are one room away from some other hazard: Bat - 'Bats nearby' Pit - 'I feel a draft'"

Wump directly influenced Adventure (1976) and the entire text adventure genre. Every modern survival game owes something to 5,386 bytes of C.

chess — 14,310 bytes

The crown jewel. A complete chess program with an opening book.

$ strings /usr/games/chess | head -10
Chess
/usr/lib/book       <- Opening book file!
kqrbnp PNBRQK       <- Piece notation
   a b c d e f g h  <- Board display
Resign
Illegal move

Features:

  • Algebraic notation (e2e4)
  • Opening book library at /usr/lib/book
  • Clock/time tracking
  • Draw by repetition detection
  • The computer can resign when losing

This ran on a PDP-11/45 with 256KB of RAM (shared among all users). The entire program—UI, move generation, evaluation, search—fits in 14KB. Modern chess engines measure their neural networks in gigabytes.

What's Missing (That's Interesting)

No source code. Unlike the kernel in /usr/sys/ken/ and /usr/sys/dmr/, the games survive only as binaries. They were probably:

  • Personal projects by Bell Labs employees
  • Not considered "official" Unix
  • Simply not copied to this particular tape

We can only analyze them through strings output and gameplay.

Cultural Artifact

These games weren't frivolous. They served purposes:

  1. Stress relief — Debugging sessions on the PDP-11 could run for hours
  2. Demos — "Look what Unix can do" for visiting researchers
  3. Recruiting — Young CS graduates were lured partly by the games
  4. Research — The ttt learning system was legitimate AI experimentation

The total size (26KB) matters. This was an era when memory was measured in kilowords. Every byte was precious. That someone spent 14KB on chess—more than the entire games directory combined—shows how much they valued it.

Playing Them Today

# FreeBSD
pkg install open-simh
wget http://squoze.net/UNIX/v4/disk.rk
wget http://squoze.net/UNIX/v4/unix_v4.tap

pdp11
sim> set cpu 11/45
sim> att rk0 disk.rk
sim> att tm0 unix_v4.tap
sim> boot -o tm
=uboot
kunix
login: root
# /usr/games/wump

See Resurrecting Unix V4 for the full boot guide.

The 51-Year Question

Why do these matter?

Because they prove that play is fundamental to computing. Before Unix had a spell checker, it had Wumpus. Before vi existed, Bell Labs programmers were learning chess openings from a 14KB binary.

The tape sat in a Utah closet for half a century. When it was finally read in December 2025, the kernel made news. But in /usr/games, we found something more human: evidence that the people who invented modern computing also needed to take breaks.

26 kilobytes of fun. Still playable. Still fun.

Appendix: Binary Analysis

Game Size Type Notable Strings
moo 624 executable "bulls", "cows", "bad guess"
bj 1,562 executable "Insurance?", "Double down?"
ttt 2,192 executable "Accumulated knowledge?", "I concede"
cubic 2,468 executable "I have a force win:"
wump 5,386 pure exec "I smell a wumpus", "Bats nearby"
chess 14,310 pure exec "/usr/lib/book", "Resign"

"Pure executable" means position-independent code—the text segment could be shared between multiple running instances. An early optimization.

References

Author: Jason Walsh

j@wal.sh

Last Updated: 2025-12-25 00:37:17

build: 2025-12-25 00:39 | sha: c12aa62