Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 31 | pmbaty | 1 | command synopsis | 
| 2 | |||
| 3 | !command....................... passes command to a shell. | ||
| 4 | adaptive NPS a b c d........... enables adaptive hash mode. | ||
| 5 | alarm on|off................... turns audible alarm on/off. | ||
| 6 | analyze........................ analyze a game in progress. | ||
| 7 | annotate....................... annotate game | ||
| 8 | batch on|off................... on disables async I/O for batch file usage | ||
| 9 | bench.......................... runs performance benchmark. | ||
| 10 | black.......................... sets black to move. | ||
| 11 | book........................... controls book | ||
| 12 | cache=n........................ sets tablebase cache size. | ||
| 13 | clock.......................... displays/adjusts chess clock times. | ||
| 14 | display........................ displays chess board. | ||
| 15 | display [n].................... sets display options | ||
| 16 | draw accept|decline............ decline always declines. | ||
| 17 | draw offer|nooffer............. nooffer never offers a draw. | ||
| 18 | echo........................... echos output to display. | ||
| 19 | edit........................... edit board position. | ||
| 20 | egtb........................... enables endgame database probes. | ||
| 21 | epdhelp........................ info about EPD facility. | ||
| 22 | end............................ terminates program. | ||
| 23 | evaluation..................... adjust evaluation terms. | ||
| 24 | exit........................... restores STDIN to keyboard. | ||
| 25 | force move..................... forces specific move. | ||
| 26 | hash n......................... sets transposition table size. | ||
| 27 | (n bytes, nK bytes or nM bytes). | ||
| 28 | hashp n........................ sets pawn hash table size. | ||
| 29 | history........................ display game moves. | ||
| 30 | import filename................ imports learning data (.lrn files). | ||
| 31 | info........................... displays program settings. | ||
| 32 | input filename................. sets STDIN to filename, reverts back on exit. | ||
| 33 | kibitz n....................... sets kibitz mode n on ICS. | ||
| 34 | learn n|clear.................. enables/disables learning (100 = default). | ||
| 35 | clear clears all learned information | ||
| 36 | level moves time inc........... sets ICS time controls. | ||
| 37 | linelength n................... sets line length to n. A really large value | ||
| 38 | will produce 1 line PVs, making parsing easier | ||
| 39 | list........................... update/display GM/IM/computer lists. | ||
| 40 | load file title................ load a position from problem file, starting | ||
| 41 | with line containing title, ending on exit. | ||
| 42 | log on|off..................... turn logging on/off. | ||
| 43 | mode normal|tournament......... toggles tournament mode. | ||
| 44 | move........................... initiates search (same as go). | ||
| 45 | name........................... sets opponent's name. | ||
| 46 | new............................ initialize and start new game. | ||
| 47 | noise n........................ no status until n nodes searched. | ||
| 48 | operator seconds............... sets operator time per move. | ||
| 49 | output long|short.............. sets move display format to long or SAN | ||
| 50 | perf........................... times the move generator/make_move. | ||
| 51 | perft.......................... tests the move generator/make_move. | ||
| 52 | personality save|load fn....... saves/loads a personality file. | ||
| 53 | pgn option value............... set PGN header information. | ||
| 54 | phash n........................ sets path hash table size. | ||
| 55 | ponder on|off.................. toggle pondering off/on. | ||
| 56 | ponder move.................... ponder "move" as predicted move. | ||
| 57 | rating a b..................... sets Crafty rating to a, opponent to b | ||
| 58 | (affects draw score/contempt) | ||
| 59 | read [filename]................ read moves in (from [filename] if given.) | ||
| 60 | reada [filename]............... read moves in (from [filename]]) and append. | ||
| 61 | (appends to current game history.) | ||
| 62 | reset n........................ reset game to move n. | ||
| 63 | resign......................... ends current game recording Crafty as winner. | ||
| 64 | resign m n..................... set resign threshold to m pawns. | ||
| 65 | n = # of moves before resigning. | ||
| 66 | savegame [filename]............ saves game in PGN format (to filename). | ||
| 67 | savepos [filename]............. saves position in FEN string (to filename). | ||
| 68 | score.......................... print evaluation of position. | ||
| 69 | sd n........................... sets absolute search depth. | ||
| 70 | search move.................... search specified move only. | ||
| 71 | selective min max.............. set null move depths. | ||
| 72 | setboard FEN................... sets board position to FEN position. | ||
| 73 | settc.......................... set time controls. | ||
| 74 | show book...................... toggle book statistics. | ||
| 75 | skill n........................ set skill level to n | ||
| 76 | smpgroup....................... sets max threads allowed at one node. | ||
| 77 | smpmin......................... sets min remaining depth to split search. | ||
| 78 | smpmt.......................... sets number of thread (CPUS) to use. | ||
| 79 | smpnice........................ sets kill or keep threads. | ||
| 80 | smproot........................ sets whether or not to split at root. | ||
| 81 | smpsn.......................... sets min nodes before a new thread can split | ||
| 82 | sn n........................... sets absolute search node limit. | ||
| 83 | speech on|off.................. enables (disables) audio output. | ||
| 84 | st n........................... sets absolute search time. | ||
| 85 | store val...................... stores position/score (position.bin). | ||
| 86 | swindle on|off................. enables/disables swindle mode. | ||
| 87 | tags........................... list PGN header tags. | ||
| 88 | test file [N].................. test a suite of problems. | ||
| 89 | time........................... time controls. | ||
| 90 | timebook....................... out of book time adjustment | ||
| 91 | trace n........................ display search tree below depth n. | ||
| 92 | usage percentage............... adjusts Crafty's time usage up or down. | ||
| 93 | whisper n...................... sets ICS whisper mode n. | ||
| 94 | white.......................... sets white to move. | ||
| 95 | wild n......................... sets ICS wild position (7 for now). | ||
| 96 | xboard......................... sets xboard compatibility mode. | ||
| 97 | |||
| 98 | Type "help command" to see more detailed help information, if it is | ||
| 99 | available. Note that help is not available for all possible commands. | ||
| 100 | <end> | ||
| 101 | |||
| 102 | <analyze> | ||
| 103 | The analyze command puts Crafty into a mode where it will search forever | ||
| 104 | in the current position. When a move is entered, crafty will make that | ||
| 105 | move, switch sides, and again compute, printing analysis as it searches. | ||
| 106 | You can back up a move by entering "back" or you can back up several | ||
| 107 | moves by entering "back n". Note that n is the number of moves, counting | ||
| 108 | each player's move as one (ie n plies, not n full moves). | ||
| 109 | <end> | ||
| 110 | |||
| 111 | <annotate> | ||
| 112 | annotate[h|t] filename side moves margin time [n] | ||
| 113 | |||
| 114 | Filename is the input file with game moves, while the output will be | ||
| 115 | written to filename.can. The input file is PGN-compatible with one | ||
| 116 | addition, the ability to request that alternative moves also be | ||
| 117 | analyzed at any point. To do this at the point where you have | ||
| 118 | alternative moves, simply include them in braces {move1, move2}, | ||
| 119 | and Crafty will then search them also. | ||
| 120 | |||
| 121 | Side can be b/w/bw to indicate whether to annotate only the white | ||
| 122 | side (w), the black side (b) or both (bw). Side can also be the | ||
| 123 | players name, where Crafty will then use the players name and the | ||
| 124 | PGN tags to discover which you want the annotation done for. | ||
| 125 | |||
| 126 | Moves indicates which moves to annotate. A single value says start | ||
| 127 | at the indicated move and go through the entire game. A range (20-30) | ||
| 128 | annotates the given range only. | ||
| 129 | |||
| 130 | Margin is the difference between the search value for the move played | ||
| 131 | in the game, and the best move crafty found, before a comment is | ||
| 132 | generated (pawn=1.0). | ||
| 133 | |||
| 134 | Time is the time limit per move in seconds. | ||
| 135 | |||
| 136 | If the optional "n" is appended, this produces N best moves/scores/PV's, | ||
| 137 | rather than just the very best move. It won't display any move that | ||
| 138 | is worse than the actual game move played, but you can use -N to force | ||
| 139 | Crafty to produce N PV's regardless of how bad they get. | ||
| 140 | |||
| 141 | Using 'annotateh' produces an HTML file with bitmapped board displays | ||
| 142 | where analysis was displayed. | ||
| 143 | |||
| 144 | Using "annotatet" will cause the output to be written in a LaTex (.tex) | ||
| 145 | format. | ||
| 146 | <end> | ||
| 147 | |||
| 148 | <book> | ||
| 149 | You can use the following commands to customize how the program uses | ||
| 150 | the opening book(book.bin and books.bin). Typically, book.bin contains | ||
| 151 | a large opening database made from GM games. Books.bin is a short, | ||
| 152 | customized book that contains selected lines that are well-suited to | ||
| 153 | Crafty's style of play. The flags can further refine how this small | ||
| 154 | book file is used to encourage/avoid specific lines. | ||
| 155 | |||
| 156 | binfile create filename [maxply] [mp] [wpc] | ||
| 157 | |||
| 158 | This command creates a new book by first removing the old binary file. | ||
| 159 | it then will parse filename and add the moves to the binary book | ||
| 160 | filename given as binfile. | ||
| 161 | |||
| 162 | maxply is the max length of book moves stored from any single PGN | ||
| 163 | game in the input file. | ||
| 164 | |||
| 165 | mp means a particular move must appear in at least that many games | ||
| 166 | to be stored in the book file. | ||
| 167 | |||
| 168 | wpc is the relative winning percentage. 50 means exclude any book move | ||
| 169 | that doesn't have at least 50% as many wins as losses. | ||
| 170 | |||
| 171 | book mask accept chars | ||
| 172 | |||
| 173 | Sets the accept mask to the flag characters in chars (see flags below.) | ||
| 174 | Any flags set in this mask will include either (a) moves with the flag | ||
| 175 | set, or (b) moves with no flags set. | ||
| 176 | |||
| 177 | book mask reject chars | ||
| 178 | |||
| 179 | Sets the reject mask to the flag characters in chars (see flags below.) | ||
| 180 | Any flags set in this mask will reject any moves with the flag set (in | ||
| 181 | the opening book.) | ||
| 182 | |||
| 183 | book off turns the book completely off. | ||
| 184 | |||
| 185 | book random 0|1 disables/enables randomness. Book random 0 takes the set | ||
| 186 | of book moves and searches them for about 1/10th of the normal search time | ||
| 187 | and lets the search choose which move to play. Any move not in the book | ||
| 188 | file will not be considered or played. | ||
| 189 | |||
| 190 | bookw weight v | ||
| 191 | |||
| 192 | Sets weight for book ordering. (Weights are freq (frequency), eval | ||
| 193 | (evaluation) and learn (learned scores). | ||
| 194 | |||
| 195 | book width n | ||
| 196 | |||
| 197 | Specifies how many moves from the sorted set of book moves are to be | ||
| 198 | considered. 1 produces the best move from the set, but provides little | ||
| 199 | randomness. 99 includes all moves in the book move set. | ||
| 200 | |||
| 201 | Flags are one (or more) members of the following set of characters:  {?? ? | ||
| 202 | = ! !! 0 1 2 3 4 5 6 7 8 9 A B C D E F} Normally, ?? means never play, ? | ||
| 203 | means rarely play, = means drawish opening, ! means good move, !! means | ||
| 204 | always play, and 0-F are user flags that a user can add to any move in the | ||
| 205 | book, and by setting the right mask (above) can force the program to either | ||
| 206 | always play the move or never play the move. The special character * means | ||
| 207 | all flags and is probably dangerous to use. Flags are added to a move by | ||
| 208 | entering the move and a / or \ followed by the flags. / means add the flags | ||
| 209 | to the move preserving other flags already there while \ means replace any | ||
| 210 | flags with those following the \. | ||
| 211 | |||
| 212 | The format of the book text (raw data) is as follows: | ||
| 213 | |||
| 214 | [title information] (required) | ||
| 215 | 1. e4 e5 2. Nf3 Nc6 3. ... (a sequence of moves) | ||
| 216 | [title information for next line] (required) | ||
| 217 | 1. e4 e6 ... | ||
| 218 | end (optional) | ||
| 219 | <end> | ||
| 220 | |||
| 221 | <clock> | ||
| 222 | clock crafty-time [opponent-time] | ||
| 223 | |||
| 224 | clock is primarily intended to be used in a computer chess tournament | ||
| 225 | where the games are played on a real chess board using a real chess | ||
| 226 | clock, rather than through some automatic interface that manages the | ||
| 227 | time automatically. | ||
| 228 | |||
| 229 | crafty-time is the amount of time left on Crafty's clock, expressed in | ||
| 230 | minutes, or in hh:mm format. Crafty will convert this to its internal | ||
| 231 | representation correctly. | ||
| 232 | |||
| 233 | opponent-time is the amount of time left on the opponent's clock, | ||
| 234 | expressed in the same way. This is option and is not required as | ||
| 235 | Crafty does not use this information during the game although it | ||
| 236 | does keep up with it. | ||
| 237 | |||
| 238 | After entering this command, you should probably type "clock" to be | ||
| 239 | sure things look correct. | ||
| 240 | |||
| 241 | Note that the "operator" command sets a time per move overhead for the | ||
| 242 | operator, and that this affects the actual time used as expected. IE in | ||
| 243 | the above clock setting, assuming the operator has allowed 10 seconds per | ||
| 244 | move, crafty will "hide" 35 * 10 seconds and not use it for searching, which | ||
| 245 | gives the operator time to actually make the moves and press the real clock | ||
| 246 | button. It is CRITICAL that the clock command be used from time to time to | ||
| 247 | keep Crafty's internal clock in sync with the real clock. If you use the | ||
| 248 | operator command, the clock value should match the real chess clock exactly, | ||
| 249 | if you choose to not use the operator time and fudge the chess clock time | ||
| 250 | yourself, that will work as well, but it is more prone to errors. | ||
| 251 | <end> | ||
| 252 | |||
| 253 | |||
| 254 | <display> | ||
| 255 | display changes -> display variation when it changes. | ||
| 256 | display extstats -> display search extension statistics. | ||
| 257 | display general -> display general info messages. | ||
| 258 | display hashstats -> display search hashing statistics. | ||
| 259 | display movenum -> display move numbers in PV. | ||
| 260 | display moves -> display moves as they are searched. | ||
| 261 | display movelist -> display move list after each iteration. | ||
| 262 | display ply1 -> display ply-1 move list/sorting info. | ||
| 263 | display stats -> display basic search statistics. | ||
| 264 | display time -> display time for moves. | ||
| 265 | display variation -> display variation at end of iteration. | ||
| 266 | <end> | ||
| 267 | |||
| 268 | <evaluation> | ||
| 269 | evaluation item# value [value ... value] | ||
| 270 | |||
| 271 | The evaluation command allows you to change specific evaluation | ||
| 272 | numbers when you want. The first thing you should do is type | ||
| 273 | "evaluation list" to show all the possible values. The format | ||
| 274 | looks like this when displayed: | ||
| 275 | |||
| 276 | White(1): evaluation list | ||
| 277 | ------------piece values-------------------- | ||
| 278 | 1 pawn value 100 | ||
| 279 | 2 knight value 300 | ||
| 280 | 3 bishop value 300 | ||
| 281 | 4 rook value 500 | ||
| 282 | 5 queen value 900 | ||
| 283 | ------------evaluation scale factors-------- | ||
| 284 | 11 blocked pawn scale factor 100 | ||
| 285 | 12 king safety asymmetry -20 | ||
| 286 | 13 king safety scale factor 100 | ||
| 287 | 14 king safety tropism scale factor 100 | ||
| 288 | 15 passed pawn scoring scale factor 100 | ||
| 289 | 16 pawn scoring scale factor 100 | ||
| 290 | 17 bad trade bonus/penalty 120 | ||
| 291 | ------------pawn evaluation----------------- | ||
| 292 | 21 eight pawns penalty 10 | ||
| 293 | 22 center pawn blocked 12 | ||
| 294 | 23 center pawn unmoved 16 | ||
| 295 | 24 pawn duo 2 | ||
| 296 | 25 protected passed pawn wins 50 | ||
| 297 | 26 pawn weak (one pawn blocking) 12 | ||
| 298 | 27 pawn weak (two pawns blocking) 20 | ||
| 299 | |||
| 300 | The first number is the evaluation term ID #. To change the | ||
| 301 | value of a pawn from the default 100 to 50, you would type | ||
| 302 | the following command: | ||
| 303 | |||
| 304 | eval 1 50 | ||
| 305 | |||
| 306 | Crafty will display this: | ||
| 307 | |||
| 308 | White(1): eval 1 50 | ||
| 309 | pawn value old:100 new:50 | ||
| 310 | |||
| 311 | And now pawns are worth 1/2 of what they were prior to the | ||
| 312 | command. Note that unless you specifically save the setting | ||
| 313 | with the "personality save" command, once you exit Crafty | ||
| 314 | the pawn value will return to 100 the next time you start it | ||
| 315 | up. You can, of course, put such commands in the .craftyrc/ | ||
| 316 | crafty.rc file, but it is simpler to use the personality | ||
| 317 | command instead (type "help personality" for more information). | ||
| 318 | |||
| 319 | Note that some evaluation terms have a list of numbers as they | ||
| 320 | are indexed by something. When you change one of these terms, | ||
| 321 | you must give _exactly_ the correct number of values, or the | ||
| 322 | command will produce an error without changing anything. | ||
| 323 | |||
| 324 | Some of the values are 8 X 8 matrices of values, where the | ||
| 325 | values correspond to the chess board as viewed with square | ||
| 326 | a1 on the bottom left. You must type the values in in order | ||
| 327 | as they appear on the screen. Crafty will shift things as | ||
| 328 | needed. IE for a piece/square table for knights, the first | ||
| 329 | value displayed is for a8, so the first value you enter must | ||
| 330 | also be for a8. Many of these matrices have black/white | ||
| 331 | counter-parts. You enter the white values, Crafty will | ||
| 332 | mirror those to reflect the _same_ values but from the black | ||
| 333 | side of the board. This will be done automatically. | ||
| 334 | |||
| 335 | Non 8 X 8 matrices are just dumped in order from element zero | ||
| 336 | to N. You enter those the same way. IE the way it prints them | ||
| 337 | out is the way you enter them, reading from top-to-bottom, and | ||
| 338 | left-to-right. | ||
| 339 | |||
| 340 | If you come up with an interesting personality, feel free to make | ||
| 341 | it available to everyone, and if it is particularly attractive, it | ||
| 342 | can become part of the "distributed" crafty personalities once this | ||
| 343 | has been released. | ||
| 344 | <end> | ||
| 345 | |||
| 346 | <lists> | ||
| 347 | list name +name -name ... | ||
| 348 | |||
| 349 | The lists are as follows: | ||
| 350 | |||
| 351 | AK Auto-Kibitz list. If crafty plays any opponent named in this list | ||
| 352 | while playing on a chess server, it will kibitz the usual analysis as | ||
| 353 | the game is played. Not advised for human opponents as they do not | ||
| 354 | like the "noise". | ||
| 355 | |||
| 356 | B Blocker list. If you notice a player repeatedly trying to block the | ||
| 357 | position to get easy draws, put his name in this list. Players in this | ||
| 358 | list get special "anti-human" scoring turned up louder than usual to | ||
| 359 | combat this strategy. | ||
| 360 | |||
| 361 | C Computer list. This is not needed on ICC as xboard/winboard both | ||
| 362 | tell crafty it is playing a computer opponent. However, if your GUI | ||
| 363 | does not do this, you can put the name of the computer opponents you | ||
| 364 | frequently play in this list and if the GUI sends the "name" command | ||
| 365 | properly, crafty will figure out that it is playing a computer. | ||
| 366 | |||
| 367 | GM/IM lists are obvious. This identifies players that are strong | ||
| 368 | enough that Crafty should resign or offer draws sooner than normal, | ||
| 369 | rather than hoping for a blunder in lost or drawn positions. | ||
| 370 | |||
| 371 | SP Special Player list. Names in this list can be used to specify | ||
| 372 | a unique opening book (to replace books.bin, not book.bin) for this | ||
| 373 | particular opponent, as well as specifying a personality file to use | ||
| 374 | rather than the default crafty.cpf. The format of this particular | ||
| 375 | list is: | ||
| 376 | |||
| 377 | list SP +name [book=filename] [personality=filename] | ||
| 378 | |||
| 379 | <end> | ||
| 380 | |||
| 381 | <mode> | ||
| 382 | |||
| 383 | This command influences how the book is used. | ||
| 384 | |||
| 385 | mode normal is the default. | ||
| 386 | |||
| 387 | mode tournament tells crafty to behave differently while in book. | ||
| 388 | Specifically, when it is pondering, it generates all of the opponent | ||
| 389 | moves and looks them up in the opening book. If it finds a book | ||
| 390 | reply, it eliminates that opponent move from the list. It then does | ||
| 391 | a 1/10th normal time search for the opponent, but ONLY considers those | ||
| 392 | moves it did not have a book reply for. It then takes the result of | ||
| 393 | that search and ponders that move, so that hopefully if the opponent | ||
| 394 | plays a move not in our book, we will already be thinking. | ||
| 395 | |||
| 396 | The more useful place, however, is where we play a book move that takes | ||
| 397 | the opponent out of book, and he spends a significant amount of time | ||
| 398 | thinking and plays a pretty obvious move. Since we ponder the best move | ||
| 399 | of his that we don't have a book move for, we have a good chance of | ||
| 400 | pondering the right move and saving time on our clock. | ||
| 401 | <end> | ||
| 402 | |||
| 403 | <personality> | ||
| 404 | personality load|save filename | ||
| 405 | |||
| 406 | perspath path-to-personality-directory | ||
| 407 | |||
| 408 | Crafty "personality" files (.cpf files) contain information that | ||
| 409 | affects three components of Crafty. | ||
| 410 | |||
| 411 | You can use the "selective" command to adjust the null-move R (min | ||
| 412 | and max) values. The default values are 2 and 3, and reducing them | ||
| 413 | will reduce Crafty's playing strength to some fairly significant | ||
| 414 | degree. | ||
| 415 | |||
| 416 | You can use the "extension" command to adjust the search extension | ||
| 417 | values. Reducing these will "dumb down" the search and make crafty | ||
| 418 | tactically (but not positionally) weaker. They can be set all the | ||
| 419 | way down to 0.00 if you choose. | ||
| 420 | |||
| 421 | You can use the evaluation command to adjust some global evaluation | ||
| 422 | weights (ie turn down total pawn scoring, or king safety, etc.) or | ||
| 423 | you can use this command to adjust individual scoring values, from | ||
| 424 | the value of pieces, to specific scoring terms for each piece such | ||
| 425 | as the value of a doubled pawn or whatever. | ||
| 426 | |||
| 427 | Once you find settings you like, you can use "personality save | ||
| 428 | filename" to save all of the above settings in one file. Later you | ||
| 429 | can use "personality load filename" to restore those settings prior | ||
| 430 | to playing a game. | ||
| 431 | |||
| 432 | One final note is that you can save to the specific file "crafty.cpf" | ||
| 433 | and your settings will become the _default_ each time you start | ||
| 434 | Crafty, until you either remove the file, load another personality, | ||
| 435 | or save a new default personality. | ||
| 436 | |||
| 437 | You can have as many different personality files as you want, and to | ||
| 438 | keep them from getting jumbled up, you can put them in a separate | ||
| 439 | directory and add the "perspath" to your .craftyrc/crafty.rc file to | ||
| 440 | point Crafty to the directory where the personality files belong. | ||
| 441 | <end> | ||
| 442 | |||
| 443 | <settc> | ||
| 444 | settc moves crafty-time opponent-time | ||
| 445 | |||
| 446 | settc is primarily intended to be used in a computer chess tournament | ||
| 447 | where the games are played on a real chess board using a real chess | ||
| 448 | clock, rather than through some automatic interface that manages the | ||
| 449 | time automatically. | ||
| 450 | |||
| 451 | moves is the number of moves left to the next time control from Crafty's | ||
| 452 | perspective. IE if the time control is 60 moves in 120 minutes (a normal | ||
| 453 | time control for the WCCC) and crafty has actually made 25 moves in the | ||
| 454 | current game, then the correct "moves" value would be 35, as there are | ||
| 455 | exactly 35 moves to be made before the next time control is reached. | ||
| 456 | |||
| 457 | crafty-time is the amount of time left on Crafty's clock, expressed in | ||
| 458 | minutes, or in hh:mm format. Crafty will convert this to its internal | ||
| 459 | representation correctly. | ||
| 460 | |||
| 461 | opponent-time is the amount of time left on the opponent's clock, | ||
| 462 | expressed in the same way. | ||
| 463 | |||
| 464 | After entering this command, you should probably type "clock" to be | ||
| 465 | sure things look correct. | ||
| 466 | |||
| 467 | Note that the "operator" command sets a time per move overhead for the | ||
| 468 | operator, and that this affects the actual time used as expected. IE in | ||
| 469 | the above clock setting, assuming the operator has allowed 10 seconds per | ||
| 470 | move, crafty will "hide" 35 * 10 seconds and not use it for searching, which | ||
| 471 | gives the operator time to actually make the moves and press the real clock | ||
| 472 | button. It is CRITICAL that the clock command be used from time to time to | ||
| 473 | keep Crafty's internal clock in sync with the real clock. If you use the | ||
| 474 | operator command, the settc value should match the real chess clock exactly, | ||
| 475 | if you choose to not use the operator time and fudge the chess clock time | ||
| 476 | yourself, that will work as well, but it is more prone to errors. | ||
| 477 | <end> | ||
| 478 | |||
| 479 | <test> | ||
| 480 | test filename [N] | ||
| 481 | |||
| 482 | Test is used to run a suite of "crafty format" test positions in a batch | ||
| 483 | run. filename is the name of the file in crafty test format. [N] is | ||
| 484 | an optional parameter that is used to shorten the test time. If crafty | ||
| 485 | likes the solution move for [N] consecutive iterations, it will stop | ||
| 486 | searching that position and consider it correct. This makes a Win At | ||
| 487 | Chess 60 second run take under 1/2 hour, for example. The "crafty format" | ||
| 488 | requires three lines per position. The first line must be a "title" line | ||
| 489 | and is used to identify each position. The second line is a "setboard" | ||
| 490 | command to set the position. The third line is a line that begins with | ||
| 491 | "solution", and then is followed by one or more solution moves. If a | ||
| 492 | position is correct only if a particular move or moves is *not* played, | ||
| 493 | enter the move followed by a "?", as in Nf3?, which means that this | ||
| 494 | position will be counted as correct only if Nf3 is not played. | ||
| 495 | |||
| 496 | Note that this command may refer to a normal EPD test file as well and | ||
| 497 | Crafty will run that test in the same way, but Crafty will notice it is an | ||
| 498 | EPD test file rather than a "crafty" test file and handle it appropriately. | ||
| 499 | <end> | ||
| 500 | |||
| 501 | <time> | ||
| 502 | Time controls whether the program uses CPU time or wall-clock time for | ||
| 503 | timing. For tournament play, it is safer to use wall-clock timing, for | ||
| 504 | testing it may be more consistent to use CPU timing if the machine is | ||
| 505 | used for other things concurrently with the tests being run. (Note that | ||
| 506 | this is not recommended when using a multiprocessor machine, CPU time in | ||
| 507 | a parallel search increases at N times the normal time rate where N is the | ||
| 508 | number of processors being used). | ||
| 509 | |||
| 510 | Time is also used to set the basic search timing controls. The general | ||
| 511 | form of the command is as follows: | ||
| 512 | |||
| 513 | time nmoves/ntime/[nmoves/ntime]/[increment] | ||
| 514 | |||
| 515 | nmoves/ntime represents a traditional first time control when nmoves is | ||
| 516 | an integer representing the number of moves and ntime is the total time | ||
| 517 | allowed for these moves. The [optional] nmoves/ntime is a traditional | ||
| 518 | secondary time control. Increment is a feature related to ICS play and | ||
| 519 | emulates the Fischer clock where increment is added to the time left | ||
| 520 | after each move is made. | ||
| 521 | |||
| 522 | As an alternative, nmoves can be "sd" which represents a sudden death | ||
| 523 | time control of the remainder of the game played in ntime. The optional | ||
| 524 | secondary time control can be a sudden-death time control, as in the | ||
| 525 | following example: | ||
| 526 | |||
| 527 | time 60/30/sd/30 | ||
| 528 | |||
| 529 | This sets 60 moves in 30 minutes, then game in 30 additional minutes. | ||
| 530 | An increment can be added if desired. | ||
| 531 | <end> | ||
| 532 | |||
| 533 | <timebook> | ||
| 534 | This command is used to adjust the time crafty uses for the first few | ||
| 535 | moves out of book. The first few non-book moves are often critical, | ||
| 536 | but the usual search time limit will be somewhat short since Crafty | ||
| 537 | wants to average the time left over the moves remaining until the | ||
| 538 | next time control. This command allows the user to influence how the | ||
| 539 | time is allocated on the first few moves out of book. | ||
| 540 | |||
| 541 | timebook <factor> <moves> | ||
| 542 | |||
| 543 | factor is a number expressed as a percentage, and specifies how much | ||
| 544 | extra time (in terms of the normal target time) to use. For example, | ||
| 545 | a value of 100 says use 100% extra time, which essentially doubles | ||
| 546 | the target time limit. A value of 50 says use 50% extra time, or | ||
| 547 | 1.5X the normal target time. This applies to the first move out of | ||
| 548 | book. | ||
| 549 | |||
| 550 | moves indicates the number of moves this extra time will be used. The | ||
| 551 | extra time is uniformly "decayed" over those moves. For example a value | ||
| 552 | of 10 says use the "factor" extra time on the first non-book move, then | ||
| 553 | 9/10 of that extra time on the next move, 8/10 on the next move, until | ||
| 554 | after 10 moves out of book, where this is turned off. | ||
| 555 | |||
| 556 | timebook 100 10 therefore says use 200% of the normal time target for | ||
| 557 | the first move out of book, 190% for the next move out of book, until | ||
| 558 | it drops back to 100% where it will stick for the remainder of the | ||
| 559 | game after the first ten non-book move searches have been completed. | ||
| 560 | <end> | ||
| 561 | |||
| 562 | <tournament> | ||
| 563 | playing in a manually-operated tournament | ||
| 564 | |||
| 565 | 1. Starting Crafty. This is the easiest part of the whole process. | ||
| 566 | All that's needed is to simply type the command "crafty". | ||
| 567 | |||
| 568 | 2. display. This command displays the chess board using the standard | ||
| 569 | chess server style#1 board display. | ||
| 570 | |||
| 571 | This is most often used to confirm that the board has been set to the | ||
| 572 | proper position in the event that you can't continue an old game and | ||
| 573 | have to set up the position from scratch (explained later). Note that | ||
| 574 | white is always at the bottom, regardless of whether Crafty is playing | ||
| 575 | black or white. | ||
| 576 | |||
| 577 | 3. read. This command is used to read in a list of moves and make them | ||
| 578 | on the game board prior to using crafty to play that game. There are | ||
| 579 | two ways this can be used: (a) read. This will prompt you for a | ||
| 580 | white move, a black move, over and over until you type "exit" to terminate | ||
| 581 | read mode. The side to move will be set according to the number of moves | ||
| 582 | entered, so that the next move will be for the correct side. (b) read file. | ||
| 583 | This command reads, but the input comes from "file" rather than from the | ||
| 584 | keyboard. Note that superfluous text is ignored, as is line numbers, times, | ||
| 585 | etc. This will read in a PGN game and cull everything but the moves. | ||
| 586 | |||
| 587 | 4. setboard. This command is used to set up a specific board position | ||
| 588 | when it's impossible to restart a game using the "crafty c" command, and | ||
| 589 | too many moves have been made, making the read command an unattractive | ||
| 590 | alternative. This command parses a FEN-like position description (a | ||
| 591 | Forsythe-like notation) and sets the current board to that position. | ||
| 592 | |||
| 593 | The notation uses a string of alpha characters to represent the chess | ||
| 594 | position. In this notation, uppercase K Q R B N P represents a white | ||
| 595 | piece, lowercase k q r b n p represents a black piece. for empty | ||
| 596 | squares, you can use numbers 1-8 to indicate consecutive empty squares. | ||
| 597 | A "/" must terminate each rank after defining at most 8 square on that | ||
| 598 | rank, and the ranks are entered in descending order 8..1. In this | ||
| 599 | notation, then, the first square you enter is a8, then b8, .., h8, | ||
| 600 | followed by a "/", then back to a7 and repeating. After all 8 ranks | ||
| 601 | are entered, you need to indicate whether or not one side can castle | ||
| 602 | kingside or queenside by inserting at least one space character, followed | ||
| 603 | by a K (white can castle kingside) Q (white can castle queenside) k (black | ||
| 604 | can castle kingside) or Q (black can castle queenside). After this, add | ||
| 605 | one more space, followed by the square of a pawn that just moved two ranks | ||
| 606 | and is subject to an en passant capture. Note that if there is no | ||
| 607 | en passant capture possible, you do not enter this field. | ||
| 608 | |||
| 609 | For the above board position (display command), here's the setboard | ||
| 610 | command to set that position up: | ||
| 611 | |||
| 612 | setboard r2q1knr/pp2bppp/4b3/1BPp4/6PP/2N1P3/PP3P2/2RQK1NR/ K | ||
| 613 | |||
| 614 | Note that after entering the last piece on a rank, a number for the | ||
| 615 | remaining empty squares is *not* needed, so this could be shortened | ||
| 616 | to: | ||
| 617 | |||
| 618 | setboard r2q1knr/pp2bppp/4b/1BPp/6PP/2N1P/PP3P/2RQK1NR/ K | ||
| 619 | |||
| 620 | One unfortunate effect of this command is that you have just lost the | ||
| 621 | ability to detect repetitions of prior positions in the game, which can | ||
| 622 | be a critical issue. It is _always_ better to use the read command to | ||
| 623 | re-enter the moves if the hardware crashes. If you accidentally type | ||
| 624 | ^C and terminate Crafty, you can type "crafty c" and it will continue | ||
| 625 | the last game, although you will need to set the time control information, | ||
| 626 | and anything else that is not in the .craftyrc file. | ||
| 627 | |||
| 628 | 5. reset <n>. This command is used to back the game up if a different | ||
| 629 | move is to be tried, or if an incorrect move was entered by mistake. It | ||
| 630 | depends on the current side to move, and the command "reset 13" will back | ||
| 631 | the game up to move 13, where the current side on move is still on move, | ||
| 632 | and Crafty will be positioned to read in move 13 for that side. Note | ||
| 633 | that this affects the game, but not the clock or time or level, so that if | ||
| 634 | you back up more than a move or two, you also need to adjust the clock. | ||
| 635 | |||
| 636 | If you want to first change the side to move, use the "white" or "black" | ||
| 637 | command to set the side to move, then use the reset command to back up | ||
| 638 | to the move for that side. | ||
| 639 | |||
| 640 | 6. time. This command is used to set the time control. There are | ||
| 641 | several ways to use it, depending on the type of time control desired. | ||
| 642 | (a) time sd/n sets the game to sudden-death in n minutes. such as | ||
| 643 | game/10, game/30. time sd/30 would set game in 30 time control. | ||
| 644 | (b) time moves/time smoves/stime sets the game to "moves" in "time" | ||
| 645 | minutes, then "smoves" in "stime" minutes. A common setting is | ||
| 646 | time 40/120/20/60 for 40 moves in 2 hours, then 20 moves in one hour. | ||
| 647 | (c) time moves/time/sd/sdtime sets a standard first time control, | ||
| 648 | followed by a sudden death time control. For example time 60/60/sd/30 | ||
| 649 | is 60 moves in 60 minutes followed by game in 30 minutes. (d) for any | ||
| 650 | of these, an optional 5th parameter can be added, which is the famous | ||
| 651 | "Fischer clock" increment that is added to each players time remaining | ||
| 652 | after he makes a move. The increment is given in seconds rather than | ||
| 653 | minutes. Note that the default should be right unless the tournament | ||
| 654 | modifies the T/C after the tournament starts for some reason. | ||
| 655 | |||
| 656 | 7. settc. This command is used to correct time-control info after a | ||
| 657 | restart. it will prompt you for how much time is left on both Crafty's | ||
| 658 | and the opponent's clock, and for how many more moves until crafty makes | ||
| 659 | the next time control. Again, usually not needed, but there for serious | ||
| 660 | circumstances. After restarting, type "clock" to display this info and | ||
| 661 | if it's wrong in any way, this settc command is the quickest way to fix | ||
| 662 | it up. | ||
| 663 | |||
| 664 | 8. clock. This command is used to adjust the internal clock time as it | ||
| 665 | drifts away from the real chess clock as a game progresses. The format | ||
| 666 | is simply "clock mins" to adjust Crafty's clock. Or "clock cmins omins" | ||
| 667 | to adjust both Crafty's time and Crafty's internal time that the opponent | ||
| 668 | has left. Since the current version doesn't really need the opponent's | ||
| 669 | clock time, it can be ignored with no side-effects. | ||
| 670 | |||
| 671 | Common problems and how to solve them: | ||
| 672 | |||
| 673 | 1. Is crafty searching or pondering? I was not watching the screen, | ||
| 674 | and the window size is small enough that all I see is analysis scrolling | ||
| 675 | up the screen. This is easy. Look at the bottom line on the screen, and | ||
| 676 | you will see a line that keeps changing, showing the depth, time used so | ||
| 677 | far, how many moves have been searched and the PV. Look at the third | ||
| 678 | column what shows something like 12/30, which says that at the current | ||
| 679 | depth crafty has already searched 12 of the 30 legal moves at the root. | ||
| 680 | You will notice that there is an extra character after the 30, either a | ||
| 681 | "*" or "?". If an "*" is showing, Crafty is thinking about its move. If | ||
| 682 | a "?" is showing, crafty is pondering and thinks it is the opponent's move. | ||
| 683 | |||
| 684 | If it shows a "?" but you know it is Crafty's move, you simply missed it. | ||
| 685 | Scroll back up using whatever scroll mechanism your text window uses, to | ||
| 686 | find the move Crafty made. Hopefully this won't happen often, but on the | ||
| 687 | occasional "emergency" men's room break, anything can happen. Just remember | ||
| 688 | that "?" means I am pondering and it is my opponent's move, "*" means I | ||
| 689 | am searching and it is my move. | ||
| 690 | |||
| 691 | 2. I entered the wrong move, how do I fix this? You are playing in a | ||
| 692 | game and at move 37, you enter Rfe1 rather than Rae1. To correct this, | ||
| 693 | you have to do a couple of things. First, Crafty is now searching, and | ||
| 694 | if you try to reset the position, it won't accept this command. To stop | ||
| 695 | the search, type ? (followed by a <RETURN> of course) to tell Crafty to | ||
| 696 | "move now". Once it displays the move it would play in response to the | ||
| 697 | incorrect move, it will start its "ponder search" but now the reset | ||
| 698 | command will work. Simply type "r 37" to back up to move 37, then type | ||
| 699 | Rae1 and Crafty will continue as though nothing happened. Pay attention | ||
| 700 | to the clock time after it moves and adjust if necessary (if you lost any | ||
| 701 | time while correcting an incorrect move.) | ||
| 702 | |||
| 703 | Note: You can also use the "remove" command, which will unmake the last | ||
| 704 | move by each side. Crafty has to be pondering or waiting on input for | ||
| 705 | this to work, just like the reset command, so if *you* typed the wrong | ||
| 706 | move, type "?" to make it move, then "remove" which backs up one move | ||
| 707 | for each side, followed by the opponent's move. If the opponent makes | ||
| 708 | the wrong move on the board, and you enter it, do this same thing. Note, | ||
| 709 | if the opponent screws up, you should notice whether or not crafty had | ||
| 710 | predicted the right move. If it had, you should probably call the TD | ||
| 711 | over, back the game up one move with the remove command, then use the | ||
| 712 | "ponder xxx" command to tell crafty to ponder "xxx" (the move it was | ||
| 713 | pondering before the wrong move was made by the opponent) and then it | ||
| 714 | should be allowed to "sit" until the same amount of time elapses before | ||
| 715 | you enter the correct move. The idea is that if the opponent screws up, | ||
| 716 | it should not wipe out any searching crafty did while waiting. | ||
| 717 | |||
| 718 | 3. The machine dies (power failure maybe). How do I recover? First, you | ||
| 719 | can stop the clock for such failures, so do that *first*. Then, reboot the | ||
| 720 | machine and start crafty by typing "crafty c". Next, type the "history" | ||
| 721 | command and carefully check the last move it displays against the score | ||
| 722 | sheet you are maintaining by hand. If they are the same, you are ready to | ||
| 723 | enter a move and continue. If there are moves missing, use the "reada" | ||
| 724 | command to re-enter these moves and append them to the moves already | ||
| 725 | present. | ||
| 726 | |||
| 727 | If the continue option won't work due to a corrupted history file, you have | ||
| 728 | two choices. The best choice is to restart crafty without the "c" option, | ||
| 729 | and then use the "read" command and enter the moves by hand so that if you | ||
| 730 | screw up later, the "reset" command will work correctly to let you back up. | ||
| 731 | If you are 100 moves into a game, this might not be practical. In this | ||
| 732 | case, use the "setboard" command to enter the position. Be careful to | ||
| 733 | check the position after entry using the display command, and be careful | ||
| 734 | to not enter the wrong move since you can't use the "reset" command to | ||
| 735 | back up after using the setboard command. | ||
| 736 | |||
| 737 | After either of the above problems, you need to set the proper time | ||
| 738 | control (if this is in your .craftyrc this is not needed) and then you | ||
| 739 | need to adjust the clock to show the proper amount of time remaining. | ||
| 740 | The command to display the clock is "clock". To adjust the clock | ||
| 741 | use the command form "clock c-time o-time" where c-time is Crafty's | ||
| 742 | time remaining, and o-time is the opponent's time remaining. These | ||
| 743 | can be entered as simply the number of minutes left, or in the hh:mm | ||
| 744 | format if preferred. "clock 60 50" sets Crafty's clock to 60 minutes | ||
| 745 | left, opponent's clock to 50 minutes left. "clock 1:15 45" sets | ||
| 746 | Crafty's clock to 75 minutes remaining, opponent's clock to 45. | ||
| 747 | Crafty pays attention to how much time the opponent has used, | ||
| 748 | so be sure and get them both correct. You should subtract 5 minutes | ||
| 749 | from the actual time left on the clock to give yourself a cushion. Of | ||
| 750 | course, you should *never* enter "0" time left, or even worse, a negative | ||
| 751 | number, because Crafty will go south for the Winter if you do. :) | ||
| 752 | |||
| 753 | Note that there is a "settc" command that simplifies getting the time | ||
| 754 | control right after a restart... It's explained above. | ||
| 755 | <end> |