This is Freecell Solver - a program that automatically solves layouts of Freecell and similar variants of Card Solitaire such as Eight Off, Forecell, and Seahaven Towers, as well as Simple Simon boards. Freecell Solver is free and open source software freely available under the MIT/X11 License. It is written in ANSI C and requires a C compiler to be built. Nevertheless, binaries for Microsoft Windows 32-bit are available.
Included with the archive is source code for programs that can automatically feed it with the boards of several popular Solitaire Implementations.
Freecell Solver can also be built as a library for use within your own Solitaire implementations. A more detailed list of features can be found in the Features List.
07-Oct-2013: Freecell Solver 3.22.0 was Released: Bug Fixes
Freecell Solver version 3.22.0, has been released. Freecell Solver 3.22.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.
The highlights of this version are some bug fixes: the Win32 NSIS (= Nullsoft
Installer) package should now build, run and process the presets (e.g:
-l as properly). Furthermore, there's a bug fix to the command line
flags processing, where flags whose prefixes are known flags were erroneously
recognised as such (e.g:
26-Jun-2013: Freecell Solver 3.20.0 was Released: Major Simple Simon Optimisations
Freecell Solver version 3.20.0, has been released. Freecell Solver 3.20.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.
The highlights of this version are some major optimisations to the solving code of Simple Simon, as well as many code cleanups, refactorings and smaller optimisations. Furthermore, the “qualified-seed-improved” preset was added, which yields shorter solutions.
Freecell Solver version 3.18.0, has been released. Freecell Solver 3.18.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.
01-Apr-2013: Freecell Solver Enterprises™ Acquires Google Inc.
1 April, 2013, Tel Aviv, Israel: Due to the spectacular commercial success of Freecell Solver Enterprises™’s Enterprise Edition and its Webscale™ edition, we have amassed quite a bit of cash in the bank, so we decided to make a small but important strategical acquisition. As a result, Freecell Solver Enterprises™ is proud to announce its upcoming acquisition of Google Inc., which will result in an exciting synergical merger.
Some of the upcoming changes would be replacing Google’s tech support (which is notoriously bad) by Freecell Solver Enterprises™’s world-famous and superb tech support (as detailed in the essay “Seven steps to remarkable customer service” by Joel on Software), as well as integrating Google search into Freecell Solver™ for an enhanced experience in solving Freecell. We are also planning on creating a separate YouTube top-level category for card Solitaire-related videos (including screencasts and presentations).
We are sure that the upcoming acquisition is going to allow Freecell Solver Enterprises™ to further its competitive edge, and allow us to have even more significant growth, which will in turn allow us to make even more significant acquisitions. As our CTO, Shlomi Fish, notes: “good times are coming.”.
Soon, people will say “Let’s Freecell Solver Enterprises™ Superheroic Web Search™ it!” instead of “Let’s Google it!”, for an exciting Web 3.141592™ experience.
10-Dec-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 lenght 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 inidividual 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.
04-Nov-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.
02-Sep-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|
|100,001||400,000||238,415||61,584||1 (No. 384243)|
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,440before 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.
- Freecell.org - a web-site dedicated to the game.
- Michael Keller's Freecell site - contains the Freecell FAQ (Frequently Asked Questions) and other stuff.
- PySol Fan Club Edition - a cross-platform, open-source implementation of many Solitaire games with very good embedding of Freecell Solver.
- An unsolvable instance of Freecell - why not all possible initial Freecell boards can be solved.
- Justin-Heyes Jones' A* page - a page about the A* scan.
- patsolve - a program by Dr. Tom Holroyd that solves Freecell and Seahaven Towers games. There are some fundamental differences between its architecture and that of Freecell Solver, so it might be worthwhile to take a look. I've done some modifications on it to fix some build bugs.
- Freecell Solver’s Freecode App-Index Record
- Freecell Solver's Mailing-List (at YahooGroups).
- The Freecell Solver Blog
- A Presentation about Freecell Solver