bc468bef1192830166dff7a82cc8edb5af59fbfe
[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-190"></a><a name="index-Chess-engine-options-191"></a>
36      <dl>
37 <dt>-tc or -timeControl minutes[:seconds]<dd><a name="index-tc_002c-option-192"></a><a name="index-timeControl_002c-option-193"></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-194"></a><a name="index-movesPerSession_002c-option-195"></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-196"></a><a name="index-timeIncrement_002c-option-197"></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-198"></a><a name="index-clockMode_002c-option-199"></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-200"></a><a name="index-searchTime_002c-option-201"></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-202"></a><a name="index-searchDepth_002c-option-203"></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-204"></a><a name="index-secondNPS_002c-option-205"></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-206"></a><a name="index-secondTimeOdds_002c-option-207"></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-208"></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-209"></a><a name="index-showThinking_002c-option-210"></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-211"></a><a name="index-ponderNextMove_002c-option-212"></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-213"></a><a name="index-matchGames_002c-option-214"></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-215"></a><a name="index-matchMode_002c-option-216"></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-217"></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-218"></a><a name="index-firstChessProgram_002c-option-219"></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-220"></a><a name="index-secondChessProgram_002c-option-221"></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>-fb/-xfb or -firstPlaysBlack true/false<dd><a name="index-fb_002c-option-222"></a><a name="index-firstPlaysBlack_002c-option-223"></a>In games between two chess engines, firstChessProgram normally plays
121 white.  If this option is true, firstChessProgram plays black.  In a
122 multi-game match, this option affects the colors only for the first
123 game; they still alternate in subsequent games. 
124 <br><dt>-fh or -firstHost host<dt>-sh or -secondHost host<dd><a name="index-fh_002c-option-224"></a><a name="index-firstHost_002c-option-225"></a><a name="index-sh_002c-option-226"></a><a name="index-secondHost_002c-option-227"></a>Hosts on which the chess engines are to run. The default for
125 each is <samp><span class="file">localhost</span></samp>. If you specify another host, XBoard
126 uses <samp><span class="file">rsh</span></samp> to run the chess engine there. (You can substitute a
127 different remote shell program for rsh using the <code>remoteShell</code>
128 option described below.) 
129 <br><dt>-fd or -firstDirectory dir<dt>-sd or -secondDirectory dir<dd><a name="index-fd_002c-option-228"></a><a name="index-firstDirectory_002c-option-229"></a><a name="index-sd_002c-option-230"></a><a name="index-secondDirectory_002c-option-231"></a>Working directories in which the chess engines are to be run. 
130 The default is "", which means to run the chess engine
131 in the same working directory as XBoard
132 itself.  (See the CHESSDIR environment variable.) 
133 This option is effective only when the chess engine is being run
134 on the local host; it does not work if the engine is run remotely
135 using the -fh or -sh option. 
136 <br><dt>-initString string or -firstInitString<dt>-secondInitString string<dd><a name="index-initString_002c-option-232"></a><a name="index-firstInitString_002c-option-233"></a><a name="index-secondInitString_002c-option-234"></a>The string that is sent to initialize each chess engine for a new game. 
137 Default:
138
139      <pre class="example">          new
140           random
141 </pre>
142      <p class="noindent">Setting this option from the command line is tricky, because you must
143 type in real newline characters, including one at the very end. 
144 In most shells you can do this by
145 entering a &lsquo;<samp><span class="samp">\</span></samp>&rsquo; character followed by a newline. It is easier to set
146 the option from your <samp><span class="file">.Xresources</span></samp> file; in that case you can
147 include the character sequence &lsquo;<samp><span class="samp">\n</span></samp>&rsquo; in the string, and it will
148 be converted to a newline.
149
150      <p>If you change this option, don't remove the &lsquo;<samp><span class="samp">new</span></samp>&rsquo;
151 command; it is required by all chess engines to
152 start a new game.
153
154      <p>You can remove the &lsquo;<samp><span class="samp">random</span></samp>&rsquo; command if you like; including it
155 causes GNU Chess 4 to randomize its move selection slightly so that it
156 doesn't play the same moves in every game.  Even without
157 &lsquo;<samp><span class="samp">random</span></samp>&rsquo;, GNU Chess 4 randomizes its choice of moves from its
158 opening book.  Many other chess engines ignore this command entirely
159 and always (or never) randomize.
160
161      <p>You can also try adding other commands to the initString; see the
162 documentation of the chess engine you are using for details. 
163 <br><dt>-firstComputerString string<dt>-secondComputerString string<dd><a name="index-firstComputerString_002c-option-235"></a><a name="index-secondComputerString_002c-option-236"></a>The string that is sent to the chess engine if its opponent is another
164 computer chess engine.  The default is &lsquo;<samp><span class="samp">computer\n</span></samp>&rsquo;.  Probably the
165 only useful alternative is the empty string (&lsquo;<samp></samp>&rsquo;), which keeps the
166 engine from knowing that it is playing another computer. 
167 <br><dt>-reuse/-xreuse or -reuseFirst true/false<dt>-reuse2/-xreuse2 or -reuseSecond true/false<dd><a name="index-reuse_002c-option-237"></a><a name="index-reuseFirst_002c-option-238"></a><a name="index-reuse2_002c-option-239"></a><a name="index-reuseSecond_002c-option-240"></a>If the option is false,
168 XBoard kills off the chess engine after every game and starts
169 it again for the next game. 
170 If the option is true (the default),
171 XBoard starts the chess engine only once
172 and uses it repeatedly to play multiple games. 
173 Some old chess engines may not work properly when
174 reuse is turned on, but otherwise games will start faster if it is left on. 
175 <br><dt>-firstProtocolVersion version-number<dt>-secondProtocolVersion version-number<dd><a name="index-firstProtocolVersion_002c-option-241"></a><a name="index-secondProtocolVersion_002c-option-242"></a>This option specifies which version of the chess engine communication
176 protocol to use.  By default, version-number is 2.  In version 1, the
177 "protover" command is not sent to the engine; since version 1 is a
178 subset of version 2, nothing else changes.  Other values for
179 version-number are not supported. 
180 <br><dt>-firstScoreAbs true/false<dt>-secondScoreAbs true/false<dd><a name="index-firstScoreAbs_002c-option-243"></a><a name="index-secondScoreAbs_002c-option-244"></a>If this option is set, the score reported by the engine is taken to be
181 that in favor of white, even when the engine plays black. 
182 Important when XBoard uses the score for adjudications, or in PGN reporting. 
183 <br><dt>-niceEngines priority<dd><a name="index-niceEngines_002c-option-245"></a>This option allows you to lower the priority of the engine processes,
184 so that the generally insatiable hunger for CPU time of chess engines does not interfere so much
185 with smooth operation of XBoard (or the rest of your system). 
186 Negative values could increase the engine priority, which is not recommended. 
187 <br><dt>-firstOptions string<dt>-secondOptions string<dd><a name="index-firstOptions_002c-option-246"></a><a name="index-secondOptions_002c-option-247"></a>The given string is a comma-separated list of (option name=option value) pairs,
188 like the following example: "style=Karpov,blunder rate=0". 
189 If an option announced by the engine at startup through the feature commands of the XBoard/WinBoard protocol
190 matches one of the option names (i.e. "style" or "blunder rate"),
191 it would be set to the given value (i.e. "Karpov" or 0)
192 through a corresponding option command to the engine. 
193 This provided that the type of the value (text or numeric) matches as well. 
194 <br><dt>-firstNeedsNoncompliantFEN string<dt>-secondNeedsNoncompliantFEN string<dd><a name="index-firstNeedsNoncompliantFEN_002c-option-248"></a><a name="index-secondNeedsNoncompliantFEN_002c-option-249"></a>The castling rights and e.p. fields of the FEN sent to the mentioned engine
195 with the setboard command will be replaced by the given string. This can for
196 instance be used to run engines that do not understand Chess960 FENs in
197 variant fischerandom, to make them at least understand the opening position,
198 through setting the string to "KQkq -". (Note you also have to give the e.p. field!) 
199 Other possible applications are to provide work-arounds for engines that want to see
200 castling and e.p. fields in variants that do not have castling or e.p. 
201 (shatranj, courier, xiangqi, shogi) so that XBoard would normally omit them
202 (string = "- -"), or to add variant-specific fields that are not yet supported by XBoard
203 (e.g. to indicate the number of checks in 3check). 
204 <br><dt>-shuffleOpenings<dd><a name="index-shuffleOpenings_002c-option-250"></a>Forces shuffling of the opening setup in variants that normally have a fixed initial position. 
205 Shufflings are symmetric for black and white, and exempt King and Rooks in variants
206 with normal castling. 
207 Remains in force until a new variant is selected. 
208 </dl>
209
210    </body></html>
211