In 1809, Napoleon Bonaparte sat down at a chessboard inside Schönbrunn Palace in Vienna and lost. The man who beat him wore a turban, held a long pipe in one hand, and was made of wood.
That is how the story was told for more than eighty years. A mechanical chess player built in the 18th century that could think its way through one of the hardest games humans had ever invented. It beat nobles and statesmen and some of the best players in Europe, and nobody could say exactly how.
The story starts in 1769 when a French illusionist performed at the court of Empress Maria Theresa. A court official named Wolfgang von Kempelen watched it and said he could do something more impressive. He promised to return within a year with something that would make the illusionist look small, and he came back with an automaton chess player called the Mechanical Turk.
Also Read: The invention that cost the inventor his head
It was a life-sized figure dressed in Ottoman robes, sitting behind a wooden cabinet with a chessboard on top. Kempelen presented it as an automatic chess-playing machine, and before every game, he would open the cabinet doors one by one so everyone could inspect the gears and clockwork inside. He would then announce the machine was ready to play and invite someone to challenge it.
The Turk nodded three times when it gave a check, and if someone tried an illegal move, it shook its head, put the piece right back, and made its own move. It could even finish the knight’s tour, a famous puzzle in which you have to move the knight along the chessboard visiting each square exactly once, something that even most experienced players struggled with.
It toured Europe, played Benjamin Franklin in Paris, and eventually got its turn with Napoleon.
The most trusted version of the story goes like this: Napoleon made the first move himself, which was the opposite of what the Turk usually did, then tried an illegal move, and the Turk calmly put the piece back. He tried it again and the Turk took the piece off the board, and when he tried the third time it swept its arm across and knocked every piece over. Napoleon found it funny, and then played a game properly, which he lost just after nineteen moves.
So how did a wooden figure beat Napoleon?
For decades nobody could say for sure. Some were sure there was an evil spirit in the Turk; others swore a child or a dwarf was curled up inside. Pamphlets kept claiming to have cracked it, and a few came close, but none of them ever managed to fully explain the whole mechanism.

The truth is that there was a skilled chess player hidden inside the cabinet operating the Turk, and the whole machine was built to hide him. The clockwork people saw through the open doors only filled a small part of it. Behind that was a hidden space where a grown man could sit, and a sliding seat moved him out of sight each time a door opened.
Once the doors closed, he would light a candle to see by, whose smoke got carried by a series of tubes up into the turban of the Turk, where it blended in with the smoke from the room’s own candles. Every chess piece had a tiny magnet in its base, and under each square of the board hung another magnet on a string. When a piece was set down, the magnet below got attracted toward it, which let the operator know which piece had moved where on the chessboard and replicate the move on another chessboard inside the cabinet.
To make the Turk move, he had a metal pointer linked to the figure’s arm by a system like a pantograph. Moving the pointer over the interior board would make the Turk’s arm travel over the real chessboard on the cabinet, and using a lever, he could open and close its hand to grip a piece. Other parts of the machinery whirred with every move to produce a clockwork sound, which made it feel more like a machine at work.
Also Read: The first vending machine was built nearly 2,000 years ago
All of this remained largely secret until one hot day in Baltimore in 1827. The chess master playing inside started feeling faint, so he signalled for the game to stop, but before the showman could do anything, he climbed out of the cabinet. Even then, most of the audience missed it, and it was only two teenagers enjoying a free view of the show from a nearby rooftop who saw and understood everything.
One told his father, who took it to the local newspaper, and it made the front page. But almost nobody believed it. Some thought the showman had planted the story himself to keep everyone curious, and his business was barely affected.
The Turk burned down in a Philadelphia museum in 1854, and only afterwards did the son of one of its last owners write down the whole secret.
In the end, the Mechanical Turk was never an autonomous chess-playing machine. But it was certainly one of the most remarkable, carefully designed machines of its time, good enough to fool crowds for more than eighty years.
Story Sources: Wikipedia, BBC, Wired, Chess.com, History, ABC