A game whose winning position can be calculated
Nim looks like a simple contest of taking objects from piles: on each turn, a player removes one or more objects from a single pile. The usual goal is to take the last object. But beneath that simplicity is a precise mathematical structure. A player who knows the right calculation can steer the game toward a position where every legal move gives the opponent an advantage.
The key is the nim-sum: write each pile’s size in binary, then combine the numbers digit by digit using a rule that returns 1 when the digits differ and 0 when they match. If the result is zero, the position is losing for the player whose turn it is, assuming perfect play. If it is not zero, there is a move that makes it zero.
Turning strategy into switches and lights
For Nimatron, this logic did not need a modern computer screen or software. Its electromechanical relays—switching components that route electrical signals—could represent the game’s possible states and carry out the calculation. When a person made a move, the machine registered the changed position, worked out a response, and indicated its choice through the game’s controls and lights.
That distinction matters: the machine was not searching through every possible future in the way people often imagine a computer “thinking.” Nim’s rules make a winning response computable directly. The relay network could apply the strategy quickly and consistently, making the machine a physical demonstration that a game requiring judgment could also be reduced to a procedure.
Why make a fast machine wait?
A response delivered almost immediately might have made the contest feel less like a game and more like watching a mechanism operate. The added pause gave the human opponent time to experience the turn—and made the machine’s move feel deliberate. It also exposed the contrast at the heart of Nimatron: a person had to reason through a changing puzzle, while the machine could apply the same mathematical rule whenever the board changed.
The memorable trick was not that the machine could calculate at all, but that its advantage came from the structure of the game. Against a perfect Nim player, there is no winning move to find; against everyone else, the arithmetic can quietly decide the contest.





