ARTIFICIAL INTELLIGENCE

The inside story of an ingenious chess-playing machine that thrilled crowds, terrified opponents, and won like clockwork.

One autumn day in 1769, a 35-year-old civil servant was summoned to the imperial court in Vienna to witness a magic show. Wolfgang von Kempelen - well versed in physics, mechanics, and hydraulics - was a trusted servant of Maria Theresa, the empress of Austria-Hungary. She had invited him in order to see what a scientific man would make of the magician's tricks. The event was to change the course of Kempelen's life.

For he was so unimpressed by the performance that, once it was over, Kempelen made an uncharacteristic and audacious claim. In front of the whole court, he declared that he could do better. Maria Theresa could hardly allow such a boast to pass without comment. Very well, she said. Excusing Kempelen from his official duties for six months, the empress challenged him to keep his word. Kempelen agreed not to return to the court until he was ready to stage a performance of his own.

He did not disappoint. In the spring of 1770, Kempelen reappeared before the empress and unveiled an extraordinary machine: a life-size mannequin seated behind a cabinet. The figure was made of carved wood and wore an ermine-trimmed robe, loose trousers, and a turban. The wooden box was 4 feet long, 2.5 feet deep, and 3 feet high, and rested on four brass casters. This meant the whole contraption could be moved around and rotated freely, so that it could be viewed easily from every angle. The front of the cabinet was divided into three doors of equal width, with a long drawer along the bottom. The wooden figure sat with its right arm extended, resting on the cabinet top, and its eyes stared down at a large chessboard directly in front of it. Its left hand held a long Turkish pipe, as though it had just finished smoking.

Stepping forward to address the audience, Kempelen announced that he had built a machine the likes of which had never been seen: an automaton, or mechanical toy, capable of playing chess. A skeptical murmur passed through the crowd. Kempelen explained that before demonstrating his invention, he would display its inner workings. He reached into his pocket and produced a set of keys, one of which he used to unlock the leftmost door on the front of the cabinet. Kempelen opened it to reveal an elaborate mechanism of densely packed wheels, cogs, levers, and clockwork machinery, including a large horizontal cylinder with a complex configuration of protruding studs, similar to that found in a musical box. As the audience scrutinized these workings, Kempelen opened another door directly behind the machinery and held a burning candle so that its flickering light was visible to spectators through the intricate clockwork. He then closed and locked the rear door.

Kempelen returned to the front, where he pulled out the long drawer to reveal a set of chess pieces in red and white ivory; he placed these on the top of the cabinet. Next, he unlocked and opened the two remaining doors in the front to reveal the main compartment, which contained only a red cushion, a small wooden casket, and a board marked with gold letters. Kempelen placed these items on a small table near the automaton.

Leaving all the doors and the drawer open, Kempelen rotated the automaton so that its back was to the crowd. Lifting up its robe, he revealed a small door in the figure's left thigh and one in its back, both of which opened to show more clockwork machinery. Kempelen then closed all the doors and the drawer, replaced the robe, and returned his contraption to its original position facing the onlookers. He slid the cushion beneath the figure's left elbow, removed the long pipe from its left hand, put the chess pieces on the appropriate squares, and reached inside the cabinet to make a final adjustment to the machinery. Finally, he placed two candelabras on top of the cabinet to illuminate the board.

Kempelen announced that the automaton was ready to play chess against anyone prepared to challenge it, and recruited a volunteer - a courtier named Count Cobenzl - from the audience. Kempelen explained that his mechanical man would play the white pieces and have the first move, that moves could not be taken back once made, and that it was important to place the pieces exactly on the center of the squares, so that the automaton would be able to grasp them correctly. The count nodded. Kempelen then inserted a large key into an aperture in the cabinet and wound up the clockwork mechanism with a loud ratcheting sound.

Once Kempelen stopped turning the key there was an agonizing silence. Then, after a brief pause, the sound of whirring and grinding clockwork could be heard coming from inside. The carved figure slowly turned its head from side to side, as though surveying the board. To the utter astonishment of the audience, the mechanical man then lurched to life, reaching out its left arm and moving one of its chessmen forward. The room cried out in amazement. The game had begun.

