Hi all,
a few days ago I played this Freecell deal in PySolFC -
[console]
[shlomif_at_localhost ~]$ make_pysol_freecell_board.py -t -F 91374403876770567925
QC AH 7C 6C 4H 3H 2C
2S 3D QD JD 5D KC 9H
TH 2D QH 9C 8S 3S 4S
JS 6H KD TD 8H 6S TS
5C AD TC AS 8C 5H
KS 7S JC 4C 7D 2H
KH 9D AC 8D 4D JH
3C 7H 9S QS 5S 6D
[/console]
I noticed that I could solve it with a 100 (fc-solve / PySolFC - not FC-
Pro/Windows FreeCell) moves solution, but all fc-solve atomic searches I tried
took longer (including the -l cpb preset). So I sought a way to generate a
short solution for it. Eventually I ended up with the following script:
[code]
#!/bin/bash
make_pysol_freecell_board.py -t -F 91374403876770567925 |
fc-solve --method a-star -m | grep Move | wc -l
make_pysol_freecell_board.py -t -F 91374403876770567925 |
fc-solve --method a-star -to 0123467 -asw '4,0.5,4,0,0' -m |
grep Move | wc -l
make_pysol_freecell_board.py -t -F 91374403876770567925 |
fc-solve --method a-star -to 0123467 -asw '4,0.2,4,0,5' -opt -m |
grep Move | wc -l
[/code]
The last search yielded a 101 moves solution for that board. I then added it
to the scans presets database for the 32,000 solutions and it appears to have
yielded very good results on average:
1. It yielded the shortest results for 10,683 of the boards.
2. It yielded the second shortest results for 5,760 of the boards, third
shortest results for 3,674 ; 4th for 2,674, etc. - very performant.
3. It also finished solving all 32,000 games in around 90 million iterations,
which seem to have indicated it was fast.
------------------------
Today I played another game:
[console]
shlomi:~$ make_pysol_freecell_board.py -t -F 08313480395025124462
TS AH 4D 9S KC KD 5D
2H JH 6D 7S JC 7D TH
6C AC 4H TD 2D QC 3D
8S KH 2C 8H QH 6H 5H
AD 5C 3S 2S 6S TC
3C JD QS 9C 5S KS
8C 9D 8D 3H 4S 4C
7C AS JS QD 9H 7H
[/console]
And again fc-solve did not perform well. I found a few performant atomic scans
for it, eventually yielding:
[console]
make_pysol_freecell_board.py -t -F 08313480395025124462 |
fc-solve --method a-star -to 01234675 -asw 300,1500,0,2,50000 -m |
grep ^Move | wc -l
[/console]
Which is a 107 moves (same as what I managed to solve). I ran it through the
scans' timing and now got these results for this scan (right) and the second
before that (left):
* 7682 11557
* 5844 6492
* 4059 4376
* 3096 2986
So it seems that this scan is even more performant than the previous one while
the previous one still managing to yield shorter solutions on many games. The
only downside is that it seems much slower than the previous BeFS scan or in
general from other scans.
-----------------
So I'm happy with these results and plan to use the technique of trying games
and trying to find near-optimal searches for them further. I'd also like to
create a command line application to help me construct flare-based meta-scans
based on the data I collected.
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
The Case for File Swapping - http://shlom.in/file-swap
God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
Received on Fri Aug 06 2010 - 08:30:41 IDT