Freecell Solver - Architecture Document

Shlomi Fish


                        
                    

This is version 0.3.2

This work is licensed under the Creative Commons Attribution 3.0 Unported License (or at your option a greater version of it).

It was written by Shlomi Fish, and one should attribute a derived work to him, while linking to his homepage.

Revision History
Revision 1.62 December 2002shlomif
First "stable" version covering the Freecell Solver 2.8.x architecture. Spell checked and revised during its CVS history.
Revision 83511 July 2008shlomif
Combined everything into one big .xml file instead of the "SYSTEM" entities. Removed the places where vipe.technion.ac.il was mentioned.
Revision 208129 June 2009shlomif
Updated to version 2.32.x of Freecell Solver. It's possible some newer techniques are not covered by this document yet, but I hope to remedy it soon.

Table of Contents

1. Introduction
2. Coding Conventions
Bottom-Up Design and Evolution
Strict Adherence to the ANSI C Language
Strict Adherence to the ANSI C Standard Library
Namespace Purity
Order of Trade-offs in the Design of the Code
No Global or Static Variables
Separation of Internals from User and Application Programmer Interfaces
3. Overview of the Code
Overview of the Program
Overview of the Utility Modules
app_str.c
rand.h
fcs_hash.c
fcs_dm.c
alloc.c
cl_chop.c
pqueue.c
Overview of the Core Modules
card.c
state.h
state.c
move.c and move.h
preset.c
freecell.c
simpsim.c
caas.c
scans.c
instance.c
lib.c
cmd_line.c
Deprecated Modules
lookup2.c
fcs_isa.c
4. Interesting Techniques Used throughout the Code
State Representation
Indirect Stack States Algorithms
Extended States
The States Graph and its Use
The Life-Cycle of a freecell_solver_instance_t
Compact Allocation
5. Software Configuration Management
Game Presets Configuration
Generating the Site
The pkg-config File
The Win32 Binary
6. Terminology
Terms used throughout the Code