Monday, March 19, 2007

Sudoku and Universal Selection

Anticipating the future and managing risk is an essential aspect of human endeavors and is a core activity for biological organisms. Internally, the same dilemma arises with immune systems trying to manage the constant flux of parasitic organisms that strive to use our energy for personal gain. Because the threats are constant and changing, an organism needs a universal toolkit for solving problems in both the external and internal environments.

I had never done a Sudoku puzzle before about two years back, and only recently tried them in earnest. They are an interesting mental exercise that combines well with other activities like watching TV (an activity I also recently succumbed to after getting an HD DVR). My Sudoku strategies that I have developed involve several levels of activities. First, an almost gestalt-like visual scanning for same number distributions in vertical and horizontal patterns. Next, each of these is checked with greater attention to look for possible fill-ins of missing information. Vertical and horizontal fill-ins are a next step, along with block fill-ins. But then something interesting happens with hard or very hard Sudoku: they become unsolvable without guessing. Guessing is not actually needed, really, since one could just go through every possible combination, looking for inconsistencies down the search tree of available patterns, but only computers have the ability to do that effectively. Instead, I look for possitions that might yield progress and have only two disputed positions (three sometimes for mega hard puzzles), and guess. Then I try to carry through the implications of that guess and check for failures. I write the guesses in the upper right-hand corner of the boxes and circle the initial guess. I then carry forward the implied results, also writing them in the upper right of the boxes. Sometimes this goes two-deep, with the need for a second round of guessing, which I write in the upper left corner. If an inconsistency emerges, I can erase the set of guesses back to the initial two and rearrange and try again. This is essentially depth first search but using a semi-random initial selection. The actually fill-ins are truly random, but the choice of location to try is based on vague ideas of coverage (how many rows, columns or blocks can I complete or progress on by trying these values?)

Now, the ability to complete Sudoku doesn't seem to have any particular survival value relative to primitive human survival. It doesn't help throw rocks at game or understand the lay of the land. So it must be a side-effect of a generalized ability to solve problems that utilizes search, elimination and selectionist principles. The ability to think about the implications of any move only goes about two configurations deep for me without the extended notation of writing them down. I'm sure others can do better, but that doesn't change the basic mental activities of randomness combined with search.

A variation on this theme struck me years back when reading Gary Cziko's excellent Without Miracles: Universal Selection Theory and the Second Darwinian Revolution. I actually used a similar type of word problem to argue that universal selection ideas added very little to the explanation of the problem solution because the random component could be replaced with brute force search without any change in the efficiency of the search strategy (other than the gestalt initial choice). I think that misses the point, however, in that I really do make a choice randomly about the assignment, whereas a computer search algorithm would make that choice according to whatever programming it had been given (assign the numbers to the squares lowest to highest; assign the numbers randomly; assign the numbers according to a reading of the I Ching). My programming, if you will, has me choose randomness as the preferred strategy because I see the other strategies as irrelevant to solving the problem and therefore use the easiest method of guessing. When uncertain, guess the answer! I seem to remember this strategy in differential equations: look at the form of the problem, guess the answer, work out the constant.

No comments: