Hi all!
[I am BCCing someone here]
In this feature branch there is some python 2/3 code to find an MS deal given
its initial layout:
https://github.com/shlomif/fc-solve/tree/feature-branch--layout-to-deal-idx-reverse-finder
Here is some usage examples and benchmarks:
shlomif[fcs]:$trunk/fc-solve/source/board_gen$ time python
find-freecell-deal-index.py --ms <(pi-make-microsoft-freecell-board -t
100000000) Found deal = 100000000
real 8m24.012s
user 8m23.618s
sys 0m0.055s
shlomif[fcs]:$trunk/fc-solve/source/board_gen$
time /home/shlomif/Download/unpack/prog/python/pypy2-v5.7.1-src/pypy/goal/pypy-c
find-freecell-deal-index.py --ms <(pi-make-microsoft-freecell-board -t
100000000) Found deal = 100000000
real 0m7.228s
user 0m7.134s
sys 0m0.022s
shlomif[fcs]:$trunk/fc-solve/source/board_gen$
One can see that pypy is much faster than cpython here. The code should be
faster than a naive brute force scan as I convert the layout to the expected
rand gen outputs and break on the first mismatch.
Enjoy!
also see:
*
http://fc-solve.shlomifish.org/faq.html#what_are_ms_deals
(The BCCed person inspired this new program.)
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
UNIX Fortune Cookies - http://www.shlomifish.org/humour/fortunes/
Larry Wall’s pure‐Perl code is faster than Assembly.
— http://www.shlomifish.org/humour/bits/facts/Larry-Wall/
Please reply to list if it's a mailing list post - http://shlom.in/reply .
Received on Mon Jan 01 2018 - 21:44:20 IST