Incremental Transpositions

We introduce a distinction, in single-agent problems, between transpositions that are due to permutations of commutative moves and transpositions that are not. We show a simple modification of a depth-first search algorithm which can detect the transpositions of the first class without the use of a transposition table. It works by maintaining, for each node, a list of moves that are known to lead to transpositions. This algorithm is applied to two one-player games: a solitary card game called Gaps, and a game called Morpion Solitaire. We analyze, for each domain, how often transpositions are due to commutative moves. In one variant of Gaps, the algorithm enables to search more efficiently with a small transposition table. In Morpion Solitaire, a transposition table is not even needed. The best known sequence for this game is proved optimal for more than one hundred moves.