As a aside, this is especially useful in variants like giveaway/suicide chess when computing and storing complex forced wins. For example, 1. f4 loses to e5. So 1. e3 f5 will lose to e4...sje wrote:It can also be used during opening book generation when (position, move) pair data are all stored using a White-to-move convention; this allows retrieval of "reversed" opening data.
Even further aside, doing this resulted in a wonderful bug. I store enough of the tree so that when the book is left, the resulting position can be solved in under 10 million nodes via proof number search. Which worked wonderfully until one day it got a hit with a color flip, used 50 million nodes, ran out of memory, panicked, played a random move and managed to lose the game. This would be when I learned that PN search can be very sensitive to the order moves are generated in, since this effectively provides a tiebreaker for when proof numbers are equal. Now my engine always thinks it is playing white, it is just that sometimes black moves first... :)
-paul
