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.
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.
The white frame is the square the selector has connected; the yellow frame is the goal.
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.
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.