Monday, December 10, 2012

Freecell Solver 3.16.0 was Released + New Screencast

Freecell Solver version 3.16.0, has been released. Freecell Solver 3.16.0 is available in the form of a source archive, from the download page. Freecell Solver is an open source framework (library and some command line applications), for automatically solving several variants of card Solitaire / Patience games, including Freecell.

This new release took about a month to prepare, and also contains less profound changes than the previous release, but still quite a lot to look for. It features the -l micro-finance-improved and -l qualified-seed presets, which improve upon the average solution length (at the expense of speed). The --flares-choice flag was added and one can specify --flares-choice fcpro to choose based on the length of the Freecell Pro moves. Another additional flag is --flares-iters-factor which multiplies the time the flares run at by a factor for a speed/solution-length trade-off.

Finally, the individual flares are now recycled and their memory is reused when they are no longer needed which yields a RAM optimisation in certain cases.

More information about all these can be found in the distributed documents of Freecell Solver.

In addition to all that, a new screencast of PySolFC solving Freecell using Freecell Solver is now available on YouTube. Make sure you expand the details for all the credits of the software and other material that was used for its creation.

Enjoy and happy holidays.

Sunday, November 4, 2012

Freecell Solver 3.14.1 was Released

Freecell Solver version 3.14.0, shortly followed by Freecell Solver 3.14.1, which fixed a build problem on Microsoft Windows, have been released. Freecell Solver 3.14.1 is available in the form of a source archive, and a Win32 self-installing executable, from the download page. Freecell Solver is an open source framework (library and some command line applications), for automatically solving several variants of card Solitaire / Patience games, including Freecell.

This release features several new features: we added a 6th Best-First-Search weight of the inverse of the number of cards not above parents, which has proven useful. We now also allow test groups inside the --tests-order and --depth-tests-order with the random-dfs scan to be ordered using the function =asw(…) based on those BeFS weights.

As a result, the preset -l amateur-star or -l as for short has been added, that uses that and is our fastest preset yet. Another new preset is -l micro-finance (or -l mf for short), which yields especially short solutions.

There are also some not-as-major features: input boards can now contain a leading colon (":") at the beginning of the line of columns, so they can be copy-and-pasted directly from the output of fc-solve with the -p flag. The dbm_fc_solver and depth_dbm_fc_solver now store the positions more compactly (which aided in researching two-freecell deals), and the core libfreecell-solver code was made more 64-bit enabled and many of the limits were converted to 64-bit friendly ones.

A final note: we have dropped support for building Freecell Solver with Microsoft Visual C++ and other non-GCC compatible compilers, which do not support the newer C standards, and other useful features of GCC. Building Freecell Solver with GCC, clang and other compatible compilers will be continued to be supported on Microsoft Windows as well as on Linux and other UNIX-like systems.

More information about all these can be found in the distributed documents of Freecell Solver.

Enjoy!

Sunday, September 2, 2012

Two Freecell Solvability Report for the First 400,000 Deals

With some help from some people on the fc-solve-discuss list and off the list (namely Amadiro from the University of Oslo and someone else that I met on IRC , I ran my solvers on the first 400,000 Windows Freecell deals with only two available freecells to see how many of them can be solved.

Here is the report:

Start Index End Index Solved Impossible Intractable
1 32,000 25,381 6,619 0
32,001 50,000 14,302 3,698 0
50,001 100,000 39,775 10,225 0
100,001 400,000 238,415 61,584 1 (No. 384243)
Total 317,873 82,126 1

So about 79.47% of the deals can be solved and the rest are impossible. The only intractable deal that none of my solvers could yield a verdict for is No. 384,243, and it spans a very large number of states:

  • The dbm_fc_solver got into Reached 12,821,000,000 ; States-in-collection: 13,620,999,440 before it failed to produce more results due to a limitation of the hardware where it was deployed on.

  • The depth_dbm_fc_solver yielded this:

    Reached 13,763,700,000 ; States-in-collection: 16,226,294,490 ; Time: 1345126456.520408 Queue Stats: inserted=16,226,294,490 items_in_queue=2,462,594,490 extracted=13,763,700,000

    with a curr_depth of 38. However, that solver may have some yet undiscovered bugs.

So what's next? I’d like to investigate some ways to scale to a larger number of states, perhaps by creating a distributed solver. A Google search for distributed breadth first search yields some results:

I hope you enjoy the statistics for the time being.

Wednesday, June 13, 2012

Freecell Solver 3.12.0

Freecell Solver version 3.12.0 has been released. It is available in the form of a source archive from the download page. Freecell Solver is an open source framework (library and some command line applications), for automatically solving several variants of card Solitaire / Patience games, including Freecell.

The first item to note is that the URL of its site changed from under *.berlios.de to http://fc-solve.shlomifish.org/, and that there is a redirect in place. Moreover, we have switched the version control system from one based on Subversion to a git repository which is currently hosted on GitHub (though we may move it later).

This release adds a new flag - --show-exceeded-limits or -sel for short, that removes some ambiguity in the output, and fixes a problem with starting the solver with --set-pruning r:tf in conjunction with -opt. A new preset - -l three-eighty (or -l te for short) has been added, which provides somewhat better performance.

The experimental dbm_fc_solver is now less experimental and can now store the positions inside binary trees in memory, and its memory consumption has been greatly reduced since earlier versions. We also added another experimental solver called fcc_fc_solver which aims to determine the solvability of a deal by analysing fully-connected-components (“FCCs”).

We also added support for building and testing the distribution in an out-of-tree build, and there are some cleanups to the code.

More information about all these can be found in the distributed documents of Freecell Solver.

Enjoy!

Sunday, January 15, 2012

Freecell Solver 3.10.0 was Released

Freecell Solver version 3.10.0 has been released. It is available in the form of a source tarball from the download page.

This release fixes two bugs - one with the --max-iters affecting only the last instance, and one with reading foundations with 0, and implements many small optimisations and cleanups. It also adds some experimental code with the so-called delta-states, where states are compactly encoded based on the original state. This functionality is not available in the main solver yet, but it powers the experimental on-disk-key/value-databases-based solver, which end up not scaling very well during testing.

Enjoy!