The most famous mechanical Tic Tac Toe computer is arguably the The Tinkertoy Computer, built in the late 1970s by MIT students. While impressive, it was massive (130×122×89 cm). The machine presented here - the "XXO-Master" - is much smaller (20×12×12 cm without the stand) and plays a perfect game of Tic Tac Toe (noughts and crosses). The human 'X' always goes first and the machine will always perfectly reply with 'O'.
The machine in action
The Concept
The high-level idea is a large physical lookup table that outputs a specific move (1-9) for a given board pattern. The mechanism is inspired by Edge-notched cards, a vintage system used to implement "paper databases" by selecting cards based on physical cutouts.
The XXO-Master adapts this concept. Each card features slots representing the 9 field states. If a card's slots match the current position of the rods, that specific card drops down one level. On this second level, the card has wide horizontal slots for every rod except the reply rod. When the machine slides the dropped card sideways, it forces the reply rod into the 'O' position while leaving the other rods untouched.
Initially, a full game tree required 301 different states (reply moves for all reachable board setups). If printed at 1 mm thick, 301 cards would result in a machine over 30 cm long and very heavy. The core challenge was optimizing the game tree to keep the machine compact. Ultimately, I reduced the logic down to just 65 cards to cover all reachable reply moves.
If you are interested in more details, check out my explanation video
14th June 2026 - Slightly adjusted the top-right vertical edge on certain card fields. This prevents the card from accidentally nudging adjacent "X" rods to the left when inserted.
Additional Material
20× M3 screws (6mm is ideal, but slightly different lengths should work as well).
36× Neodymium magnets (4×1mm): These are strictly required to keep the gears centered. If the gears drift, the rods become off-center, and the logic cards will fail to drop.
Glue (Just a small amount of superglue glue).
Safety Warning: Keep the magnets away from children! They are tiny and dangerous if swallowed. (Once printed, they are safely permanently embedded inside the plastic).
Print Instructions
Layer height: 0.2mm
Orientation: All files are already oriented correctly.
Notes: See notes below each file with part specific instructions
Supports: None required, except for a tiny bit of support material under the release handle.
Tolerances: The machine relies on tight tolerances. Use dry filament and avoid warped objects! The logic cards must come out perfectly flat, or they will tangle and jam the machine.
Bed Capacity: On a standard bed (like the MK4 which I have), you can fit 3 cards per plate (with one rotated). You will need 22 print runs to produce all 65 cards.
Magnet Pauses (Crucial!)
You must insert a pause command (M601) in your slicer to embed the magnets mid-print. In PrusaSlicer, the pause is executed before the selected layer prints:
Gears: Pause at Layer 10.
Frames (frame_front.stl and frame_back.stl): Pause at Layer 14.
Magnet Insertion Tip: Magnets this tiny easily flip around. Take your stack of magnets and wrap a piece of colored tape around one end to mark the polarity. For each hole in the print, press the untaped end of the stack into the cavity and slide the stack sideways to strip off a single magnet. Ensure every magnet sits completely flush below the nozzle line before resuming the print!
Multicolor Printing (Optional)
Front Cover Text (MMU Required): Import frame_cover.stl and frame_cover_text.stl together. PrusaSlicer will ask if they are a single object with multiple parts - click Yes. Assign your colors, ensuring the text STL is second in the object list.
Indicator Plates: You have three options for highlighting the 'X' and 'O':
Add a manual filament change at Layer 8 (the letters will share a color).
Use the Multi-Material Painting tool (if you have an MMU/AMS).
Print them in a solid light color and simply color the raised letters with a permanent marker.
Building Instructions
Please refer to the attached "Build Instructions for XXO-Master.pdf" for a complete step-by-step assembly guide.
How to use the Machine
How to play
Enter your move as the first player ('X') by turning your chosen knob to the right.
Pull the release handle on the right-hand side.
Listen for a drop - one card should fall down inside the machine.
Push the release handle back to its original position. This will slide the card and one of the gears to the left, revealing the machine's reply move ('O').
How to reset
Resetting a physical computer can sometimes be a tricky process:
Flip the machine over.
Pull the release handle.
Try to move one card back to its original position (one card after the other!)
Move the card horizontally
Gently push the card down. If a card resists:
Move it back and try another card.
If this doesn't work for any card: Try to move the front knobs to the center position and try to push the card down again
Rare case: If it is truly stuck, pull one or more rods forward so the card can fall freely (note rods can only be pulled out when they are in the center position!).
Do not force it! Pay special attention to the card-holding rod, which is the most common spot for a card to catch. Sometimes shifting a single card out first helps align the rest.
Once all cards are down, push the release handle back in to lock them in their starting positions.
Flip the machine back over to play again.
Note: If you find an easier approach to reset the machine, or if you have ideas on how to improve the design to make the reset process smoother, please let me know!
FAQ
Why did the machine output a "wrong" move? This only happens if the release handle is pulled during an invalid board state. For example:
It is not the machine's turn (the machine is strictly Player 2 and only calculates replies to 'X').
You entered a board state that is impossible to reach in a normal game.
Why did the machine output two or more moves in the same row? It likely happened that the indicator plates were misplaced i.e. all on the same rail (see build instructions for more details on how to place them correctly)
I entered a move but no card is falling down? All cards must be as flat as possible. If one card is warped it will push against the others: In that case throw it away and reprint it! It may help to rub the cards against each other to remove any dirt or 3d print leftovers. It may also depend on the filament and speed settings (slower worked a bit better for me). Often, it also gets better after you played a few games.