The sight of a machine playing chess was astounding enough, but the Turk, as it came to be known, also proved to be a formidable opponent. Count Cobenzl was swiftly defeated; the automaton was a fast, aggressive player, and subsequently proved to be capable of beating most people within half an hour. Kempelen, it seemed, had built a mechanical man whose clockwork mind could outthink most humans.

The Turk's sensational performance delighted the empress. Kempelen and his automaton made many more appearances before the royal family, government ministers of Austria-Hungary and of foreign countries, and other eminent visitors to the court. His extraordinary creation became the talk of Vienna, and the news of its triumphs quickly spread throughout Europe.

After the empress died, her son, Joseph II, commanded Kempelen to take the Turk on a tour of the courts of Europe. The inventor and his automaton went on to visit France, England, the Netherlands, and Germany. In Paris, the Turk defeated Benjamin Franklin, who, among his many other interests, was a chess fanatic. It suffered a rare defeat at the hands of a Frenchman known as Philidor, widely regarded as the finest player in Europe. Members of the Académie des Sciences, one of the world's foremost scientific societies, scrutinized the Turk, but they were no more able to fathom the secret of its operation than anyone else.

Wherever it went, the Turk inspired a torrent of pamphlets, newspaper articles, and books debating how it worked. Was it operated by a hidden chess-playing monkey? Was a child, a dwarf, or a legless war veteran lurking inside the cabinet? It seemed impossible; one eyewitness flatly declared that there was "no possibility of its concealing anything the size of my hat." Another school of thought suggested that magnetism, which was still only dimly understood, was involved. Perhaps, went the theory, Kempelen directed his contraption from a distance by moving a magnet in his pocket. Yet another explanation proposed that it was controlled by an offstage operator tugging on very thin wires. Or perhaps Kempelen was pushing tiny buttons, built into the Turk's cabinet, to direct its moves. There were also plenty of observers prepared to accept the automaton at face value as a genuine thinking machine.

After Kempelen's death, the Turk was bought by Johann Maelzel, a maker of musical automata who is also remembered as the inventor of the metronome (though he actually stole the design from someone else). Under Maelzel's ownership, the Turk toured Europe for many years. In 1809, it played its most famous game, against Napoléon Bonaparte, who attempted to fool it by making deliberately incorrect moves. After three such tries, the Turk ended the game in protest by sweeping its arm over the chessboard, knocking over all the pieces - to Napoléon's delight. Charles Babbage, the pioneer of the mechanical computer, was another famous opponent; he lost two games to the Turk. Babbage was certain it was under human control, though he was not sure how. But he started to wonder whether a genuine chess-playing machine could, in fact, be constructed.

Deeply in debt, Maelzel fled to America in 1825, taking the Turk with him. The mechanical man made regular appearances in New York, Boston, and Philadelphia, then toured the south and even went to Havana. A 26-year-old Edgar Allan Poe encountered the Turk in December 1835 in Richmond, Virginia. He concluded that it was controlled by someone hiding inside the cabinet, and the following year published an account of how he believed the operator remained hidden. The style of Poe's prose foreshadowed his later mystery and detective stories. Eventually, interest in the Turk waned, and it spent its last days in a museum in Philadelphia, where it was destroyed in a fire on July 5, 1854. After 85 years and countless chess games, the Turk's spectacular career was over.

__A fast, aggressive player, "the Turk" beat most people within half an hour. Its victims included Ben Franklin and, in a dramatic showdown, Napoléon Bonaparte. __

Kempelen's contraption was, of course, a hoax. It would have been impossible to build a genuine mechanical chess player using 18th-century clockwork technology. That so many people - even those who supposedly had scientific backgrounds - were taken in is not as surprising as it might seem, however. The Turk's debut occurred at the start of the industrial revolution, as the relationship between men and machines was being redefined; it was a time when new technology seemed to offer boundless possibilities. Why not a thinking, chess-playing machine?

That's what the great player Philidor seems to have thought, despite his victory against the Turk in the summer of 1783. That same summer saw the first public demonstration of a hot air balloon, by the Montgolfier brothers, in the south of France. The event caused a sensation in Paris and contributed to an intellectual climate in which people believed anything was possible.

