Date: Wed, 5 Dec 2012 18:49:15 +0200
Subject: [PATCH] Add more to the FAQ.
---
fc-solve/site/wml/src/faq.html.wml | 76 ++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/fc-solve/site/wml/src/faq.html.wml b/fc-solve/site/wml/src/faq.html.wml
index 20102c8..432343e 100644
--- a/fc-solve/site/wml/src/faq.html.wml
+++ b/fc-solve/site/wml/src/faq.html.wml
@@ -87,6 +87,82 @@ reached states are solvable. This provides a combined solving power, that is
greater than the sum of both parts.
+### I Started Writing a Freecell Solver (of my own) but it is too slow. What can I do?

+
+
+The problem with many naïve Freecell solving solutions is that, while they
+can succeed in solving many Freecell deals, they may fail spectacularly in
+the general case. Furthermore, Generalised Freecell (where there is an
+arbitrary number of ranks) was shown to be
+an NP-complete problem
+and as a result, it is unlikely that no efficient solution for solving that
+can be found.
+

+
+
+You can try inspecting the code of Freecell Solver or one of the
+other solvers for insights, but
+note that their code (and especially Freecell Solver's) may be somewhat
+complex, and hard to understand for people with relatively little experience.
+You can also pursue some of the
+Freecell Solver documentation as well as the
+archives of
+the fc-solve-discuss mailing list for some insights and ideas.
+

+
+
+Here is some general tips:
+

+
+
+
+-
+
+Make sure that the positions in the graph of the game are represented as a
+single segment of memory (normally a C struct) and can be compared for
+equivalence easily (using memcmp() or a similar function).
+

+
+
+-
+
+Use an efficient data structure to hold the states in the collection such as
+a hash table or a self-balancing binary tree.
+

+
+
+-
+
+Often randomising the solution (see Freecell Solver's Random-DFS scan
+which was inspired by a different solver called Freecell Tool can help
+a lot).
+

+
+
+-
+
+Freecell Solver makes heavy use of switch tasking: having several different
+searches operate on the same board, until the first search yields a solution.
+This normally yields a solution quicker than a singular scan.
+

+
+
+-
+
+Consider implementing moves as meta-moves: sequences of several single-card
+and/or sequence moves that implement a certain ends. This can yield a solution
+faster than using single-card moves (also known as atomic moves).
+

+
+
+

+
+
+Finally, note that we could use a helping hand with Freecell Solver, and the
+authors of other open-source solvers may be happy for help as well, so if
+you want to improve something more mature, then contact us.
+

+