Patterns in Chess Square Enumerations
In my bit manipulation post awhile back I posed a problem involving "closed form" calculation of chess endgame table indices. Back when I originally solved the problem, it was a big help to create some visualizations of some of the patterns embedded in the square numbering scheme. I had mentioned that I thought the patterns were interesting, so I thought I'd come back and elaborate on that statement. One way of visualizing some of the patterns involved is to partition the squares according to the equivalence classes defined by the binary bits of the index. Bits 0-2 are the three low-order bits and bits 3-5 are the three high-order bits. Here are the equivalence classes defined by each of the bits of the natural square numbering. Bit 0 70 71 72 73 74 75 76 77 60 61 62 63 64 65 66 67 50 51 52 53 54 55 56 57 40 41 42 43 44 45 46 47 30 31 32 33 34 35 36 37 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 Bit 3 70 71 72 73 74 75 76 77 60 61