Freecell Solver Links
Note to Freecell Solver’s Users
Shlomi Fish - the core developer of Freecell Solver, and the webmaster of this website - has been experiencing reliability problems with incoming and outgoing E-mail (such as legitimate messages being dropped or classified as spam). They also affect his GMail-dot-com account.
Therefore, one should preferably contact him using other electronic means.
Table of Contents
- Resources
- Technologies
- Programs that use Freecell Solver
- People
- Other Solvers
- Reviews of Freecell Solver
- Videos: Screencasts, demos, etc.
- Old pages of this site
- General Freecell Links
Resources
Freecell Solver Resources on the Net.
Freecell Solver's Mailing-List - a mailing-list dedicated to discussing the usage and development of Freecell Solver and general techniques for solving card solitaire games. Hosted by YahooGroups.
The Freecell Solver Blog - a blog dedicated to Freecell Solver, solving Freecell and other related issues.
Freecode.com’s App-Index Record - the record for Freecell Solver at Freecode (formerly known as Freshmeat.net). You can find there a version history, a Freecode internal hit count, and other useful information.
Freecell Solver Lecture - A lecture I gave to the Haifa Linux Club about the development of Freecell Solver.
Project Page on GitHub - contains the canonical Git repository of Freecell Solver (forks and pull requests are welcome!), as well as an issue tracker, a wiki, and some graphs.
Google Code Project Page - contains the old Subversion repository.
Technologies
Technologies used by Freecell Solver or that aided in its development.
libavl - a very nice library which contains optimized C implementations of an AVL and Red-Black binary trees. It used to be GPLed but is now LGPLed, which means it can be used in open-source and proprietary code.
libredblack - a C implementation of a Red-Black tree. Takes some modifications to compile on Win32. LGPL, so can be used by code of any licence.
glib - a C library used by gtk+, which can also be used separately (as is the case with Freecell Solver). Contains implementations of a hash, and an unoptimized balanced binary tree. Both are slower than libavl/libredblack or the internal hash implementation, and it is less programmer-friendly.
The A* scan - a states graph scan that uses a priority queue for determining which state to go to next. The page contains some source code, but the explanation is also very good. Note that in Freecell Solver, we ended up implementing a Best-first search instead due to a misunderstanding.
The dmalloc malloc debugging library - a library to trace memory leaks. Freecell Solver used to have some of those in various stages of its development, and this library helped to remove them. It has a rather awkward output, and I had to use a debugger interactively to complement it, but it is still quite helpful. Now mostly superseded by Valgrind.
CMake - a cross-platform, open-source build system, which is used by Freecell Solver to portably build dynamically-linked libraries and facilitate the build process on different operating systems. It replaced GNU Autoconf, Automake and Libtool, which predate CMake and have gained popularity lacking any good competition, but are more error-prone and slow.
Valgrind - a sophisticated memory debugger for x86-linux and other platforms. Helped diagnose a few hard-to-catch bugs in Freecell Solver and is now also used in the automated tests' suite.
Vim - Vi Improved - an excellent cross-platform text editor with many powerful features.
Subversion - an Open-Source version control management system that has been used in maintaining the Freecell Solver code-base. It replaced CVS which is older and much more limited.
Perl - Perl is a sophisticated, high-level, dynamic programming language. It is often considered a "scripting language", but can be easily used for writing large-scale and production code. Perl proved useful for writing a lot of code to automate many tasks in the development of Freecell Solver. Lately, it was also utilised as the foundation for its test suite, especially in writing the solutions' verification code.
GDB, the GNU Debugger - a powerful, cross-platform, scriptable, and open-source command-line debugger for binary programs (C, C++, Assembly, etc.). Made debugging and fixing many hard-to-catch bugs much easier.
AsciiDoc - a lightweight markup language (with open-source converters) that allows to write plain-text and convert it to XHTML, to DocBook/XML, and subsequently to other formats such as PDFs, or UNIX man pages. We use it for the distributed documentation.
MinGW-w64 - a port of the GNU build tool-chain (including GCC) to Windows 32-bit and Windows 64-bit. Used for preparing Microsoft Windows packages.
Strawberry Perl - an open source distribution of Perl 5 for Windows, which is used to help build the Freecell Solver’s package there. For a while, we also used DWIM Perl for Windows, which is based on Strawberry and is more encompassing, but it fell out of maintenance.
ctypes - an advanced foreign function interface (FFI) for Python. Was used for automated testing.
Inline::C - Inline::C allows one to write Perl subroutines in C. Freecell Solver uses it for automated testing and for wrapping some of the internal and external C APIs.
Travis CI - an open source and hosted continuous integration (“CI”) service, provided free-of-charge for public GitHub projects.
AppVeyor - a hosted continuous integration (“CI”) service for Windows and Linux builds, provided free-of-charge for public GitHub/Bitbucket/GitLab/etc. projects.
xxHash - a fast non-cryptographic hash function.
Emscripten - an LLVM to JavaScript compiler.
Python cffi - a foreign function interface for Python. Replaced ctypes.
webpack-jquery-ui by Jörn Zaefferer was used as the basis of the trimmed jQuery UI bundle (also see the .tabs() only branch, as well as webpack and jQuery UI themselves.)
Programs that use Freecell Solver
kpat - a Solitaire suite for the KDE desktop for UNIXes. It used to use Freecell Solver to solve its Freecell boards, starting of the version that was shipped with KDE 2.1. After KDE 4.0, it converted to use a modified version of Tom Holroyd’s patsolve. Note that in the recent KDE 5 pre-release of kpat a patch by the Freecell Solver developers was applied that converted it to use the latter as a solver for Freecell and Simple Simon.
Freecell3D - a 3-Dimensional Direct-X Freecell Implementation for Windows. Shareware.
FreeCell Pro - a free Freecell implementation for Windows with many professional features. Integrated Tom Holroyd's Patsolve, and the original Don Woods' solver as well as my own. Source code is available.
PySolFC - a collection of more than 1,000 Solitaire card games originally based on PySol. Open source under version 3 of the GPL. Has optional support for playing using the Freecell Solver executable or its shared library. Note that Shlomi Fish has adopted it and now co-maintains it, after the previous maintainers became missing in action.
Solitairey - an open source web-based card solitaire game. Was forked from the last commit which contained a license file. In the forked source code, the original solver for Freecell was replaced by the Emscripten port of libfreecell-solver.
People
Links to the homepages of people who contributed in any way to Freecell Solver.
Stephan Kulow - as the maintainer of kpat for a brief period, he contributed bug fixes, memory leaks reports, and general commentary to Freecell Solver. Stephan and I still hold discussions about FCS in the mailing-list or in private.
Justin Heyes-Jones - I learned about the A* scan through his web-page, and he allowed me to incorporate his binary heap code into Freecell Solver.
Markus FXJ Oberhumer - contributed some bug-fixes and bug-reports to Freecell Solver. He is the author of PySol, a very nice Solitaire suite which is written in Python. I used its code to write a script that automatically generates its initial boards.
Dr. Tom Holroyd - author of Patsolve and someone whom I discussed Freecell solving with for many E-mail transactions. He inspired or encouraged many features in Freecell Solver.
Interview with Adrian Ettlinger - an interview with Adrian Ettlinger, the maintainer of FreeCell Pro, who helped in adapting it to make use of Freecell Solver. Adrian also maintained a page about the American Railroad History Database.
Sadly, he passed away on 2013 and there is a wikipedia page about him.
Other Solvers
We have competition. But there's nothing wrong with competition. ;-)
patsolve - a C program that automatically solves games of Freecell and Seahaven Towers. The open source code is available - originally under the GPL, but later converted into the MIT/Expat licence, in hope of a future integration with Freecell Solver. Its author, Tom Holroyd, and I discussed Freecell solving for quite a few E-mail transactions, before I established the mailing-list.
Note that I later modified the code and integrated it with the Freecell Solver code-base.
Freecell Pro - a Freecell implementation for Win32 that contains the solver by Don Woods. Very fast and relatively accurate solving. The Source code is available.
Gfreecell - an implementation of Freecell for Gtk+ with its own solver. Source code is available, but it's in French.
%-)
Freecell Tool - a Win32 program that hijacks games out of Microsoft Freecell and displays their solution. Provided the inspiration for Freecell Solver's Random-DFS-based scans.
Berto's Freecell and Brain Jam Solvers - Two programs for Windows that solve Freecell and Baker's Game (which he refers to as Brain Jam). Source code is not available.
autofree - A freeware program by Lingyun Tuo that automatically solves Freecell.
A Solver for Mathematica - a Mathematica application by Luc Barthlet that solves Freecell games. Source code is available and is explained in detail.
William Tunstall-Pedoe's Solver - he mentions he wrote one in his C.V., which contains other interesting artificial intelligence musings. The source code and the binary are not available for free download online and may or may not be available upon request.
X11 Seahaven - contains C++ source code for a Seahaven Towers auto-solver.
Common LISP Solver - by Kevin Atkinson and Shari Holstege. Written in Common LISP and the source code is available under the GPL. It was written as part of an AI course project and contains a final report.
C++ Port of Freecell Solver by Michael Mann - Michael Mann ported FCS to C++ and used Doxygen to cross-reference and document the code. Covers version 2.2.x of the program.
Dominic Veit's Freecell Solver - a solver written in Java that does not use back-tracking and is still able to win 85% of the games.
Gary Campbell's FCELL.COM - a solver for Freecell written in x86 assembly for DOS and compatible environments. Reportedly very fast and uses some interesting techniques. See some discussion of it in the fc-solve-discuss mailing list.
Discussions with Mr. Campbell have inspired some techniques for generating shorter solutions including the "flares" feature.
plspider.exe - a solver for Spider Solitaire - the site contains a Win32 binary, which, due to bad design decisions, is using many of the author's custom libraries, and is also multi-threaded. The author has sent me the source code, but I am unable to compile it because I lack the libraries that he used.
GUI FreeCell Solver 1.0rc5 for Mac OS X 10.2 by JCP Software - an original solver written in C++ (with a GUI). The web-site is short on details, but I was contacted about it by the author, Julian Pellico, who informed me that he has made the source available as open-source software under the GPLv3.
Algorithm to Solve FreeCell Solitaire Games - George T. Heineman's step-by-step tutorial on O'Reilly-Net about how to construct a solver for Freecell in Java.
Solver for “Black Hole” Solitaire - a solver for the patience games “Golf”, “Black Hole”, and “All in a Row” in C (originally in Perl 5) by the same author as Freecell Solver.
FreeCell Java Solver - a solver for Freecell written in Java on Sourceforge.net. Open source under the restrictive GPLv3 licence.
Solitairey - contains a Freecell solver written in JavaScript. The source code for it is available on GitHub, under the open source FreeBSD licence.
ShootMe's Klondike Solver - a solver for Klondike Solitaire (known as the “Solitaire” game from Windows) written in C++ and available under the permissive MIT/Expat Licence.
“FreeCell puzzles solver API” by rengolin - a blog post about some C++ code on GitHub for solving Freecell. Under the GPL version 3 open source (but restrictive) licence.
A Solver for Freecell written in Java by Shirl Hart (on GitHub) - produces very short solutions.
Shlomi Fish's GitHub fork - with some enhancements.
The Freecell-App CPAN Package - a “simple Freecell Solver” written in Perl and distributed as a CPAN (= Comprehensive Perl Archive Network) package. By Shirl Hart. Open source under the permissive (and GPLv2/GPLv3 compatible) Artistic License 2.0. ( Older effort, which was used as the basis for the faster Java code. )
Zillions of Games - a commercial and proprietary general game playing application for Microsoft Windows, which according to its wikipedia page had support for Freecell programmed by its users.
Haskell freecell library - contains a solver. Expat licence. Also see a Reddit discussion about it.
KPatience / kpat - contains solvers for some patience variants derived from a forked version of patsolve. Can be used from the command line by writing
kpat --start 1 --end 32000 --solve Freecell
where the argument after "--solve" is the variant ID. Open source under GPLv2.Pyramid Solitaire Solver - open source under the Expat licence and written in Common Lisp. (Untested).
Solvitaire - an open-source (GPLed) solver for many Solitaire variants (including Freecell and Klondike) written in C++.
A* Search-based Freecell Solver in .NET - open source under the MIT / Expat licence.
Reviews of Freecell Solver
Sweet Code's Review (on the Internet Archive).
Senior Citizen - quite amusing, IMO.
A review by Mark Turnage of the "Group of Linux Users in Memphis" - also quite amusing.
Videos: Screencasts, demos, etc.
KPatience Solving a Freecell deal automatically - a screen recording which is short and with (hopefully) attractive visuals.
“PySol FC Solving a Freecell Deal Using Freecell Solver's qualified-seed-improved preset.” - a screencast.
“Screencast: PySolFC solving Freecell using Freecell Solver” - an older screencast using a preset that usually generates longer solutions.
“iPhone Freecell Bot” - video of a computer solving Freecell by interacting with an external iPhone device.
Old pages of this site
These are some old pages of this site that are no longer of relevance and were removed from the navigation menu.
Hypertext documentation for the Freecell Solver code - generated by Doxygen, and incredibly out-of-date.
What is the Status of Freecell Solver - Freecell Solver is actively maintained again.
The Book - a book about Freecell Solver was originally planned, but this is no longer actively pursued.
General Freecell Links
The Freecell FAQ - contains a lot of interesting questions and answers regarding Freecell.
Card Games Wikia (Deckipedia) - a wiki about card games, including but not limited to Solitaire games such as Freecell.
An unsolvable instance of Freecell - a proof that not all initial Freecell instances are solvable.
Short FreeCell Solutions - contains solutions to the first 1 million Microsoft deals. The first 32,000 require JavaScript to be viewed, but those above 32,000 can be read using a form submission. The solver that generated these solutions does not appear to be available.
The maintainer of this site has reported some broken links here, so it's only fair that we will link back to him.
Solitairey - play Freecell and other Patience games online. The source code is available on GitHub.
“World of Solitaire” - another attractive online implementation of various Patience games, including Freecell, and Baker's Game.
Solitaire King - another online Solitaire site. Includes a version with a Hebrew interface.
Solitaire.gg - a web-based solitaire with open source code written in Scala.