The fabulous lineup of clockwork animals and mechanical men on show in Europe at the time also fostered the idea that the Turk might, after all, be genuine. From their origins as glorified clocks, automata had grown steadily more complex throughout the 18th century. One popular type was the mechanical picture - a painting with moving parts driven by an elaborate mechanism hidden behind or within the frame. Windup ornaments that dispensed cutlery, spices, water, and wine sat on the tables of many well-to-do families; mechanical dancers, animals, and singing birds decorated music boxes and snuff cases. An Englishman named James Cox made an 8-foot-high mechanical elephant encrusted with diamonds, rubies, emeralds, and pearls.

Other famous automata included a writer, a draftsman, and a harpsichord player constructed by Henri-Louis Jaquet-Droz, a member of a Swiss family of clockmakers. He programmed them to write, draw, and play music using irregularly shaped disks, called cams, threaded on to a spindle. As the spindle rotated, spring-loaded levers resting on the cams moved up and down and controlled the motion of the automaton's various parts by pushing and pulling on connecting rods. By paying meticulous attention to the shapes of the various cams, it was possible to program these figures to make coordinated movements of extraordinary grace and subtlety. Cams can now be found in all kinds of machinery; they are, for example, used to synchronize the opening and closing of valves in internal combustion engines.

The most famous automata of all were built by a Frenchman named Jacques de Vaucanson. In 1737, he displayed a mechanical flute player in Paris to great acclaim and allowed it to be scrutinized by members of the Académie des Sciences, in order to dispel any question of trickery. Juvigny, a French politician, wrote that "at first many people would not believe that the sounds were produced by the flute which the automaton was holding... The most incredulous, however, were soon convinced that the automaton was in fact blowing the flute, and that the breath coming from his lips made it play and that the movement of his fingers determined the different notes."

Next, Vaucanson built a boy who played a drum with one hand and a pipe held by the other; the sound of the pipe was even more dependent on the air pressure, the tonguing, and the position of the mechanical figure's fingers than the flute player's music was. But it was Vaucanson's third automaton that became his most famous. He decided to imitate an animal; the result, Vaucanson explained in a letter to a contemporary, was "an artificial duck made of gilded copper that drinks, eats, quacks, splashes about on the water, and digests his food like a living duck." It could stretch out its neck, take grain from a spectator's hand, and then swallow, digest, and excrete it. Its wings could flap and were anatomically exact copies of real ones, with each bone rendered in metal and adorned with a few feathers. While spectators were struck by how lifelike it appeared, Vaucanson was chiefly interested in the duck's innards, which he left exposed to view. The insides imitated the digestive process by dissolving grain in an artificial stomach, from where it was passed along a flexible tube and excreted. This involved a significant technological development, since it was the first time a tube had been made of India rubber, or caoutchouc. Such tubing proved to have many other uses.

Vaucanson became a celebrity; Voltaire described him as a "rival to Prometheus." Having built machines that could mimic respiration and digestion, Vaucanson made no secret of his dream of building an artificial man. He hoped it would be possible to use it "to perform experiments on animal functions, and thence to gather inductions to know the different states of health of men so as to remedy their ills."

In 1741, Vaucanson accepted a lucrative offer from the government to apply his mechanical ingenuity to the modernization of the French weaving industry. He drew up elaborate plans to transform manufacturing methods and work practices. But his scheme was abandoned when the silk workers of Lyons, who were to try out his new ideas, complained that they would be herded into factories and forced to act as mere drudges on a production line. Wary of becoming human parts in what would be, in effect, a huge automaton, they rioted in the streets, forcing Vaucanson to flee for his life. He returned to Paris and took a low-profile job as the official examiner of new mechanical inventions for the Académie des Sciences.

Kempelen was familiar with Vaucanson's work and shared his interest in building machines that could imitate human faculties. (In addition to creating the Turk, Kempelen spent many years researching the mechanism of speech, and in the 1770s he produced the first speech synthesizers capable of articulating entire sentences.) He must have been aware that most observers found Vaucanson's constructions incomprehensibly complicated. With the introduction of the steam engine and the power loom across Europe, there seemed to be no limit to the potential of mechanical technology. The Turk cleverly exploited this perception.

__After two games against the Turk, Charles Babbage began to sketch out plans for his own thinking machine. This was the genesis of the first mechanical computer. __

