| 1 | @cindex quit |
| 2 | @item quit: Quit |
| 3 | @verbatim |
| 4 | Arguments: none |
| 5 | Fails: never |
| 6 | Returns: nothing |
| 7 | |
| 8 | Status: GTP version 2 standard command. |
| 9 | @end verbatim |
| 10 | @cindex protocol_version |
| 11 | @item protocol_version: Report protocol version. |
| 12 | @verbatim |
| 13 | Arguments: none |
| 14 | Fails: never |
| 15 | Returns: protocol version number |
| 16 | |
| 17 | Status: GTP version 2 standard command. |
| 18 | @end verbatim |
| 19 | @cindex name |
| 20 | @item name: Report the name of the program. |
| 21 | @verbatim |
| 22 | Arguments: none |
| 23 | Fails: never |
| 24 | Returns: program name |
| 25 | |
| 26 | Status: GTP version 2 standard command. |
| 27 | @end verbatim |
| 28 | @cindex version |
| 29 | @item version: Report the version number of the program. |
| 30 | @verbatim |
| 31 | Arguments: none |
| 32 | Fails: never |
| 33 | Returns: version number |
| 34 | |
| 35 | Status: GTP version 2 standard command. |
| 36 | @end verbatim |
| 37 | @cindex boardsize |
| 38 | @item boardsize: Set the board size to NxN and clear the board. |
| 39 | @verbatim |
| 40 | Arguments: integer |
| 41 | Fails: board size outside engine's limits |
| 42 | Returns: nothing |
| 43 | |
| 44 | Status: GTP version 2 standard command. |
| 45 | @end verbatim |
| 46 | @cindex query_boardsize |
| 47 | @item query_boardsize: Find the current boardsize |
| 48 | @verbatim |
| 49 | Arguments: none |
| 50 | Fails: never |
| 51 | Returns: board_size |
| 52 | @end verbatim |
| 53 | @cindex clear_board |
| 54 | @item clear_board: Clear the board. |
| 55 | @verbatim |
| 56 | Arguments: none |
| 57 | Fails: never |
| 58 | Returns: nothing |
| 59 | |
| 60 | Status: GTP version 2 standard command. |
| 61 | @end verbatim |
| 62 | @cindex orientation |
| 63 | @item orientation: Set the orienation to N and clear the board |
| 64 | @verbatim |
| 65 | Arguments: integer |
| 66 | Fails: illegal orientation |
| 67 | Returns: nothing |
| 68 | @end verbatim |
| 69 | @cindex query_orientation |
| 70 | @item query_orientation: Find the current orientation |
| 71 | @verbatim |
| 72 | Arguments: none |
| 73 | Fails: never |
| 74 | Returns: orientation |
| 75 | @end verbatim |
| 76 | @cindex komi |
| 77 | @item komi: Set the komi. |
| 78 | @verbatim |
| 79 | Arguments: float |
| 80 | Fails: incorrect argument |
| 81 | Returns: nothing |
| 82 | |
| 83 | Status: GTP version 2 standard command. |
| 84 | @end verbatim |
| 85 | @cindex get_komi |
| 86 | @item get_komi: Get the komi |
| 87 | @verbatim |
| 88 | Arguments: none |
| 89 | Fails: never |
| 90 | Returns: Komi |
| 91 | @end verbatim |
| 92 | @cindex black |
| 93 | @item black: Play a black stone at the given vertex. |
| 94 | @verbatim |
| 95 | Arguments: vertex |
| 96 | Fails: invalid vertex, illegal move |
| 97 | Returns: nothing |
| 98 | |
| 99 | Status: Obsolete GTP version 1 command. |
| 100 | @end verbatim |
| 101 | @cindex playwhite |
| 102 | @item playwhite: Play a white stone at the given vertex. |
| 103 | @verbatim |
| 104 | Arguments: vertex |
| 105 | Fails: invalid vertex, illegal move |
| 106 | Returns: nothing |
| 107 | |
| 108 | Status: Obsolete GTP version 1 command. |
| 109 | @end verbatim |
| 110 | @cindex play |
| 111 | @item play: Play a stone of the given color at the given vertex. |
| 112 | @verbatim |
| 113 | Arguments: color, vertex |
| 114 | Fails: invalid vertex, illegal move |
| 115 | Returns: nothing |
| 116 | |
| 117 | Status: GTP version 2 standard command. |
| 118 | @end verbatim |
| 119 | @cindex fixed_handicap |
| 120 | @item fixed_handicap: Set up fixed placement handicap stones. |
| 121 | @verbatim |
| 122 | Arguments: number of handicap stones |
| 123 | Fails: invalid number of stones for the current boardsize |
| 124 | Returns: list of vertices with handicap stones |
| 125 | |
| 126 | Status: GTP version 2 standard command. |
| 127 | @end verbatim |
| 128 | @cindex place_free_handicap |
| 129 | @item place_free_handicap: Choose free placement handicap stones and put them on the board. |
| 130 | @verbatim |
| 131 | Arguments: number of handicap stones |
| 132 | Fails: invalid number of stones |
| 133 | Returns: list of vertices with handicap stones |
| 134 | |
| 135 | Status: GTP version 2 standard command. |
| 136 | @end verbatim |
| 137 | @cindex set_free_handicap |
| 138 | @item set_free_handicap: Put free placement handicap stones on the board. |
| 139 | @verbatim |
| 140 | Arguments: list of vertices with handicap stones |
| 141 | Fails: board not empty, bad list of vertices |
| 142 | Returns: nothing |
| 143 | |
| 144 | Status: GTP version 2 standard command. |
| 145 | @end verbatim |
| 146 | @cindex get_handicap |
| 147 | @item get_handicap: Get the handicap |
| 148 | @verbatim |
| 149 | Arguments: none |
| 150 | Fails: never |
| 151 | Returns: handicap |
| 152 | @end verbatim |
| 153 | @cindex loadsgf |
| 154 | @item loadsgf: Load an sgf file, possibly up to a move number or the first occurence of a move. |
| 155 | @verbatim |
| 156 | Arguments: filename + move number, vertex, or nothing |
| 157 | Fails: missing filename or failure to open or parse file |
| 158 | Returns: color to play |
| 159 | |
| 160 | Status: GTP version 2 standard command. |
| 161 | @end verbatim |
| 162 | @cindex color |
| 163 | @item color: Return the color at a vertex. |
| 164 | @verbatim |
| 165 | Arguments: vertex |
| 166 | Fails: invalid vertex |
| 167 | Returns: "black", "white", or "empty" |
| 168 | @end verbatim |
| 169 | @cindex list_stones |
| 170 | @item list_stones: List vertices with either black or white stones. |
| 171 | @verbatim |
| 172 | Arguments: color |
| 173 | Fails: invalid color |
| 174 | Returns: list of vertices |
| 175 | @end verbatim |
| 176 | @cindex countlib |
| 177 | @item countlib: Count number of liberties for the string at a vertex. |
| 178 | @verbatim |
| 179 | Arguments: vertex |
| 180 | Fails: invalid vertex, empty vertex |
| 181 | Returns: Number of liberties. |
| 182 | @end verbatim |
| 183 | @cindex findlib |
| 184 | @item findlib: Return the positions of the liberties for the string at a vertex. |
| 185 | @verbatim |
| 186 | Arguments: vertex |
| 187 | Fails: invalid vertex, empty vertex |
| 188 | Returns: Sorted space separated list of vertices. |
| 189 | @end verbatim |
| 190 | @cindex accuratelib |
| 191 | @item accuratelib: Determine which liberties a stone of given color will get if played at given vertex. |
| 192 | @verbatim |
| 193 | Arguments: move (color + vertex) |
| 194 | Fails: invalid color, invalid vertex, occupied vertex |
| 195 | Returns: Sorted space separated list of liberties |
| 196 | @end verbatim |
| 197 | @cindex accurate_approxlib |
| 198 | @item accurate_approxlib: Determine which liberties a stone of given color will get if played at given vertex. |
| 199 | @verbatim |
| 200 | Arguments: move (color + vertex) |
| 201 | Fails: invalid color, invalid vertex, occupied vertex |
| 202 | Returns: Sorted space separated list of liberties |
| 203 | |
| 204 | Supposedly identical in behavior to the above function and |
| 205 | can be retired when this is confirmed. |
| 206 | @end verbatim |
| 207 | @cindex is_legal |
| 208 | @item is_legal: Tell whether a move is legal. |
| 209 | @verbatim |
| 210 | Arguments: move |
| 211 | Fails: invalid move |
| 212 | Returns: 1 if the move is legal, 0 if it is not. |
| 213 | @end verbatim |
| 214 | @cindex all_legal |
| 215 | @item all_legal: List all legal moves for either color. |
| 216 | @verbatim |
| 217 | Arguments: color |
| 218 | Fails: invalid color |
| 219 | Returns: Sorted space separated list of vertices. |
| 220 | @end verbatim |
| 221 | @cindex captures |
| 222 | @item captures: List the number of captures taken by either color. |
| 223 | @verbatim |
| 224 | Arguments: color |
| 225 | Fails: invalid color |
| 226 | Returns: Number of captures. |
| 227 | @end verbatim |
| 228 | @cindex last_move |
| 229 | @item last_move: Return the last move. |
| 230 | @verbatim |
| 231 | Arguments: none |
| 232 | Fails: no previous move known |
| 233 | Returns: Color and vertex of last move. |
| 234 | @end verbatim |
| 235 | @cindex move_history |
| 236 | @item move_history: Print the move history in reverse order |
| 237 | @verbatim |
| 238 | Arguments: none |
| 239 | Fails: never |
| 240 | Returns: List of moves played in reverse order in format: |
| 241 | color move (one move per line) |
| 242 | @end verbatim |
| 243 | @cindex invariant_hash |
| 244 | @item invariant_hash: Return the rotation/reflection invariant board hash. |
| 245 | @verbatim |
| 246 | Arguments: none |
| 247 | Fails: never |
| 248 | Returns: Invariant hash for the board as a hexadecimal number. |
| 249 | @end verbatim |
| 250 | @cindex invariant_hash_for_moves |
| 251 | @item invariant_hash_for_moves: Return the rotation/reflection invariant board hash obtained by playing all the possible moves for the |
| 252 | given color. |
| 253 | @verbatim |
| 254 | Arguments: color |
| 255 | Fails: invalid color |
| 256 | Returns: List of moves + invariant hash as a hexadecimal number, |
| 257 | one pair of move + hash per line. |
| 258 | @end verbatim |
| 259 | @cindex trymove |
| 260 | @item trymove: Play a stone of the given color at the given vertex. |
| 261 | @verbatim |
| 262 | Arguments: move (color + vertex) |
| 263 | Fails: invalid color, invalid vertex, illegal move |
| 264 | Returns: nothing |
| 265 | @end verbatim |
| 266 | @cindex tryko |
| 267 | @item tryko: Play a stone of the given color at the given vertex, allowing illegal ko capture. |
| 268 | @verbatim |
| 269 | Arguments: move (color + vertex) |
| 270 | Fails: invalid color, invalid vertex, illegal move |
| 271 | Returns: nothing |
| 272 | @end verbatim |
| 273 | @cindex popgo |
| 274 | @item popgo: Undo a trymove or tryko. |
| 275 | @verbatim |
| 276 | Arguments: none |
| 277 | Fails: stack empty |
| 278 | Returns: nothing |
| 279 | @end verbatim |
| 280 | |
| 281 | @cindex clear_cache |
| 282 | @item clear_cache: clear the caches. |
| 283 | @verbatim |
| 284 | Arguments: none. |
| 285 | Fails: never. |
| 286 | Returns: nothing. |
| 287 | @end verbatim |
| 288 | @cindex attack |
| 289 | @item attack: Try to attack a string. |
| 290 | @verbatim |
| 291 | Arguments: vertex |
| 292 | Fails: invalid vertex, empty vertex |
| 293 | Returns: attack code followed by attack point if attack code nonzero. |
| 294 | @end verbatim |
| 295 | @cindex attack_either |
| 296 | @item attack_either: Try to attack either of two strings |
| 297 | @verbatim |
| 298 | Arguments: two vertices |
| 299 | Fails: invalid vertex, empty vertex |
| 300 | Returns: attack code against the strings. Guarantees there |
| 301 | exists a move which will attack one of the two |
| 302 | with attack_code, but does not return the move. |
| 303 | @end verbatim |
| 304 | @cindex defend |
| 305 | @item defend: Try to defend a string. |
| 306 | @verbatim |
| 307 | Arguments: vertex |
| 308 | Fails: invalid vertex, empty vertex |
| 309 | Returns: defense code followed by defense point if defense code nonzero. |
| 310 | @end verbatim |
| 311 | @cindex does_attack |
| 312 | @item does_attack: Examine whether a specific move attacks a string tactically. |
| 313 | @verbatim |
| 314 | Arguments: vertex (move), vertex (dragon) |
| 315 | Fails: invalid vertex, empty vertex |
| 316 | Returns: attack code |
| 317 | @end verbatim |
| 318 | @cindex does_defend |
| 319 | @item does_defend: Examine whether a specific move defends a string tactically. |
| 320 | @verbatim |
| 321 | Arguments: vertex (move), vertex (dragon) |
| 322 | Fails: invalid vertex, empty vertex |
| 323 | Returns: attack code |
| 324 | @end verbatim |
| 325 | @cindex ladder_attack |
| 326 | @item ladder_attack: Try to attack a string strictly in a ladder. |
| 327 | @verbatim |
| 328 | Arguments: vertex |
| 329 | Fails: invalid vertex, empty vertex |
| 330 | Returns: attack code followed by attack point if attack code nonzero. |
| 331 | @end verbatim |
| 332 | @cindex increase_depths |
| 333 | @item increase_depths: Increase depth values by one. |
| 334 | @verbatim |
| 335 | Arguments: none |
| 336 | Fails: never |
| 337 | Returns: nothing |
| 338 | @end verbatim |
| 339 | @cindex decrease_depths |
| 340 | @item decrease_depths: Decrease depth values by one. |
| 341 | @verbatim |
| 342 | Arguments: none |
| 343 | Fails: never |
| 344 | Returns: nothing |
| 345 | @end verbatim |
| 346 | @cindex owl_attack |
| 347 | @item owl_attack: Try to attack a dragon. |
| 348 | @verbatim |
| 349 | Arguments: vertex |
| 350 | Fails: invalid vertex, empty vertex |
| 351 | Returns: attack code followed by attack point if attack code nonzero. |
| 352 | @end verbatim |
| 353 | @cindex owl_defend |
| 354 | @item owl_defend: Try to defend a dragon. |
| 355 | @verbatim |
| 356 | Arguments: vertex |
| 357 | Fails: invalid vertex, empty vertex |
| 358 | Returns: defense code followed by defense point if defense code nonzero. |
| 359 | @end verbatim |
| 360 | @cindex owl_threaten_attack |
| 361 | @item owl_threaten_attack: Try to attack a dragon in 2 moves. |
| 362 | @verbatim |
| 363 | Arguments: vertex |
| 364 | Fails: invalid vertex, empty vertex |
| 365 | Returns: attack code followed by the two attack points if |
| 366 | attack code nonzero. |
| 367 | @end verbatim |
| 368 | @cindex owl_threaten_defense |
| 369 | @item owl_threaten_defense: Try to defend a dragon with 2 moves. |
| 370 | @verbatim |
| 371 | Arguments: vertex |
| 372 | Fails: invalid vertex, empty vertex |
| 373 | Returns: defense code followed by the 2 defense points if |
| 374 | defense code nonzero. |
| 375 | @end verbatim |
| 376 | @cindex owl_does_attack |
| 377 | @item owl_does_attack: Examine whether a specific move attacks a dragon. |
| 378 | @verbatim |
| 379 | Arguments: vertex (move), vertex (dragon) |
| 380 | Fails: invalid vertex, empty vertex |
| 381 | Returns: attack code |
| 382 | @end verbatim |
| 383 | @cindex owl_does_defend |
| 384 | @item owl_does_defend: Examine whether a specific move defends a dragon. |
| 385 | @verbatim |
| 386 | Arguments: vertex (move), vertex (dragon) |
| 387 | Fails: invalid vertex, empty vertex |
| 388 | Returns: defense code |
| 389 | @end verbatim |
| 390 | @cindex owl_connection_defends |
| 391 | @item owl_connection_defends: Examine whether a connection defends involved dragons. |
| 392 | @verbatim |
| 393 | Arguments: vertex (move), vertex (dragon1), vertex (dragon2) |
| 394 | Fails: invalid vertex, empty vertex |
| 395 | Returns: defense code |
| 396 | @end verbatim |
| 397 | @cindex defend_both |
| 398 | @item defend_both: Try to defend both of two strings |
| 399 | @verbatim |
| 400 | Arguments: two vertices |
| 401 | Fails: invalid vertex, empty vertex |
| 402 | Returns: defend code for the strings. Guarantees there |
| 403 | exists a move which will defend both of the two |
| 404 | with defend_code, but does not return the move. |
| 405 | @end verbatim |
| 406 | @cindex owl_substantial |
| 407 | @item owl_substantial: Determine whether capturing a string gives a living dragon |
| 408 | @verbatim |
| 409 | Arguments: vertex |
| 410 | Fails: invalid vertex, empty vertex |
| 411 | Returns: 1 if dragon can live, 0 otherwise |
| 412 | @end verbatim |
| 413 | @cindex analyze_semeai |
| 414 | @item analyze_semeai: Analyze a semeai |
| 415 | @verbatim |
| 416 | Arguments: dragona, dragonb |
| 417 | Fails: invalid vertices, empty vertices |
| 418 | Returns: semeai defense result, semeai attack result, semeai move |
| 419 | @end verbatim |
| 420 | @cindex analyze_semeai_after_move |
| 421 | @item analyze_semeai_after_move: Analyze a semeai after a move have been made. |
| 422 | @verbatim |
| 423 | Arguments: color, vertex, dragona, dragonb |
| 424 | Fails: invalid vertices |
| 425 | Returns: semeai defense result, semeai attack result, semeai move |
| 426 | @end verbatim |
| 427 | @cindex tactical_analyze_semeai |
| 428 | @item tactical_analyze_semeai: Analyze a semeai, not using owl |
| 429 | @verbatim |
| 430 | Arguments: dragona, dragonb |
| 431 | Fails: invalid vertices, empty vertices |
| 432 | Returns: status of dragona, dragonb assuming dragona moves first |
| 433 | @end verbatim |
| 434 | @cindex connect |
| 435 | @item connect: Try to connect two strings. |
| 436 | @verbatim |
| 437 | Arguments: vertex, vertex |
| 438 | Fails: invalid vertex, empty vertex, vertices of different colors |
| 439 | Returns: connect result followed by connect point if successful. |
| 440 | @end verbatim |
| 441 | @cindex disconnect |
| 442 | @item disconnect: Try to disconnect two strings. |
| 443 | @verbatim |
| 444 | Arguments: vertex, vertex |
| 445 | Fails: invalid vertex, empty vertex, vertices of different colors |
| 446 | Returns: disconnect result followed by disconnect point if successful. |
| 447 | @end verbatim |
| 448 | @cindex break_in |
| 449 | @item break_in: Try to break from string into area. |
| 450 | @verbatim |
| 451 | Arguments: vertex, vertices |
| 452 | Fails: invalid vertex, empty vertex. |
| 453 | Returns: result followed by break in point if successful. |
| 454 | @end verbatim |
| 455 | @cindex block_off |
| 456 | @item block_off: Try to block string from area. |
| 457 | @verbatim |
| 458 | Arguments: vertex, vertices |
| 459 | Fails: invalid vertex, empty vertex. |
| 460 | Returns: result followed by block point if successful. |
| 461 | @end verbatim |
| 462 | |
| 463 | @cindex eval_eye |
| 464 | @item eval_eye: Evaluate an eye space |
| 465 | @verbatim |
| 466 | Arguments: vertex |
| 467 | Fails: invalid vertex |
| 468 | Returns: Minimum and maximum number of eyes. If these differ an |
| 469 | attack and a defense point are additionally returned. |
| 470 | If the vertex is not an eye space or not of unique color, |
| 471 | a single -1 is returned. |
| 472 | @end verbatim |
| 473 | |
| 474 | @cindex dragon_status |
| 475 | @item dragon_status: Determine status of a dragon. |
| 476 | @verbatim |
| 477 | Arguments: optional vertex |
| 478 | Fails: invalid vertex, empty vertex |
| 479 | Returns: status ("alive", "critical", "dead", or "unknown"), |
| 480 | attack point, defense point. Points of attack and |
| 481 | defense are only given if the status is critical. |
| 482 | If no vertex is given, the status is listed for all |
| 483 | dragons, one per row in the format "A4: alive". |
| 484 | |
| 485 | FIXME: Should be able to distinguish between life in seki |
| 486 | and independent life. Should also be able to identify ko. |
| 487 | @end verbatim |
| 488 | |
| 489 | @cindex same_dragon |
| 490 | @item same_dragon: Determine whether two stones belong to the same dragon. |
| 491 | @verbatim |
| 492 | Arguments: vertex, vertex |
| 493 | Fails: invalid vertex, empty vertex |
| 494 | Returns: 1 if the vertices belong to the same dragon, 0 otherwise |
| 495 | @end verbatim |
| 496 | |
| 497 | @cindex unconditional_status |
| 498 | @item unconditional_status: Determine the unconditional status of a vertex. |
| 499 | @verbatim |
| 500 | Arguments: vertex |
| 501 | Fails: invalid vertex |
| 502 | Returns: unconditional status ("undecided", "alive", "dead", |
| 503 | "white_territory", "black_territory"). Occupied vertices can |
| 504 | be undecided, alive, or dead. Empty vertices can be |
| 505 | undecided, white territory, or black territory. |
| 506 | @end verbatim |
| 507 | |
| 508 | @cindex combination_attack |
| 509 | @item combination_attack: Find a move by color capturing something through a combination attack. |
| 510 | @verbatim |
| 511 | Arguments: color |
| 512 | Fails: invalid color |
| 513 | Returns: Recommended move, PASS if no move found |
| 514 | @end verbatim |
| 515 | |
| 516 | @cindex combination_defend |
| 517 | @item combination_defend: If color can capture something through a combination attack, list moves by the opponent of color |
| 518 | to defend against this attack. |
| 519 | @verbatim |
| 520 | Arguments: color |
| 521 | Fails: invalid color |
| 522 | Returns: Recommended moves, PASS if no combination attack found. |
| 523 | @end verbatim |
| 524 | |
| 525 | @cindex aa_confirm_safety |
| 526 | @item aa_confirm_safety: Run atari_atari_confirm_safety(). |
| 527 | @verbatim |
| 528 | Arguments: move, optional int |
| 529 | Fails: invalid move |
| 530 | Returns: success code, if failure also defending move |
| 531 | @end verbatim |
| 532 | @cindex genmove_black |
| 533 | @item genmove_black: Generate and play the supposedly best black move. |
| 534 | @verbatim |
| 535 | Arguments: none |
| 536 | Fails: never |
| 537 | Returns: a move coordinate or "PASS" |
| 538 | |
| 539 | Status: Obsolete GTP version 1 command. |
| 540 | @end verbatim |
| 541 | @cindex genmove_white |
| 542 | @item genmove_white: Generate and play the supposedly best white move. |
| 543 | @verbatim |
| 544 | Arguments: none |
| 545 | Fails: never |
| 546 | Returns: a move coordinate or "PASS" |
| 547 | |
| 548 | Status: Obsolete GTP version 1 command. |
| 549 | @end verbatim |
| 550 | @cindex genmove |
| 551 | @item genmove: Generate and play the supposedly best move for either color. |
| 552 | @verbatim |
| 553 | Arguments: color to move |
| 554 | Fails: invalid color |
| 555 | Returns: a move coordinate or "PASS" (or "resign" if resignation_allowed) |
| 556 | |
| 557 | Status: GTP version 2 standard command. |
| 558 | @end verbatim |
| 559 | @cindex reg_genmove |
| 560 | @item reg_genmove: Generate the supposedly best move for either color. |
| 561 | @verbatim |
| 562 | Arguments: color to move |
| 563 | Fails: invalid color |
| 564 | Returns: a move coordinate (or "PASS") |
| 565 | |
| 566 | Status: GTP version 2 standard command. |
| 567 | @end verbatim |
| 568 | @cindex gg_genmove |
| 569 | @item gg_genmove: Generate the supposedly best move for either color. |
| 570 | @verbatim |
| 571 | Arguments: color to move, optionally a random seed |
| 572 | Fails: invalid color |
| 573 | Returns: a move coordinate (or "PASS") |
| 574 | |
| 575 | This differs from reg_genmove in the optional random seed. |
| 576 | @end verbatim |
| 577 | @cindex restricted_genmove |
| 578 | @item restricted_genmove: Generate the supposedly best move for either color from a choice of allowed vertices. |
| 579 | @verbatim |
| 580 | Arguments: color to move, allowed vertices |
| 581 | Fails: invalid color, invalid vertex, no vertex listed |
| 582 | Returns: a move coordinate (or "PASS") |
| 583 | @end verbatim |
| 584 | @cindex kgs-genmove_cleanup |
| 585 | @item kgs-genmove_cleanup: Generate and play the supposedly best move for either color, not passing until all dead opponent stones have been removed. |
| 586 | @verbatim |
| 587 | Arguments: color to move |
| 588 | Fails: invalid color |
| 589 | Returns: a move coordinate (or "PASS") |
| 590 | |
| 591 | Status: KGS specific command. |
| 592 | |
| 593 | A similar command, but possibly somewhat different, will likely be added |
| 594 | to GTP version 3 at a later time. |
| 595 | @end verbatim |
| 596 | @cindex level |
| 597 | @item level: Set the playing level. |
| 598 | @verbatim |
| 599 | Arguments: int |
| 600 | Fails: incorrect argument |
| 601 | Returns: nothing |
| 602 | @end verbatim |
| 603 | |
| 604 | @cindex undo |
| 605 | @item undo: Undo one move |
| 606 | @verbatim |
| 607 | Arguments: none |
| 608 | Fails: If move history is too short. |
| 609 | Returns: nothing |
| 610 | |
| 611 | Status: GTP version 2 standard command. |
| 612 | @end verbatim |
| 613 | |
| 614 | @cindex gg-undo |
| 615 | @item gg-undo: Undo a number of moves |
| 616 | @verbatim |
| 617 | Arguments: optional int |
| 618 | Fails: If move history is too short. |
| 619 | Returns: nothing |
| 620 | @end verbatim |
| 621 | |
| 622 | @cindex time_settings |
| 623 | @item time_settings: Set time allowance |
| 624 | @verbatim |
| 625 | Arguments: int main_time, int byo_yomi_time, int byo_yomi_stones |
| 626 | Fails: syntax error |
| 627 | Returns: nothing |
| 628 | |
| 629 | Status: GTP version 2 standard command. |
| 630 | @end verbatim |
| 631 | |
| 632 | @cindex time_left |
| 633 | @item time_left: Report remaining time |
| 634 | @verbatim |
| 635 | Arguments: color color, int time, int stones |
| 636 | Fails: syntax error |
| 637 | Returns: nothing |
| 638 | |
| 639 | Status: GTP version 2 standard command. |
| 640 | @end verbatim |
| 641 | @cindex final_score |
| 642 | @item final_score: Compute the score of a finished game. |
| 643 | @verbatim |
| 644 | Arguments: Optional random seed |
| 645 | Fails: never |
| 646 | Returns: Score in SGF format (RE property). |
| 647 | |
| 648 | Status: GTP version 2 standard command. |
| 649 | @end verbatim |
| 650 | @cindex final_status |
| 651 | @item final_status: Report the final status of a vertex in a finished game. |
| 652 | @verbatim |
| 653 | Arguments: Vertex, optional random seed |
| 654 | Fails: invalid vertex |
| 655 | Returns: Status in the form of one of the strings "alive", "dead", |
| 656 | "seki", "white_territory", "black_territory", or "dame". |
| 657 | @end verbatim |
| 658 | @cindex final_status_list |
| 659 | @item final_status_list: Report vertices with a specific final status in a finished game. |
| 660 | @verbatim |
| 661 | Arguments: Status in the form of one of the strings "alive", "dead", |
| 662 | "seki", "white_territory", "black_territory", or "dame". |
| 663 | An optional random seed can be added. |
| 664 | Fails: missing or invalid status string |
| 665 | Returns: Vertices having the specified status. These are split with |
| 666 | one string on each line if the vertices are nonempty (i.e. |
| 667 | for "alive", "dead", and "seki"). |
| 668 | |
| 669 | Status: GTP version 2 standard command. |
| 670 | However, "dame", "white_territory", and "black_territory" |
| 671 | are private extensions. |
| 672 | @end verbatim |
| 673 | |
| 674 | @cindex estimate_score |
| 675 | @item estimate_score: Estimate the score |
| 676 | @verbatim |
| 677 | Arguments: None |
| 678 | Fails: never |
| 679 | Returns: upper and lower bounds for the score |
| 680 | @end verbatim |
| 681 | |
| 682 | @cindex experimental_score |
| 683 | @item experimental_score: Estimate the score, taking into account which player moves next |
| 684 | @verbatim |
| 685 | Arguments: Color to play |
| 686 | Fails: Invalid color |
| 687 | Returns: Score. |
| 688 | |
| 689 | This function generates a move for color, then adds the |
| 690 | value of the move generated to the value of the position. |
| 691 | Critical dragons are awarded to the opponent since the |
| 692 | value of rescuing a critical dragon is taken into account |
| 693 | in the value of the move generated. |
| 694 | @end verbatim |
| 695 | @cindex reset_life_node_counter |
| 696 | @item reset_life_node_counter: Reset the count of life nodes. |
| 697 | @verbatim |
| 698 | Arguments: none |
| 699 | Fails: never |
| 700 | Returns: nothing |
| 701 | |
| 702 | Note: This function is obsolete and only remains for backwards |
| 703 | compatibility. |
| 704 | @end verbatim |
| 705 | @cindex get_life_node_counter |
| 706 | @item get_life_node_counter: Retrieve the count of life nodes. |
| 707 | @verbatim |
| 708 | Arguments: none |
| 709 | Fails: never |
| 710 | Returns: number of life nodes |
| 711 | |
| 712 | Note: This function is obsolete and only remains for backwards |
| 713 | compatibility. |
| 714 | @end verbatim |
| 715 | @cindex reset_owl_node_counter |
| 716 | @item reset_owl_node_counter: Reset the count of owl nodes. |
| 717 | @verbatim |
| 718 | Arguments: none |
| 719 | Fails: never |
| 720 | Returns: nothing |
| 721 | @end verbatim |
| 722 | @cindex get_owl_node_counter |
| 723 | @item get_owl_node_counter: Retrieve the count of owl nodes. |
| 724 | @verbatim |
| 725 | Arguments: none |
| 726 | Fails: never |
| 727 | Returns: number of owl nodes |
| 728 | @end verbatim |
| 729 | @cindex reset_reading_node_counter |
| 730 | @item reset_reading_node_counter: Reset the count of reading nodes. |
| 731 | @verbatim |
| 732 | Arguments: none |
| 733 | Fails: never |
| 734 | Returns: nothing |
| 735 | @end verbatim |
| 736 | @cindex get_reading_node_counter |
| 737 | @item get_reading_node_counter: Retrieve the count of reading nodes. |
| 738 | @verbatim |
| 739 | Arguments: none |
| 740 | Fails: never |
| 741 | Returns: number of reading nodes |
| 742 | @end verbatim |
| 743 | @cindex reset_trymove_counter |
| 744 | @item reset_trymove_counter: Reset the count of trymoves/trykos. |
| 745 | @verbatim |
| 746 | Arguments: none |
| 747 | Fails: never |
| 748 | Returns: nothing |
| 749 | @end verbatim |
| 750 | @cindex get_trymove_counter |
| 751 | @item get_trymove_counter: Retrieve the count of trymoves/trykos. |
| 752 | @verbatim |
| 753 | Arguments: none |
| 754 | Fails: never |
| 755 | Returns: number of trymoves/trykos |
| 756 | @end verbatim |
| 757 | @cindex reset_connection_node_counter |
| 758 | @item reset_connection_node_counter: Reset the count of connection nodes. |
| 759 | @verbatim |
| 760 | Arguments: none |
| 761 | Fails: never |
| 762 | Returns: nothing |
| 763 | @end verbatim |
| 764 | @cindex get_connection_node_counter |
| 765 | @item get_connection_node_counter: Retrieve the count of connection nodes. |
| 766 | @verbatim |
| 767 | Arguments: none |
| 768 | Fails: never |
| 769 | Returns: number of connection nodes |
| 770 | @end verbatim |
| 771 | @cindex test_eyeshape |
| 772 | @item test_eyeshape: Test an eyeshape for inconsistent evaluations |
| 773 | @verbatim |
| 774 | Arguments: Eyeshape vertices |
| 775 | Fails: Bad vertices |
| 776 | Returns: Failure reports on stderr. |
| 777 | @end verbatim |
| 778 | @cindex analyze_eyegraph |
| 779 | @item analyze_eyegraph: Compute an eyevalue and vital points for an eye graph |
| 780 | @verbatim |
| 781 | Arguments: Eyeshape encoded in string |
| 782 | Fails: Bad eyeshape, analysis failed |
| 783 | Returns: Eyevalue, vital points |
| 784 | @end verbatim |
| 785 | @cindex cputime |
| 786 | @item cputime: Returns elapsed CPU time in seconds. |
| 787 | @verbatim |
| 788 | Arguments: none |
| 789 | Fails: never |
| 790 | Returns: Total elapsed (user + system) CPU time in seconds. |
| 791 | @end verbatim |
| 792 | @cindex showboard |
| 793 | @item showboard: Write the position to stdout. |
| 794 | @verbatim |
| 795 | Arguments: none |
| 796 | Fails: never |
| 797 | Returns: nothing |
| 798 | |
| 799 | Status: GTP version 2 standard command. |
| 800 | @end verbatim |
| 801 | @cindex dump_stack |
| 802 | @item dump_stack: Dump stack to stderr. |
| 803 | @verbatim |
| 804 | Arguments: none |
| 805 | Fails: never |
| 806 | Returns: nothing |
| 807 | @end verbatim |
| 808 | @cindex initial_influence |
| 809 | @item initial_influence: Return information about the initial influence function. |
| 810 | @verbatim |
| 811 | Arguments: color to move, what information |
| 812 | Fails: never |
| 813 | Returns: Influence data formatted like: |
| 814 | |
| 815 | 0.51 1.34 3.20 6.60 9.09 8.06 1.96 0.00 0.00 |
| 816 | 0.45 1.65 4.92 12.19 17.47 15.92 4.03 0.00 0.00 |
| 817 | . |
| 818 | . |
| 819 | . |
| 820 | 0.00 0.00 0.00 0.00 0.00 100.00 75.53 41.47 23.41 |
| 821 | |
| 822 | The available choices of information are: |
| 823 | |
| 824 | white_influence (float) |
| 825 | black_influence (float) |
| 826 | white_strength (float) |
| 827 | black_strength (float) |
| 828 | white_attenuation (float) |
| 829 | black_attenuation (float) |
| 830 | white_permeability (float) |
| 831 | black_permeability (float) |
| 832 | territory_value (float) |
| 833 | influence_regions (int) |
| 834 | non_territory (int) |
| 835 | |
| 836 | The encoding of influence_regions is as follows: |
| 837 | 4 white stone |
| 838 | 3 white territory |
| 839 | 2 white moyo |
| 840 | 1 white area |
| 841 | 0 neutral |
| 842 | -1 black area |
| 843 | -2 black moyo |
| 844 | -3 black territory |
| 845 | -4 black stone |
| 846 | @end verbatim |
| 847 | @cindex move_influence |
| 848 | @item move_influence: Return information about the influence function after a move. |
| 849 | @verbatim |
| 850 | Arguments: move, what information |
| 851 | Fails: never |
| 852 | Returns: Influence data formatted like for initial_influence. |
| 853 | @end verbatim |
| 854 | @cindex move_probabilities |
| 855 | @item move_probabilities: List probabilities of each move being played (when non-zero). If no previous genmove command has been issued, the result |
| 856 | of this command will be meaningless. |
| 857 | @verbatim |
| 858 | Arguments: none |
| 859 | Fails: never |
| 860 | Returns: Move, probabilty pairs, one per row. |
| 861 | @end verbatim |
| 862 | @cindex move_uncertainty |
| 863 | @item move_uncertainty: Return the number of bits of uncertainty in the move. If no previous genmove command has been issued, the result |
| 864 | of this command will be meaningless. |
| 865 | @verbatim |
| 866 | Arguments: none |
| 867 | Fails: never |
| 868 | Returns: bits of uncertainty |
| 869 | @end verbatim |
| 870 | @cindex followup_influence |
| 871 | @item followup_influence: Return information about the followup influence after a move. |
| 872 | @verbatim |
| 873 | Arguments: move, what information |
| 874 | Fails: never |
| 875 | Returns: Influence data formatted like for initial_influence. |
| 876 | @end verbatim |
| 877 | @cindex worm_data |
| 878 | @item worm_data: Return the information in the worm data structure. |
| 879 | @verbatim |
| 880 | Arguments: optional vertex |
| 881 | Fails: never |
| 882 | Returns: Worm data formatted like: |
| 883 | |
| 884 | A19: |
| 885 | color black |
| 886 | size 10 |
| 887 | effective_size 17.83 |
| 888 | origin A19 |
| 889 | liberties 8 |
| 890 | liberties2 15 |
| 891 | liberties3 10 |
| 892 | liberties4 8 |
| 893 | attack PASS |
| 894 | attack_code 0 |
| 895 | lunch B19 |
| 896 | defend PASS |
| 897 | defend_code 0 |
| 898 | cutstone 2 |
| 899 | cutstone2 0 |
| 900 | genus 0 |
| 901 | inessential 0 |
| 902 | B19: |
| 903 | color white |
| 904 | . |
| 905 | . |
| 906 | . |
| 907 | inessential 0 |
| 908 | C19: |
| 909 | ... |
| 910 | |
| 911 | If an intersection is specified, only data for this one will be returned. |
| 912 | @end verbatim |
| 913 | @cindex worm_stones |
| 914 | @item worm_stones: List the stones of a worm |
| 915 | @verbatim |
| 916 | Arguments: the location, "BLACK" or "WHITE" |
| 917 | Fails: if called on an empty or off-board location |
| 918 | Returns: list of stones |
| 919 | @end verbatim |
| 920 | @cindex worm_cutstone |
| 921 | @item worm_cutstone: Return the cutstone field in the worm data structure. |
| 922 | @verbatim |
| 923 | Arguments: non-empty vertex |
| 924 | Fails: never |
| 925 | Returns: cutstone |
| 926 | @end verbatim |
| 927 | @cindex dragon_data |
| 928 | @item dragon_data: Return the information in the dragon data structure. |
| 929 | @verbatim |
| 930 | Arguments: optional intersection |
| 931 | Fails: never |
| 932 | Returns: Dragon data formatted in the corresponding way to worm_data. |
| 933 | @end verbatim |
| 934 | @cindex dragon_stones |
| 935 | @item dragon_stones: List the stones of a dragon |
| 936 | @verbatim |
| 937 | Arguments: the location |
| 938 | Fails: if called on an empty or off-board location |
| 939 | Returns: list of stones |
| 940 | @end verbatim |
| 941 | @cindex eye_data |
| 942 | @item eye_data: Return the information in the eye data structure. |
| 943 | @verbatim |
| 944 | Arguments: color, vertex |
| 945 | Fails: never |
| 946 | Returns: eye data fields and values, one pair per row |
| 947 | @end verbatim |
| 948 | @cindex half_eye_data |
| 949 | @item half_eye_data: Return the information in the half eye data structure. |
| 950 | @verbatim |
| 951 | Arguments: vertex |
| 952 | Fails: never |
| 953 | Returns: half eye data fields and values, one pair per row |
| 954 | @end verbatim |
| 955 | @cindex start_sgftrace |
| 956 | @item start_sgftrace: Start storing moves executed during reading in an sgf tree in memory. |
| 957 | @verbatim |
| 958 | Arguments: none |
| 959 | Fails: never |
| 960 | Returns: nothing |
| 961 | |
| 962 | Warning: You had better know what you're doing if you try to use this |
| 963 | command. |
| 964 | @end verbatim |
| 965 | @cindex finish_sgftrace |
| 966 | @item finish_sgftrace: Finish storing moves in an sgf tree and write it to file. |
| 967 | @verbatim |
| 968 | Arguments: filename |
| 969 | Fails: never |
| 970 | Returns: nothing |
| 971 | |
| 972 | Warning: You had better know what you're doing if you try to use this |
| 973 | command. |
| 974 | @end verbatim |
| 975 | @cindex printsgf |
| 976 | @item printsgf: Dump the current position as a static sgf file to filename, or as output if filename is missing or "-" |
| 977 | @verbatim |
| 978 | Arguments: optional filename |
| 979 | Fails: never |
| 980 | Returns: nothing if filename, otherwise the sgf |
| 981 | @end verbatim |
| 982 | @cindex tune_move_ordering |
| 983 | @item tune_move_ordering: Tune the parameters for the move ordering in the tactical reading. |
| 984 | @verbatim |
| 985 | Arguments: MOVE_ORDERING_PARAMETERS integers |
| 986 | Fails: incorrect arguments |
| 987 | Returns: nothing |
| 988 | @end verbatim |
| 989 | @cindex echo |
| 990 | @item echo: Echo the parameter |
| 991 | @verbatim |
| 992 | Arguments: string |
| 993 | Fails: never |
| 994 | Returns: nothing |
| 995 | @end verbatim |
| 996 | @cindex echo_err |
| 997 | @item echo_err: Echo the parameter to stdout AND stderr |
| 998 | @verbatim |
| 999 | Arguments: string |
| 1000 | Fails: never |
| 1001 | Returns: nothing |
| 1002 | @end verbatim |
| 1003 | @cindex help |
| 1004 | @item help: List all known commands |
| 1005 | @verbatim |
| 1006 | Arguments: none |
| 1007 | Fails: never |
| 1008 | Returns: list of known commands, one per line |
| 1009 | |
| 1010 | Status: GTP version 2 standard command. |
| 1011 | @end verbatim |
| 1012 | @cindex known_command |
| 1013 | @item known_command: Tell whether a command is known. |
| 1014 | @verbatim |
| 1015 | Arguments: command name |
| 1016 | Fails: never |
| 1017 | Returns: "true" if command exists, "false" if not |
| 1018 | |
| 1019 | Status: GTP version 2 standard command. |
| 1020 | @end verbatim |
| 1021 | @cindex report_uncertainty |
| 1022 | @item report_uncertainty: Turn uncertainty reports from owl_attack and owl_defend on or off. |
| 1023 | @verbatim |
| 1024 | Arguments: "on" or "off" |
| 1025 | Fails: invalid argument |
| 1026 | Returns: nothing |
| 1027 | @end verbatim |
| 1028 | @cindex get_random_seed |
| 1029 | @item get_random_seed: Get the random seed |
| 1030 | @verbatim |
| 1031 | Arguments: none |
| 1032 | Fails: never |
| 1033 | Returns: random seed |
| 1034 | @end verbatim |
| 1035 | @cindex set_random_seed |
| 1036 | @item set_random_seed: Set the random seed |
| 1037 | @verbatim |
| 1038 | Arguments: integer |
| 1039 | Fails: invalid data |
| 1040 | Returns: nothing |
| 1041 | @end verbatim |
| 1042 | @cindex advance_random_seed |
| 1043 | @item advance_random_seed: Advance the random seed by a number of games. |
| 1044 | @verbatim |
| 1045 | Arguments: integer |
| 1046 | Fails: invalid data |
| 1047 | Returns: New random seed. |
| 1048 | @end verbatim |
| 1049 | @cindex is_surrounded |
| 1050 | @item is_surrounded: Determine if a dragon is surrounded |
| 1051 | @verbatim |
| 1052 | Arguments: vertex (dragon) |
| 1053 | Fails: invalid vertex, empty vertex |
| 1054 | Returns: 1 if surrounded, 2 if weakly surrounded, 0 if not |
| 1055 | @end verbatim |
| 1056 | @cindex does_surround |
| 1057 | @item does_surround: Determine if a move surrounds a dragon |
| 1058 | @verbatim |
| 1059 | Arguments: vertex (move), vertex (dragon) |
| 1060 | Fails: invalid vertex, empty (dragon, nonempty (move) |
| 1061 | Returns: 1 if (move) surrounds (dragon) |
| 1062 | @end verbatim |
| 1063 | |
| 1064 | @cindex surround_map |
| 1065 | @item surround_map: Report the surround map for dragon at a vertex |
| 1066 | @verbatim |
| 1067 | Arguments: vertex (dragon), vertex (mapped location) |
| 1068 | Fails: invalid vertex, empty dragon |
| 1069 | Returns: value of surround map at (mapped location), or -1 if |
| 1070 | dragon not surrounded. |
| 1071 | @end verbatim |
| 1072 | @cindex set_search_diamond |
| 1073 | @item set_search_diamond: limit search, and establish a search diamond |
| 1074 | @verbatim |
| 1075 | Arguments: pos |
| 1076 | Fails: invalid value |
| 1077 | Returns: nothing |
| 1078 | @end verbatim |
| 1079 | @cindex reset_search_mask |
| 1080 | @item reset_search_mask: unmark the entire board for limited search |
| 1081 | @verbatim |
| 1082 | Arguments: none |
| 1083 | Fails: never |
| 1084 | Returns: nothing |
| 1085 | @end verbatim |
| 1086 | @cindex limit_search |
| 1087 | @item limit_search: sets the global variable limit_search |
| 1088 | @verbatim |
| 1089 | Arguments: value |
| 1090 | Fails: invalid arguments |
| 1091 | Returns: nothing |
| 1092 | @end verbatim |
| 1093 | @cindex set_search_limit |
| 1094 | @item set_search_limit: mark a vertex for limited search |
| 1095 | @verbatim |
| 1096 | Arguments: position |
| 1097 | Fails: invalid arguments |
| 1098 | Returns: nothing |
| 1099 | @end verbatim |
| 1100 | @cindex draw_search_area |
| 1101 | @item draw_search_area: Draw search area. Writes to stderr. |
| 1102 | @verbatim |
| 1103 | Arguments: none |
| 1104 | Fails: never |
| 1105 | Returns: nothing |
| 1106 | @end verbatim |