Tic-Tac-Toe is a relatively simple game, and one of the few which has effectively been solved for perfect play. The nature of the game made it possible for [Joost van Velzen] to create a LEGO machine that can play the game properly in an entirely mechanical fashion.
The build features no electronics to speak of. Instead, it uses 52 mechanical logic gates and 204 bits of mechanical memory to understand and process the game state and respond with appropriate moves in turn. There are some limitations to the build, however—the game state always begins with the machine taking the center square. Furthermore, the initial move must always be played on one of two squares—given the nature of the game though, this doesn’t really make a difference.
It’s also worth heading over to the Flickr page for the project just to appreciate the aesthetics of the build. It’s styled in the fashion of an 18th-century automaton or similar. It’s also been shared on LEGO Ideas where it’s raised quite a profile.
If you’ve ever wanted to think about computing in a mechanical sense, this build is a great example of how it can be done. We often see some fun LEGO machines around these parts, from massive parts sorters to somewhat-functional typewriters.

To expand on why only 2 possible initial user moves is sufficient:
One is a corner square and one is an edge square. By rotating the game board, you can actually use those 2 initial choices to occupy any of the edge squares. Since the machine always goes first and always chooses the center spot, the 2 choices plus rotation actually covers all your choices.
I’m at a loss for words. This is fabulous.
form and function in the same build. im impressed. and i haven’t even watched the video yet.
This is incredible. I would love to read more about it, and about other mechanical computers (like the pascaline).
This is beyond my IQ
Wow, this is so cool. Great project.
That’s beyond cool. Kudos!
Someone did this in the 1970s using Tinkertoys, an earlier (wooden) construction system:
https://ix.cs.uoregon.edu/~michaelh/110/ttoy/ttoy.html
Average so-called “manager” can be replaced by such machine that will probably be making better decisions and would work for free (and would be powered by one of those $3 garden solar lights panel).
We should have started be replacing managers with tic-tac-toes in the early 1990s when it became apparent they know jacks**t about what they are “managing”. Time wasted.
Is this noughts and crosses?