simon-svn: puzzles: simon

tartarus-commits at lists.tartarus.org tartarus-commits at lists.tartarus.org
Tue May 31 12:19:11 BST 2005


SVN root:       svn://ixion.tartarus.org/main
Changes by:     simon
Revision:       5875
Date:           2005-05-31 12:19:11 +0100 (Tue, 31 May 2005)

Log message (19 lines):
Improved the limited shuffle mechanism in Sixteen and Twiddle. They
were already making sure that no shuffle move was the precise
inverse of the previous one, or contributed to repeating the
previous one so many times as to turn it into effectively fewer
moves (doing the same rotation three times in Twiddle, or shifting a
row by more than half its length in Sixteen). However, they were
only checking against the _last_ move, which meant that in any
situation where there were completely disjoint move spaces (4x4n2
Twiddle, or any Sixteen at all) it was still possible to have A then
B then inv(A) occurring in the shuffle, leading to an unnecessarily
easy game.

Now both shuffle routines keep separate track of all
_non-overlapping_ recent moves, and will avoid inverting any move
which hasn't had another move overlap it since it was made. This
should reduce the incidence of too-easy limited shuffle games,
although it can't be prevented _entirely_ (since, if nothing else,
it's always possible to increase the shuffle limit past the maximum
group radius).

Modified files:
U   puzzles/sixteen.c
U   puzzles/twiddle.c

Links:
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi?rev=5875&view=rev
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/puzzles/sixteen.c?rev=5875&r1=5874&r2=5875
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/puzzles/twiddle.c?rev=5875&r1=5874&r2=5875



More information about the tartarus-commits mailing list