Hardware

Logic in Motion: The LEGO Machine That Solved Tic-Tac-Toe

Joost van Velzen bypasses silicon and code to build a purely mechanical computer out of toy bricks.

··4 min read
Logic in Motion: The LEGO Machine That Solved Tic-Tac-Toe

While my colleagues are currently losing their minds over scaling laws and the raw FLOPS required to train multi-trillion parameter models, a creator named Joost van Velzen has offered a necessary reality check. Intelligence is not strictly a matter of electricity. It is a matter of logic.

As reported by Hackaday, van Velzen has constructed a machine made entirely of LEGO components that plays a perfect game of Tic-Tac-Toe. It contains no microchip, no battery, and not a single line of binary code. It is a purely mechanical computer designed to navigate a deterministic state space using gears, levers, and linkages.

When you spend most of your time looking at loss curves and probabilistic weights, there is something deeply grounding about seeing a decision tree expressed in plastic. In research circles, we often benchmark models on their ability to reason through games. Tic-Tac-Toe is what we define as a solved game. This means that if both players play perfectly, the game will always end in a draw. The strategy is finite, the outcomes are predictable, and the entire decision tree can be mapped out with absolute certainty. Van Velzen took this mathematical certainty and translated it into a physical sequence of movements.

The Architecture of Physical Logic

The machine operates as a physical manifestation of a lookup table. When a human player makes a move, they are essentially inputting a variable into a mechanical system. This input triggers a series of physical gates. Instead of a CPU processing a series of if-then statements, the LEGO machine uses the physical geometry of its parts to determine the counter-move.

The engineering here is staggering. The builder has to account for every possible permutation of a three-by-three grid.

Building this in a digital environment takes ten minutes of coding. Building it with physical bricks requires an intimate understanding of how motion can be diverted and stored. Each move made by the human shifts the internal state of the machine, narrowing down the available mechanical paths until the machine selects its response. It is a masterclass in how we can simplify complex systems into tactile hardware. We often forget that before the silicon age, pioneers like Charles Babbage were attempting to build these exact types of analytical engines using nothing but brass and gravity.

Solving the State Space Without Silicon

From a researcher's perspective, the most fascinating part of this project is how it handles the game tree. In a standard AI model, we might use a minimax algorithm to evaluate the best possible move by looking ahead at all potential future states. Van Velzen's machine does not need to look ahead because the solution is baked into its very structure. The physical constraints of the LEGO linkages act as the algorithm itself.

This project serves as a reminder that much of what we call artificial intelligence today is actually just efficient data retrieval and pattern matching.

If a machine made of toys can achieve the same benchmark (perfect play in a solved game) as a high-end microcontroller, it forces us to re-evaluate where the intelligence actually resides. Is it in the medium, or is it in the mathematical framework that governs the game?

The Beauty of Constraints

Working with LEGO introduces significant mechanical friction and structural limitations. Unlike a digital circuit where a signal is either on or off, a mechanical system has to deal with the physical reality of plastic parts bending or gears slipping. Van Velzen had to engineer his way around these constraints to ensure the machine remained reliable. It is one thing to design a logical flow on paper. It is quite another to ensure that a series of plastic levers will consistently land in the correct position without a software override to fix errors.

I find this project to be a brilliant critique of our current obsession with complexity.

We tend to throw more compute at a problem until it disappears. Van Velzen did the opposite. He took a solved problem and stripped away every layer of modern technology until only the bare logic remained. It is a tactile, visible version of the algorithms we usually hide behind sleek glass screens and cloud servers.

Watching the machine think is a hypnotic experience. You can see the gears turning, literally, as it calculates its next move. It brings a level of transparency to computation that we have lost in the age of black-box neural networks. In our field, we talk a lot about explainability, which is the idea that we should be able to understand why an AI makes a certain decision. With van Velzen's machine, the explainability is right there in the open. You can follow the path of the movement from the input to the output.

By stripping away the invisible complexity of modern AI and replacing it with the visible motion of gears and bricks, van Velzen forces us to ask a difficult question. If we can build a perfect player out of toy plastic, are we over-complicating the way we define intelligence in the digital age? Perhaps the future of computing isn't just about making things faster or larger, but about finding the most elegant way to express the logic that was already there.

#LEGO#mechanical computer#hardware engineering#Tic-Tac-Toe#DIY tech