At first glance, Brain Teaser appears deceptively simple but, unless you are very lucky or very smart, you will use far more than the six maximum moves needed to solve this puzzle.
The program begins by setting up a 3 x 3 playing board. The board is randomly filled with 0's and one or more 1's.
The object of the puzzle is to change the patterns of 0's and 1's until the board had a 0 in the center and 1's in all other positions.
Brain Teaser was written by Hal Knippenberg and published as type-in source code in Creative Computing Vol. 5, No. 7, July 1979.