There are obvious similarities to the rise of the computer era in modern times. The creations of Vaucanson, Kempelen, and their contemporaries are arguably the ancestors of almost all modern machinery; automata occupied the same intersection of technology, entertainment, and commerce that computers do today. Then, as now, many people were ambivalent about the new machines. On one hand, they were fascinated - public exhibitions of automata were wildly popular in London and Paris during the 18th century - but they were also concerned that humans might end up being superseded. Just as science fiction movies of the 1960s featured evil robots and computers, 18th-century books and plays explored the dramatic possibilities of thinking machines, or of people concealed inside boxes and pretending to be machines. While many of these stories were straightforward comedies or romances, a darker mood was also abroad: The Turk's tour of Europe coincided with the Luddite riots and Mary Shelley's publication of Frankenstein.

In the end, the Turk was taken seriously because it provided a starting point for discussion of the promise - and limits - of machinery. Even scientific men who could see through the hoax enjoyed the debate spurred by the Turk. Robert Willis, a young Englishman who in 1821 published one of many books attempting to explain how the Turk worked, founded his argument on the assumption that a chess-playing machine was simply impossible. "The phenomena of the chess player are inconsistent with the effects of mere mechanism," he wrote, "for however great and surprising the powers of mechanism may be, the movements which spring from it are necessarily limited and uniform. It cannot usurp and exercise the faculties of mind; it cannot be made to vary its operations, so as to meet the ever-varying circumstances of a game of chess." Automata might be able to do clever things, he conceded, but they could not respond to events. They could not be, to use the modern term, interactive.

Even though Charles Babbage agreed with Willis that the Turk was a hoax, his experience with it led him to exactly the opposite conclusion about machine intelligence. Babbage had long toyed with the idea of building an automaton that could perform mathematical operations, and in 1821, shortly after playing his two games against the Turk, he sketched out his first plans for such a machine. This was the genesis of Babbage's first mechanical computer, the Difference Engine. Although he toiled for many years and spent an enormous amount of money - much of it provided by the British government - Babbage never completed it. One reason was that halfway through construction, Babbage dreamed up an even more ambitious machine: the Analytical Engine, which would be capable of far more complex calculations. He lost interest in the Difference Engine but was then unable to raise funds for his new design. Even so, Babbage's insight into the Analytical Engine's theoretical capabilities prefigured many elements of modern computer science. In particular, he argued that a suitably powerful mechanical engine would be able to play games of skill such as ticktacktoe, checkers, and chess. He even sketched out a rough algorithm for playing board games with movable pieces, including chess - the first time that anyone had attempted to devise one. Babbage concluded that, in theory at least, there was no reason why a genuine mechanical chess player could not be built, though its cost and size would make the idea impractical.

By the mid-19th century, public understanding of what mechanical technology could and could not do was on a firmer footing than at the time of the Turk's debut, and most people had come to regard chess-playing machines as improbable. With the rise of the telegraph - a revolutionary new form of communication - electrical devices began to eclipse mechanical ones as the embodiment of the technological zeitgeist. Little wonder that interest in the Turk declined. A few years after its fiery demise, nobody was terribly surprised when the truth emerged: The chess player had indeed been controlled by a concealed operator using a clever system of folding partitions to remain hidden while the automaton's interior was open to view.

The Turk is gone, but not quite forgotten. It is fondly remembered by historians of magic, chess enthusiasts, and, perhaps surprisingly, computer scientists. Indeed, Kempelen's contraption has taken on a new significance since the invention of the digital computer. Artificial intelligence researchers started writing chess-playing programs in the 1940s, showing just how prescient Kempelen had been in suggesting that the game was a good first step for machine intelligence. And with its setup of a man pretending to be a machine, the Turk anticipated the standard test proposed by British scientist Alan Turing in 1950: A device can be deemed intelligent if it can pass for a human in a written question-and-answer session.

Yet the most fundamental reason for the Turk's enduring popularity has only recently become apparent, following the construction of a replica by John Gaughan, a magician based in Los Angeles. Like Kempelen and Maelzel before him, Gaughan opens and closes the doors of his creation to reveal its empty interior; his Turk then springs into life. Even if you know how it works, the illusion is remarkably compelling. Ultimately, the original Turk's success depended on its spectators' deep-seated desire to be deceived. In more ways than one, Kempelen's chess-playing machine was an illusion that directly exploited the faculties of the human mind.