One day, during the spring break between two university studies' semesters, I went out running[1] and as I did, I thought to myself how can a computer solve Freecell. I came to some conclusions and decided to test them by programming a working implementation. I first tried doing it in Perl, but it turned out to be too slow. A C Program that I wrote later did the job well enough according to my standards.
I packaged the software, wrote a README, put it on my Technion web-site and placed it on Freshmeat by labelling it simply as Freecell Solver version 0.2.0. Since then, Freecell Solver saw more than twenty releases, each one adding more features or improving speed, and has grown ten folds in its source base (more if you count the code needed to build and maintain it). In this book, I'd like to tell you about some of the changes I incorporated in it, and what I learned in the course of its development.
This book is about programming in general and C programming in particular. I gained many insights by working on Freecell Solver, some of them related to programming game AIs; others relevant to programming many other types of programs. This book is also about the dynamic of a small Open Source project. As you will see, many times, the input that I received from other users and developers, has affected the development of the program.
[1] Freecell Solver is not the only good idea I got while going out to run. Another one is “The One with the Fountainhead” which is a parody of Ayn Rand's book The Fountainhead modelled around an episode of the Television show Friends. You can find it on my site as well.