updated manual to 4.7.0
[xboard.git] / manual / html_node / Chess-engine-options.html
1 <html lang="en">
2 <head>
3 <title>Chess engine options - XBoard</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="XBoard">
6 <meta name="generator" content="makeinfo 4.13">
7 <link title="Top" rel="start" href="index.html#Top">
8 <link rel="up" href="Options.html#Options" title="Options">
9 <link rel="next" href="UCI-_002b-WB-Engine-Settings.html#UCI-_002b-WB-Engine-Settings" title="UCI + WB Engine Settings">
10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
11 <meta http-equiv="Content-Style-Type" content="text/css">
12 <style type="text/css"><!--
13   pre.display { font-family:inherit }
14   pre.format  { font-family:inherit }
15   pre.smalldisplay { font-family:inherit; font-size:smaller }
16   pre.smallformat  { font-family:inherit; font-size:smaller }
17   pre.smallexample { font-size:smaller }
18   pre.smalllisp    { font-size:smaller }
19   span.sc    { font-variant:small-caps }
20   span.roman { font-family:serif; font-weight:normal; } 
21   span.sansserif { font-family:sans-serif; font-weight:normal; } 
22 --></style>
23 </head>
24 <body>
25 <div class="node">
26 <a name="Chess-engine-options"></a>
27 <p>
28 Next:&nbsp;<a rel="next" accesskey="n" href="UCI-_002b-WB-Engine-Settings.html#UCI-_002b-WB-Engine-Settings">UCI + WB Engine Settings</a>,
29 Up:&nbsp;<a rel="up" accesskey="u" href="Options.html#Options">Options</a>
30 <hr>
31 </div>
32
33 <h3 class="section">4.1 Chess Engine Options</h3>
34
35 <p><a name="index-options_002c-Chess-engine-195"></a><a name="index-Chess-engine-options-196"></a>
36      <dl>
37 <dt>-tc or -timeControl minutes[:seconds]<dd><a name="index-tc_002c-option-197"></a><a name="index-timeControl_002c-option-198"></a>Each player begins with his clock set to the <code>timeControl</code> period. 
38 Default: 5 minutes. 
39 The additional options <code>movesPerSession</code> and <code>timeIncrement</code>
40 are mutually exclusive. 
41 <br><dt>-mps or -movesPerSession moves<dd><a name="index-mps_002c-option-199"></a><a name="index-movesPerSession_002c-option-200"></a>When both players have made <code>movesPerSession</code> moves, a
42 new <code>timeControl</code> period is added to both clocks.  Default: 40 moves. 
43 <br><dt>-inc or -timeIncrement seconds<dd><a name="index-inc_002c-option-201"></a><a name="index-timeIncrement_002c-option-202"></a>If this option is specified, <code>movesPerSession</code> is ignored. 
44 Instead, after each player's move, <code>timeIncrement</code> seconds are
45 added to his clock. 
46 Use &lsquo;<samp><span class="samp">-inc 0</span></samp>&rsquo; if you want to require the entire
47 game to be played in one <code>timeControl</code> period, with no increment. 
48 Default: -1, which specifies <code>movesPerSession</code> mode. 
49 <br><dt>-clock/-xclock or -clockMode true/false<dd><a name="index-clock_002c-option-203"></a><a name="index-clockMode_002c-option-204"></a>Determines whether or not to display the chess clocks. If clockMode is
50 false, the clocks are not shown, but the side that is to play next
51 is still highlighted. Also, unless <code>searchTime</code>
52 is set, the chess engine still keeps track of the clock time and uses it to
53 determine how fast to make its moves. 
54 <br><dt>-st or -searchTime minutes[:seconds]<dd><a name="index-st_002c-option-205"></a><a name="index-searchTime_002c-option-206"></a>Tells the chess engine to spend at most the given amount of time
55 searching for each of its moves. Without this option, the chess engine
56 chooses its search time based on the number of moves and amount
57 of time remaining until the next time control. 
58 Setting this option also sets clockMode to false. 
59 <br><dt>-depth or -searchDepth number<dd><a name="index-sd_002c-option-207"></a><a name="index-searchDepth_002c-option-208"></a>Tells the chess engine to look ahead at most the given number of moves
60 when searching for a move to make. Without this option, the chess
61 engine chooses its search depth based on the number of moves and
62 amount of time remaining until the next time control.  With the option,
63 the engine will cut off its search early if it reaches the specified depth. 
64 <br><dt>-firstNPS number<dt>-secondNPS number<dd><a name="index-firstNPS_002c-option-209"></a><a name="index-secondNPS_002c-option-210"></a>Tells the chess engine to use an internal time standard based on its node count,
65 rather then wall-clock time, to make its timing decisions. 
66 The time in virtual seconds should be obtained by dividing the node count
67 through the given number, like the number was a rate in nodes per second. 
68 Xboard will manage the clocks in accordance with this, relying on the number
69 of nodes reported by the engine in its thinking output. If the given number equals zero,
70 it can obviously not be used to convert nodes to seconds, and the time reported
71 by the engine is used to decrement the XBoard clock in stead. The engine is supposed to
72 report in CPU time it uses, rather than wall-clock time, in this mode. This option
73 can provide fairer conditions for engine-engine matches on heavily loaded machines,
74 or with very fast games (where the wall clock is too inaccurate). 
75 <code>showThinking</code> must be on for this option to work. Default: -1 (off). 
76 Not many engines might support this yet! 
77 <br><dt>-firstTimeOdds factor<dt>-secondTimeOdds factor<dd><a name="index-firstTimeOdds_002c-option-211"></a><a name="index-secondTimeOdds_002c-option-212"></a>Reduces the time given to the mentioned engine by the given factor. 
78 If pondering is off, the effect is indistinguishable from what would happen
79 if the engine was running on an n-times slower machine. Default: 1. 
80 <br><dt>-timeOddsMode mode<dd><a name="index-timeOddsMode_002c-option-213"></a>This option determines how the case is handled where both engines have a time-odds handicap. 
81 If mode=1, the engine that gets the most time will always get the nominal time,
82 as specified by the time-control options, and its opponent's time is renormalized accordingly. 
83 If mode=0, both play with reduced time. Default: 0. 
84 <br><dt>-hideThinkingFromHuman true/false<dd>Controls the Hide Thinking option. See <a href="Options-Menu.html#Options-Menu">Options Menu</a>. Default: true. 
85 (Replaces the Show-Thinking option of older xboard versions.) 
86 <br><dt>-thinking/-xthinking or -showThinking true/false<dd><a name="index-thinking_002c-option-214"></a><a name="index-showThinking_002c-option-215"></a>Forces the engine to send thinking output to xboard. 
87 Used to be the only way to control if thinking output was displayed
88 in older xboard versions,
89 but as the thinking output in xboard 4.3 is also used for several other
90 purposes (adjudication, storing in PGN file) the display of it is now controlled
91 by the new option Hide Thinking. See <a href="Options-Menu.html#Options-Menu">Options Menu</a>. Default: false. 
92 (But if xboard needs the thinking output for some purpose,
93 it makes the engine send it despite the setting of this option.) 
94 <br><dt>-ponder/-xponder or -ponderNextMove true/false<dd><a name="index-ponder_002c-option-216"></a><a name="index-ponderNextMove_002c-option-217"></a>Sets the Ponder Next Move menu option. See <a href="Options-Menu.html#Options-Menu">Options Menu</a>. Default: true. 
95 <br><dt>-smpCores number<dd>Specifies the maximum number of CPUs an SMP engine is allowed to use. 
96 Only works for engines that support the XBoard/WinBoard-protocol cores feature. 
97 <br><dt>-mg or -matchGames n<dd><a name="index-mg_002c-option-218"></a><a name="index-matchGames_002c-option-219"></a>Automatically runs an n-game match between two chess engines,
98 with alternating colors. 
99 If the <code>loadGameFile</code> or <code>loadPositionFile</code> option is set,
100 XBoard
101 starts each game with the given opening moves or the given position;
102 otherwise, the games start with the standard initial chess position. 
103 If the <code>saveGameFile</code> option is set, a move record for the
104 match is appended to the specified file. If the <code>savePositionFile</code>
105 option is set, the final position reached in each game of the match is appended
106 to the specified file. When the match is over, XBoard
107 displays the match score and exits. Default: 0 (do not run a match). 
108 <br><dt>-mm/-xmm or -matchMode true/false<dd><a name="index-mm_002c-option-220"></a><a name="index-matchMode_002c-option-221"></a>Setting <code>matchMode</code> to true is equivalent to setting
109 <code>matchGames</code> to 1. 
110 <br><dt>-sameColorGames n<dd><a name="index-sameColorGames_002c-option-222"></a>Automatically runs an n-game match between two chess engines,
111 without alternating colors. 
112 Otherwise the same applies as for the &lsquo;<samp><span class="samp">-matchGames</span></samp>&rsquo; option,
113 over which it takes precedence if both are specified. (See there.) 
114 Default: 0 (do not run a match). 
115 <br><dt>-fcp or -firstChessProgram program<dd><a name="index-fcp_002c-option-223"></a><a name="index-firstChessProgram_002c-option-224"></a>Name of first chess engine. 
116 Default: <samp><span class="file">Fairy-Max</span></samp>. 
117 <br><dt>-scp or -secondChessProgram program<dd><a name="index-scp_002c-option-225"></a><a name="index-secondChessProgram_002c-option-226"></a>Name of second chess engine, if needed. 
118 A second chess engine is started only in Two Machines (match) mode. 
119 Default: <samp><span class="file">Fairy-Max</span></samp>. 
120 <br><dt>-fe or -firstEngine nickname<dd><a name="index-fe_002c-option-227"></a><a name="index-firstEngine_002c-option-228"></a>This is an alternative to the <code>fcp</code> option for specifying the first engine,
121 for engines that were already configured (using the &lsquo;<samp><span class="samp">Load Engine</span></samp>&rsquo; dialog)
122 in XBoard's settings file. 
123 It will not only retrieve the real name of the engine,
124 but also all options configured with it. 
125 (E.g. if it is UCI, whether it should use book.) 
126 <br><dt>-se or -secondEngine nickname<dd><a name="index-se_002c-option-229"></a><a name="index-secondEngine_002c-option-230"></a>As <code>fe</code>, but for the second engine. 
127 <br><dt>-fb/-xfb or -firstPlaysBlack true/false<dd><a name="index-fb_002c-option-231"></a><a name="index-firstPlaysBlack_002c-option-232"></a>In games between two chess engines, firstChessProgram normally plays
128 white.  If this option is true, firstChessProgram plays black.  In a
129 multi-game match, this option affects the colors only for the first
130 game; they still alternate in subsequent games. 
131 <br><dt>-fh or -firstHost host<dt>-sh or -secondHost host<dd><a name="index-fh_002c-option-233"></a><a name="index-firstHost_002c-option-234"></a><a name="index-sh_002c-option-235"></a><a name="index-secondHost_002c-option-236"></a>Hosts on which the chess engines are to run. The default for
132 each is <samp><span class="file">localhost</span></samp>. If you specify another host, XBoard
133 uses <samp><span class="file">rsh</span></samp> to run the chess engine there. (You can substitute a
134 different remote shell program for rsh using the <code>remoteShell</code>
135 option described below.) 
136 <br><dt>-fd or -firstDirectory dir<dt>-sd or -secondDirectory dir<dd><a name="index-fd_002c-option-237"></a><a name="index-firstDirectory_002c-option-238"></a><a name="index-sd_002c-option-239"></a><a name="index-secondDirectory_002c-option-240"></a>Working directories in which the chess engines are to be run. 
137 The default is "", which means to run the chess engine
138 in the same working directory as XBoard
139 itself.  (See the CHESSDIR environment variable.) 
140 This option is effective only when the chess engine is being run
141 on the local host; it does not work if the engine is run remotely
142 using the -fh or -sh option. 
143 <br><dt>-initString string or -firstInitString<dt>-secondInitString string<dd><a name="index-initString_002c-option-241"></a><a name="index-firstInitString_002c-option-242"></a><a name="index-secondInitString_002c-option-243"></a>The string that is sent to initialize each chess engine for a new game. 
144 Default:
145
146      <pre class="example">          new
147           random
148 </pre>
149      <p class="noindent">Setting this option from the command line is tricky, because you must
150 type in real newline characters, including one at the very end. 
151 In most shells you can do this by
152 entering a &lsquo;<samp><span class="samp">\</span></samp>&rsquo; character followed by a newline. 
153 Using the character sequence &lsquo;<samp><span class="samp">\n</span></samp>&rsquo; in the string should work too, though.
154
155      <p>If you change this option, don't remove the &lsquo;<samp><span class="samp">new</span></samp>&rsquo;
156 command; it is required by all chess engines to
157 start a new game.
158
159      <p>You can remove the &lsquo;<samp><span class="samp">random</span></samp>&rsquo; command if you like; including it
160 causes GNU Chess 4 to randomize its move selection slightly so that it
161 doesn't play the same moves in every game.  Even without
162 &lsquo;<samp><span class="samp">random</span></samp>&rsquo;, GNU Chess 4 randomizes its choice of moves from its
163 opening book.  Many other chess engines ignore this command entirely
164 and always (or never) randomize.
165
166      <p>You can also try adding other commands to the initString; see the
167 documentation of the chess engine you are using for details. 
168 <br><dt>-firstComputerString string<dt>-secondComputerString string<dd><a name="index-firstComputerString_002c-option-244"></a><a name="index-secondComputerString_002c-option-245"></a>The string that is sent to the chess engine if its opponent is another
169 computer chess engine.  The default is &lsquo;<samp><span class="samp">computer\n</span></samp>&rsquo;.  Probably the
170 only useful alternative is the empty string (&lsquo;<samp></samp>&rsquo;), which keeps the
171 engine from knowing that it is playing another computer. 
172 <br><dt>-reuse/-xreuse or -reuseFirst true/false<dt>-reuse2/-xreuse2 or -reuseSecond true/false<dd><a name="index-reuse_002c-option-246"></a><a name="index-reuseFirst_002c-option-247"></a><a name="index-reuse2_002c-option-248"></a><a name="index-reuseSecond_002c-option-249"></a>If the option is false,
173 XBoard kills off the chess engine after every game and starts
174 it again for the next game. 
175 If the option is true (the default),
176 XBoard starts the chess engine only once
177 and uses it repeatedly to play multiple games. 
178 Some old chess engines may not work properly when
179 reuse is turned on, but otherwise games will start faster if it is left on. 
180 <br><dt>-firstProtocolVersion version-number<dt>-secondProtocolVersion version-number<dd><a name="index-firstProtocolVersion_002c-option-250"></a><a name="index-secondProtocolVersion_002c-option-251"></a>This option specifies which version of the chess engine communication
181 protocol to use.  By default, version-number is 2.  In version 1, the
182 "protover" command is not sent to the engine; since version 1 is a
183 subset of version 2, nothing else changes.  Other values for
184 version-number are not supported. 
185 <br><dt>-firstScoreAbs true/false<dt>-secondScoreAbs true/false<dd><a name="index-firstScoreAbs_002c-option-252"></a><a name="index-secondScoreAbs_002c-option-253"></a>If this option is set, the score reported by the engine is taken to be
186 that in favor of white, even when the engine plays black. 
187 Important when XBoard uses the score for adjudications, or in PGN reporting. 
188 <br><dt>-niceEngines priority<dd><a name="index-niceEngines_002c-option-254"></a>This option allows you to lower the priority of the engine processes,
189 so that the generally insatiable hunger for CPU time of chess engines does not interfere so much
190 with smooth operation of XBoard (or the rest of your system). 
191 Negative values could increase the engine priority, which is not recommended. 
192 <br><dt>-firstOptions string<dt>-secondOptions string<dd><a name="index-firstOptions_002c-option-255"></a><a name="index-secondOptions_002c-option-256"></a>The given string is a comma-separated list of (option name=option value) pairs,
193 like the following example: "style=Karpov,blunder rate=0". 
194 If an option announced by the engine at startup through the feature commands of the XBoard/WinBoard protocol
195 matches one of the option names (i.e. "style" or "blunder rate"),
196 it would be set to the given value (i.e. "Karpov" or 0)
197 through a corresponding option command to the engine. 
198 This provided that the type of the value (text or numeric) matches as well. 
199 <br><dt>-firstNeedsNoncompliantFEN string<dt>-secondNeedsNoncompliantFEN string<dd><a name="index-firstNeedsNoncompliantFEN_002c-option-257"></a><a name="index-secondNeedsNoncompliantFEN_002c-option-258"></a>The castling rights and e.p. fields of the FEN sent to the mentioned engine
200 with the setboard command will be replaced by the given string. This can for
201 instance be used to run engines that do not understand Chess960 FENs in
202 variant fischerandom, to make them at least understand the opening position,
203 through setting the string to "KQkq -". (Note you also have to give the e.p. field!) 
204 Other possible applications are to provide work-arounds for engines that want to see
205 castling and e.p. fields in variants that do not have castling or e.p. 
206 (shatranj, courier, xiangqi, shogi) so that XBoard would normally omit them
207 (string = "- -"), or to add variant-specific fields that are not yet supported by XBoard
208 (e.g. to indicate the number of checks in 3check). 
209 <br><dt>-shuffleOpenings<dd><a name="index-shuffleOpenings_002c-option-259"></a>Forces shuffling of the opening setup in variants that normally have a fixed initial position. 
210 Shufflings are symmetric for black and white, and exempt King and Rooks in variants
211 with normal castling. 
212 Remains in force until a new variant is selected. 
213 </dl>
214
215    </body></html>
216