Page:Passages from the Life of a Philosopher.djvu/485

Rh were remarkably simple. A difficulty, however, arose of a novel kind. It will have been observed, in the explanation I gave of the Analytical Engine, that cases arose in which it became necessary, on the occurrence of certain conditions, that the machine itself should select one out of two or more distinct modes of calculation. The particular one to be adopted could only be known when those calculations on which the selection depended had been already made.

The new difficulty consisted in this, that when the automaton had to move, it might occur that there were two different moves, each equally conducive to his winning the game. In this case no reason existed within the machine to direct his choice: unless, also, some provision were made, the machine would attempt two contradictory motions.

The first remedy I devised for this defect was to make the machine keep a record of the number of games it had won from the commencement of its existence. Whenever two moves, which we may call A and B, were equally conducive to winning the game, the automaton was made to consult the record of the number of the games he had won. If that number happened to be even, he was directed to take the course A; if it were odd, he was to take the course B.

If there were three moves equally possible, the automaton was directed to divide the number of games he had won by three. In this case the numbers 0, 1, or 2 might be the remainder, and the machine was directed to take the course A, B, or C accordingly.

It is obvious that any number of conditions might be thus provided for. An inquiring spectator, who observed the games played by the automaton, might watch a long time before he discovered the principle upon which it acted. It is also worthy of remark how admirably this illustrates