About a year and a half ago, I wanted to write my own freecell solver.
After some very preliminary design, I figured that there was probably
one already out there and that I wasn't going to contribute anything
new. A search on Google confirmed that. I came across Shlomi's solver
(v1.4), saw the open source, and thought I could contribute there. I
saw the desire to convert to Java, but my Java experience is minimal, so
I went with C++, as a means to make the code more object-oriented. I
also saw the many #defines and thought it would be easier to convert
them into their own objects. So I sought to write a C++ version of
Shlomi's code with the purpose of making some of the #defines command
line options, and to break up some of the "objects" into smaller pieces.
I had two goals in mind: Learning about the freecell solving algorithms
and to further my C++ design and coding skills. I started off my
converting all of the storage methods into C++ and breaking the solving
methods into their own classes. I'd work on this in fits and starts,
always at least a release behind, because I was using Shlomi's code. I
worked to sync up my code with v2.2.6 (the last release before threads).
When I got there, I thought it made more sense to add more games to the
functionality, rather than add threads becuase the debugging would
become more difficult. This is when I started looking at the Simple
Simon solving algorithms and noticed that many more boards could be
solved. I worked it out with my own code, then converted it back and
sent it to Shlomi.
I now feel my code is worth sharing. As for functionality, it solves
freecell and simple simon games, and some klondike games, which is where
my focus is now (working out adding talon functionality). I think my
code is a lot easier to understand and read. (and it comes with doxygen
documentation if you so desire). It's a little slower and takes up more
memory than the original, but many of the #defines are incorporated into
command line parameters, so you only need one compiled version. It was
developed in Microsoft Visual Studio, but does compile cleanly with g++.
I also developed a small executable, in C++, that incorporates all of
the board generation code (python and C). I don't have a website (and
don't plan on getting one), so if you want any of my code, email me
(mmann78_at_netscape.net). Please specify your prefered method of
compression (winzip or gzip).
Sincerely,
Michael Mann
Received on Wed Nov 13 2002 - 21:17:33 IST