simon-git: puzzles (master): Simon Tatham
Commits to Tartarus CVS repository.
tartarus-commits at lists.tartarus.org
Thu Jan 15 20:36:42 GMT 2015
TL;DR:
cca302c Improve the Flood solver.
Repository: git://git.tartarus.org/simon/puzzles.git
On the web: http://tartarus.org/~simon-git/gitweb/?p=puzzles.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2015-01-15 20:36:42
commit cca302c01b7b331c280ec885d783d673a0c951c3
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=cca302c01b7b331c280ec885d783d673a0c951c3;hp=202e7fecfdac09b791b204cde464f09f9165f55b
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Jan 15 20:21:05 2015 +0000
Improve the Flood solver.
Previously it simply chose every move based on the static evaluation
function 'minimise the pair (longest shortest-path to any square,
number of squares at that distance)'. Now it looks three moves ahead
recursively, and I've also adjusted the evaluation function to tie-
break based on the number of squares brought to distance zero (i.e.
actually in control).
The result isn't an unconditional improvement on the old solver; in a
test run based on 'flood --generate 1000 12x12c6m0#12345' I found that
57 out of 1000 grids tested now had longer solutions. However, about
three quarters had shorter ones, and solutions are more than a move
shorter on average.
flood.c | 180 ++++++++++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 139 insertions(+), 41 deletions(-)
More information about the tartarus-commits
mailing list