Hi all,
I'm sorry that I didn't post to this group for such a long time. Hope you had a
good Chanukah/Christmas/New-Year's-Eve/Day/etc..
Anyway, I've been working on trying to integrate a modified version of Tom
Holroyd’s patsolve code (see
http://cards.wikia.com/wiki/Patsolve ) into
Freecell Solver, and lately ran into a problem that I'm not sure how to fix.
The problem is that it yeilds different results based on the permutations of the
order of columns in Freecell layouts (including those from the initial Microsoft
Freecell deals):
<QUOTE>
shlomif[fcs]:$trunk/fc-solve/source/patsolve-shlomif/patsolve/B$ ./patsolve -f
-S 6751.board
Freecell; any card may start a pile.
8 work piles, 4 temp cells.
Foundations: H-0 C-0 D-0 S-0
Freecells:
: TC 8C 4C TH QH TS 4S
: 8S 2S JS 4H AS 9H 4D
: AD 2D 3S QS 6H QC 7D
: 3D AH KH 5H 7H 2H KC
: 9S 2C 9D AC 7S 8H
: JD 6S 5S 9C KS 6D
: JH 6C 3H KD QD JC
: 5C TD 7C 3C 8D 5D
---
A winner.
130 moves.
shlomif[fcs]:$trunk/fc-solve/source/patsolve-shlomif/patsolve/B$ ./patsolve -f
-S 6751.can
6751.canonized.board 6751.canonized.board~
shlomif[fcs]:$trunk/fc-solve/source/patsolve-shlomif/patsolve/B$ ./patsolve -f
-S 6751.canonized.board
Freecell; any card may start a pile.
8 work piles, 4 temp cells.
Foundations: H-0 C-0 D-0 S-0
Freecells:
: 9S 2C 9D AC 7S 8H
: 5C TD 7C 3C 8D 5D
: 8S 2S JS 4H AS 9H 4D
: JD 6S 5S 9C KS 6D
: JH 6C 3H KD QD JC
: AD 2D 3S QS 6H QC 7D
: TC 8C 4C TH QH TS 4S
: 3D AH KH 5H 7H 2H KC
---
shlomif[fcs]:$trunk/fc-solve/source/patsolve-shlomif/patsolve/B$ ./patsolve -f
-S -M1000 6751.canonized.board
Freecell; any card may start a pile.
8 work piles, 4 temp cells.
Foundations: H-0 C-0 D-0 S-0
Freecells:
: 9S 2C 9D AC 7S 8H
: 5C TD 7C 3C 8D 5D
: 8S 2S JS 4H AS 9H 4D
: JD 6S 5S 9C KS 6D
: JH 6C 3H KD QD JC
: AD 2D 3S QS 6H QC 7D
: TC 8C 4C TH QH TS 4S
: 3D AH KH 5H 7H 2H KC
---
A winner.
774 moves.
shlomif[fcs]:$trunk/fc-solve/source/patsolve-shlomif/patsolve/B$
</QUOTE>
In the middle run, patsolve ran out of the default memory quota (I removed the
"Out of memory" notice as part of the integration into Freecell Solver). After
I increased it using the -M flag it yielded a solution after several seconds
and it was also longer. This also seems to happen with the earliest version of
patsolve that I have.
Since Freecell Solver canonicalises the order of the stacks internally for
avoiding duplicates (thus also making it insusceptible to such a problem), it
does not always give patsolve a good permutation. One possibility would be for
patsolve to rearrange the columns based on its own preference, but I don't know
what the optimal order is or what a close to optimal order will be.
One question to Tom Holroyd (= the original author of patsolve) is whether he
used the collection of Microsoft Freecell boards as they are when providing
input for the algorithm that yielded the Xparams and Yparams.
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Humanity - Parody of Modern Life - http://shlom.in/humanity
Forth - There are several ways to write it, but no way to read it.
— http://www.shlomifish.org/humour/ways_to_do_it.html
Please reply to list if it's a mailing list post - http://shlom.in/reply .
Received on Sat Feb 21 2015 - 05:34:53 IST