### Heuristic Trial and Error

It is an especially interesting fact that the computer arrives at the filter circuits by a method that is beyond the resources of an old-type calculating machine. The robot resorts to a very human method - the way out taken by every schoolboy when he cannot find the answer to a sum in the approved way - a method that was taboo in scientific circles until a few years ago: it uses trial and error, trying out every possibility that occurs to it. It works out the way the desired filter will operate using different values until the result corresponds with sufficient exactitude to what the engineer had envisaged. A decision must previously have been made, and incorporated in the program, on the degree of permissible disagreement. Of course, the computer does not probe for its solution in a haphazard fashion, but according to a programmed-in system which ensures that the numbers selected when each attempt is made are such that a solution will be reached as quickly as possible.

An example of such a method of testing - a very simple example - will help to explain it. Let us assume that a computer has to extract the square root of 100, by this "heuristic" or guided trial and error method. (The square root of 100 is 10 - for 10 x 10 = 100.) The calculator tries first of all with a number lying between 100 and 0 - say 30. It tries multiplying 30 by 30 and obtains 900. That is too much. So it chooses a small number, 2. 2 x 2 = 4. Too little! So the square root of 100 must be somewhere between 2 and 30. The computer takes the average, 16. 16 x 16 = 256. That is still too much compared with 100. So it tries with 9, the average of 2 and 16. 9 x 9 = 81. Now the computer has approached close to 100, and after another four calculations according to this "averaging" method, in which the average of the results nearest to 100 is continually I sought, the computer knows that the square root of I 100 is in the region of 10.3125. Three more calculations I bring the average to 10.0390625. Another three and it I has arrived at 10.0048828125. Three further tries and I it has reached 10.0006103515625, and now we hope that the programmer will be kind enough to acknowledge this result as a fair enough approximation to the correct solution (the number 10).

If an attempt is made to solve in this systematic way a simple problem such as the extraction of a root, a sensible answer can always be expected. We cannot be equally hopeful in the case of more complicated mathematical problems. The computers are therefore instructed, when they have to clear up much more difficult undertakings by this "approximating averages" process, to take into account the successive stages of the calculation procedure they have used, and if after - say - 1,000 attempts, success still eludes them, to lay down the tools and say "It can't be done!"

The Monte Carlo Test >>>>

First printed in Germany: 1963