Theseus Bell Labs · 1950

Claude Shannon's maze-solving mouse. It explores by trial and error, stores one direction per square in relay memory, then runs straight to the goal.

Click a wall slot to add or remove a partition · click a square to move the goal · drag to orbit

Relay rack

Published accounts give about 40 relays for logic and 50 for memory. Shannon's wiring is not documented; the logic bank below is the 33-relay reconstruction drawn in the wiring diagram.

Memory bank0 of 50 energised
Two relays per square, b1 b0: 00 N01 E10 S11 W— never left

The white frame is the square the selector has connected; the yellow frame is the goal.

Logic bank0 of 33 energised

Wiring diagram

A relay ladder reconstruction that runs the same rule as the simulation. Each rung runs from the 48 V supply rail on the left to the return rail on the right. The numbers after each coil list the rungs that use its contacts, with a slash for normally closed ones.

Reading a relay ladder diagram

The basics

A ladder diagram is how relay control circuits have been drawn since the telephone and factory-control era. Programmable logic controllers still use it today.

  • Rails. The two vertical lines are the power supply: 48 V on the left and the return on the right.
  • Rungs. Each horizontal line between the rails is one circuit. Current flows left to right and ends in exactly one relay coil. The number on the left is the rung number.
  • Series means AND. Contacts in a row must all be closed for current to reach the coil.
  • Parallel means OR. Where a rung splits into branches, any one closed branch is enough.
  • Contacts belong to coils by name. A contact labelled SQ1 is a pair of switch springs on relay SQ1. When the SQ1 coil is energised, every SQ1 contact on every sheet changes state at once. One relay can carry many contacts.
  • Rungs are not steps. All rungs are live at the same time, like real wiring. Order comes only from relays switching each other on and off.
Symbols
Worked example: the latch

This is the run holding circuit, simplified. Pressing PB-EX sends current through to the HOLD coil. HOLD operates and closes its own contact in the branch below, so when you let go of the button, current keeps flowing through that branch and HOLD stays on. This is called a holding or stick circuit, and it is how relays remember anything at all.

The normally closed BELL contact breaks the rung when the goal bell rings, and HOLD drops out. Every memory relay in Theseus is the same idea: a coil held on by its own contact.

Tags and cross-references
SR
Slow-release relay. A copper sleeve on the core keeps the contacts held for a few tens of milliseconds after the coil loses power. It bridges brief gaps and creates short overlap pulses.
LM
Late-make contact. It closes slightly after the relay's other contacts, which gives another relay time to act first.
13 /17
The numbers beside a coil list the rungs where that relay's contacts appear. A slash marks a normally closed contact. Use these to follow a signal from sheet to sheet.
Cᵢ Rⱼ
On the memory sheet, i and j stand for the column and row of the square being drawn, which is the square under the carriage.
Live colours

As the mouse runs, amber marks a contact that is currently closed or a coil that is energised. A rung conducts when there is an unbroken amber path from the left rail to its coil. Try following rung 19 (BACK) the moment a whisker touches a wall.

Design notes

Heading is mechanical. The direction register is the turning shaft itself. Cams on the shaft drive D1 and D0, and a step is one 90° turn of the shaft from detent to detent, so no relay counter is needed.

Shannon's rule in three steps. Step 1 turns the shaft until it matches the square's memory. While exploring, entering step 2 fires one STEP, so the mouse tries the next exit clockwise. Step 3 drives forward and writes the heading into the square as the carriage departs. A whisker hit backs the carriage home and fires another STEP, so the last exit written is always the one that worked.

Timing tricks from telephone practice. Slow-release relays (SR) hold their contacts for a few tens of milliseconds after the coil opens. That bridges the memory relays across a write and makes the overlap that produces each STEP pulse. The late-make RD contact (LM) gives the mismatch relay time to operate before step 2 can pick up.

A consequence of relays. A cleared memory pair reads 00, north, so on a first visit the mouse tries east first. The simulation above now does the same.

On the count. Each column and row relay needs a contact for every cell in its line, more springs than one relay carries. A real build would add relays to multiply those contacts, which could explain some of the gap between 33 here and Shannon's roughly 40.