File: README.xml

package info (click to toggle)
freecell-solver 5.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,256 kB
  • sloc: ansic: 28,700; perl: 10,050; xml: 5,600; python: 1,339; sh: 533; cpp: 275; makefile: 20; javascript: 8
file content (162 lines) | stat: -rw-r--r-- 7,772 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?xml version="1.0" encoding="UTF-8"?>
<?asciidoc-toc?>
<?asciidoc-numbered?>
<article xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
<info>
<title>Freecell Solver Readme File</title>
<date>2018-10-27</date>
<author>
<personname>
<firstname>Shlomi</firstname>
<surname>Fish</surname>
</personname>
<email>shlomif@cpan.org</email>
</author>
<authorinitials>SF</authorinitials>
</info>
<section xml:id="intro">
<title>Introduction</title>
<simpara>This is Freecell Solver version 5.0.x, a program that automatically
solves most layouts of Freecell, and similar Solitaire variants as
well as those of Simple Simon.</simpara>
<simpara>Freecell Solver is distributed under the MIT/Expat License
( <link xl:href="http://en.wikipedia.org/wiki/MIT_License">http://en.wikipedia.org/wiki/MIT_License</link> ), a free, permissive,
open-source license.</simpara>
<simpara>Note that the Freecell Solver source and Win32 binary distributions <emphasis role="strong">do not</emphasis>
provide a graphical user-interface (GUI) and are primarily meant to be used
by Solitaire researchers and software developers. If you&#8217;re looking for a
suitable GUI based on Freecell Solver, see our links at:</simpara>
<simpara><link xl:href="http://fc-solve.shlomifish.org/links.html#front_ends">http://fc-solve.shlomifish.org/links.html#front_ends</link></simpara>
<simpara>I hope you&#8217;ll enjoy using Freecell Solver, and make the best of it.</simpara>
<simpara>&#8201;&#8212;&#8201;Shlomi Fish ( <link xl:href="http://www.shlomifish.org/">http://www.shlomifish.org/</link> )</simpara>
</section>
<section xml:id="build">
<title>Building</title>
<simpara>Read the file <literal>INSTALL.txt</literal> for information on how to do that.</simpara>
</section>
<section xml:id="usage">
<title>Usage</title>
<simpara>The program is called "fc-solve". You invoke it like this:</simpara>
<literallayout class="monospaced">fc-solve board_file</literallayout>
<simpara>board_file is the filename with a valid Freecell startup board. The file is
built as follows:</simpara>
<simpara>It has the 8 Freecell stacks.</simpara>
<simpara>Each stack contains its cards separated by a whitespace
and terminated with a newline character( it&#8217;s important that the last stack
will also be terminated with a newline !). The cards in the line are ordered
from the topmost card (= the card right on the virtual table and the one with
the most cards placed on it) in the left, to the bottommost card in the right
(= the card with no other cards placed on it).</simpara>
<simpara>A card string contains the rank of the card followed by its suit.
The card number is one of: <literal>A,1,2,3,4,5,6,7,8,9,10,J,Q,K</literal>. Alternatively,
<literal>T</literal> can be used instead of <literal>10</literal>. The card suit is one of:  <literal>H,S,D,C</literal> (standing
for Hearts, Spades, Diamonds and Clubs respectively).</simpara>
<simpara>Here is an example board: (PySol/Microsoft board No. 24)</simpara>
<screen>4C 2C 9C 8C QS 4S 2H
5H QH 3C AC 3H 4H QD
QC 9S 6H 9H 3S KS 3D
5D 2S JC 5C JH 6D AS
2D KD 10H 10C 10D 8D
7H JS KH 10S KC 7C
AH 5S 6S AD 8H JD
7S 6C 7D 4D 8S 9D</screen>
<simpara>Visually, it appears as this:</simpara>
<simpara><inlinemediaobject>
<imageobject>
<imagedata fileref="http://fc-solve.shlomifish.org/images/pysol-freecell-ms24.png"/>
</imageobject>
<textobject><phrase>Freecell Deal No. 24</phrase></textobject>
</inlinemediaobject></simpara>
<simpara>As can be seen, the four of clubs (4C), five of hearts (5H), etc. are at the
bottom of the stacks and the start of the lines in the board input.</simpara>
<simpara>And another one: (PySol board No. 198246790)</simpara>
<screen>KD JH 5H 7D 9H KC 9D
3H JD 5D 8H QH 7H 2D
4D 3S QC 3C 6S QS KS
10C 9S 6D 9C QD 8S 10D
10S 8C 7S 10H 2C AS
8D AC AH 4H JC 4C
6H 7C 4S 5S 5C JS
AD KH 6C 2H 3D 2S</screen>
<simpara>Starting from Freecell Solver 3.14.x, a stack can also start with a leading
colon (":"). This is to allow input from states as output by Freecell Solver
using the -p option.</simpara>
<simpara>You can specify the contents of the freecells by prefixing the line with
"FC:" or with "Freecells:". For example:</simpara>
<screen>FC: 3H QC</screen>
<simpara>will specify that the cards 3 of hearts and queen of clubs are present in
the freecells. To specify an empty freecell use a "-" as its designator.</simpara>
<simpara>If there&#8217;s another "FC:" line, the previous line will be overridden.</simpara>
<simpara>You can specify the contents of the foundations by prefixing the line with
"Founds:" or with "Foundations:" and then using a format as follows:</simpara>
<screen>Founds: H-5 C-A S-0 D-K</screen>
<simpara>Hence, the suit ID followed by a dash followed by the card number in the
foundation. A suit that is not present will be assumed to be 0. Again, if
there&#8217;s more than one line like that, then the previous lines will be
ignored and overridden.</simpara>
<simpara>The program will stop processing the input as soon as it read 8 lines of
standard stacks. Therefore, it is recommended that the foundations and
freecells lines will come at the beginning of the file.</simpara>
<simpara>The program will process the board and try to solve it. If it succeeds it
will output the states from the initial board to its final solution to the
standard output. If it fails, it will notify it.</simpara>
<simpara>For information about the various command-line switches that Freecell
Solver accepts, read the <literal>USAGE.txt</literal> file in this directory.</simpara>
<simpara>To solve Simple Simon boards append <literal>--game simple_simon</literal> right after
the "fc-solve" program name.</simpara>
</section>
<section xml:id="board_gen_programs">
<title>The board generation programs</title>
<simpara>Several programs which can generate the initial boards of various Freecell
implementations can be found in the "board_gen/" sub-directory. Read the
<literal>README.txt</literal> file there for details on how they can be compiled and used.</simpara>
<simpara>In any case, they can save you the time of inputting the board yourself.</simpara>
</section>
<section xml:id="complete_examples">
<title>Some complete examples for layouts</title>
<simpara>A layout in the middle of the MS Freecell deal No. 109 solution:</simpara>
<screen>Foundations: H-6 C-9 D-2 S-0
Freecells:  QS  3S  2S  KD
: 8H 3D
: KS QD JC
: AS 8D TD 7D JH TS 9D
: 7S 6D
: 5S
: KH QC JD TC 9H 8S 7H 6S 5D 4S
: KC QH JS TH 9S
: 4D</screen>
<simpara>Similar, but with an empty Freecell:</simpara>
<screen>Foundations: H-6 C-9 D-2 S-0
Freecells:  QS  3S  -  KD
: 8H 3D 2S
: KS QD JC
: AS 8D TD 7D JH TS 9D
: 7S 6D
: 5S
: KH QC JD TC 9H 8S 7H 6S 5D 4S
: KC QH JS TH 9S
: 4D</screen>
<simpara>Likewise, only without leading colons where unnecessary:</simpara>
<screen>Foundations: H-6 C-9 D-2 S-0
Freecells:  QS  3S  -  KD
8H 3D 2S
KS QD JC
AS 8D TD 7D JH TS 9D
7S 6D
5S
KH QC JD TC 9H 8S 7H 6S 5D 4S
KC QH JS TH 9S
4D</screen>
</section>
<section xml:id="how_to_read_sol">
<title>How to read the solutions</title>
<simpara>The file <literal>USAGE.txt</literal> covers all of Freecell Solver’s command line options,
but it may be too exhaustive for casual users. As a result, here is a shorter
tutorial. First of all whenever invoking <literal>fc-solve</literal> one should add the
flags <literal>-p -t -sam -sel</literal> which will make the solution easier to understand. Then,
assuming the board could be successfully solved, one will be given the layouts
in the solution (in the format given above) vis-a-vis with the moves as the
string. Note that the indexes of the resources given in the moves are
0-based rather than the more natural 1-based notation.</simpara>
</section>
</article>