Updated README: Equal sign not required with `--mode` flag.
[sgk-go] / doc / gtp-commands.texi
CommitLineData
7eeb782e
AT
1@cindex quit
2@item quit: Quit
3@verbatim
4Arguments: none
5Fails: never
6Returns: nothing
7
8Status: GTP version 2 standard command.
9@end verbatim
10@cindex protocol_version
11@item protocol_version: Report protocol version.
12@verbatim
13Arguments: none
14Fails: never
15Returns: protocol version number
16
17Status: GTP version 2 standard command.
18@end verbatim
19@cindex name
20@item name: Report the name of the program.
21@verbatim
22Arguments: none
23Fails: never
24Returns: program name
25
26Status: GTP version 2 standard command.
27@end verbatim
28@cindex version
29@item version: Report the version number of the program.
30@verbatim
31Arguments: none
32Fails: never
33Returns: version number
34
35Status: 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
40Arguments: integer
41Fails: board size outside engine's limits
42Returns: nothing
43
44Status: GTP version 2 standard command.
45@end verbatim
46@cindex query_boardsize
47@item query_boardsize: Find the current boardsize
48@verbatim
49Arguments: none
50Fails: never
51Returns: board_size
52@end verbatim
53@cindex clear_board
54@item clear_board: Clear the board.
55@verbatim
56Arguments: none
57Fails: never
58Returns: nothing
59
60Status: 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
65Arguments: integer
66Fails: illegal orientation
67Returns: nothing
68@end verbatim
69@cindex query_orientation
70@item query_orientation: Find the current orientation
71@verbatim
72Arguments: none
73Fails: never
74Returns: orientation
75@end verbatim
76@cindex komi
77@item komi: Set the komi.
78@verbatim
79Arguments: float
80Fails: incorrect argument
81Returns: nothing
82
83Status: GTP version 2 standard command.
84@end verbatim
85@cindex get_komi
86@item get_komi: Get the komi
87@verbatim
88Arguments: none
89Fails: never
90Returns: Komi
91@end verbatim
92@cindex black
93@item black: Play a black stone at the given vertex.
94@verbatim
95Arguments: vertex
96Fails: invalid vertex, illegal move
97Returns: nothing
98
99Status: Obsolete GTP version 1 command.
100@end verbatim
101@cindex playwhite
102@item playwhite: Play a white stone at the given vertex.
103@verbatim
104Arguments: vertex
105Fails: invalid vertex, illegal move
106Returns: nothing
107
108Status: 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
113Arguments: color, vertex
114Fails: invalid vertex, illegal move
115Returns: nothing
116
117Status: GTP version 2 standard command.
118@end verbatim
119@cindex fixed_handicap
120@item fixed_handicap: Set up fixed placement handicap stones.
121@verbatim
122Arguments: number of handicap stones
123Fails: invalid number of stones for the current boardsize
124Returns: list of vertices with handicap stones
125
126Status: 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
131Arguments: number of handicap stones
132Fails: invalid number of stones
133Returns: list of vertices with handicap stones
134
135Status: 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
140Arguments: list of vertices with handicap stones
141Fails: board not empty, bad list of vertices
142Returns: nothing
143
144Status: GTP version 2 standard command.
145@end verbatim
146@cindex get_handicap
147@item get_handicap: Get the handicap
148@verbatim
149Arguments: none
150Fails: never
151Returns: 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
156Arguments: filename + move number, vertex, or nothing
157Fails: missing filename or failure to open or parse file
158Returns: color to play
159
160Status: GTP version 2 standard command.
161@end verbatim
162@cindex color
163@item color: Return the color at a vertex.
164@verbatim
165Arguments: vertex
166Fails: invalid vertex
167Returns: "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
172Arguments: color
173Fails: invalid color
174Returns: list of vertices
175@end verbatim
176@cindex countlib
177@item countlib: Count number of liberties for the string at a vertex.
178@verbatim
179Arguments: vertex
180Fails: invalid vertex, empty vertex
181Returns: 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
186Arguments: vertex
187Fails: invalid vertex, empty vertex
188Returns: 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
193Arguments: move (color + vertex)
194Fails: invalid color, invalid vertex, occupied vertex
195Returns: 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
200Arguments: move (color + vertex)
201Fails: invalid color, invalid vertex, occupied vertex
202Returns: Sorted space separated list of liberties
203
204Supposedly identical in behavior to the above function and
205can 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
210Arguments: move
211Fails: invalid move
212Returns: 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
217Arguments: color
218Fails: invalid color
219Returns: 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
224Arguments: color
225Fails: invalid color
226Returns: Number of captures.
227@end verbatim
228@cindex last_move
229@item last_move: Return the last move.
230@verbatim
231Arguments: none
232Fails: no previous move known
233Returns: 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
238Arguments: none
239Fails: never
240Returns: 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
246Arguments: none
247Fails: never
248Returns: 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
254Arguments: color
255Fails: invalid color
256Returns: 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
262Arguments: move (color + vertex)
263Fails: invalid color, invalid vertex, illegal move
264Returns: 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
269Arguments: move (color + vertex)
270Fails: invalid color, invalid vertex, illegal move
271Returns: nothing
272@end verbatim
273@cindex popgo
274@item popgo: Undo a trymove or tryko.
275@verbatim
276Arguments: none
277Fails: stack empty
278Returns: nothing
279@end verbatim
280
281@cindex clear_cache
282@item clear_cache: clear the caches.
283@verbatim
284Arguments: none.
285Fails: never.
286Returns: nothing.
287@end verbatim
288@cindex attack
289@item attack: Try to attack a string.
290@verbatim
291Arguments: vertex
292Fails: invalid vertex, empty vertex
293Returns: 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
298Arguments: two vertices
299Fails: invalid vertex, empty vertex
300Returns: 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
307Arguments: vertex
308Fails: invalid vertex, empty vertex
309Returns: 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
314Arguments: vertex (move), vertex (dragon)
315Fails: invalid vertex, empty vertex
316Returns: attack code
317@end verbatim
318@cindex does_defend
319@item does_defend: Examine whether a specific move defends a string tactically.
320@verbatim
321Arguments: vertex (move), vertex (dragon)
322Fails: invalid vertex, empty vertex
323Returns: attack code
324@end verbatim
325@cindex ladder_attack
326@item ladder_attack: Try to attack a string strictly in a ladder.
327@verbatim
328Arguments: vertex
329Fails: invalid vertex, empty vertex
330Returns: 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
335Arguments: none
336Fails: never
337Returns: nothing
338@end verbatim
339@cindex decrease_depths
340@item decrease_depths: Decrease depth values by one.
341@verbatim
342Arguments: none
343Fails: never
344Returns: nothing
345@end verbatim
346@cindex owl_attack
347@item owl_attack: Try to attack a dragon.
348@verbatim
349Arguments: vertex
350Fails: invalid vertex, empty vertex
351Returns: 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
356Arguments: vertex
357Fails: invalid vertex, empty vertex
358Returns: 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
363Arguments: vertex
364Fails: invalid vertex, empty vertex
365Returns: 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
371Arguments: vertex
372Fails: invalid vertex, empty vertex
373Returns: 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
379Arguments: vertex (move), vertex (dragon)
380Fails: invalid vertex, empty vertex
381Returns: 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
386Arguments: vertex (move), vertex (dragon)
387Fails: invalid vertex, empty vertex
388Returns: defense code
389@end verbatim
390@cindex owl_connection_defends
391@item owl_connection_defends: Examine whether a connection defends involved dragons.
392@verbatim
393Arguments: vertex (move), vertex (dragon1), vertex (dragon2)
394Fails: invalid vertex, empty vertex
395Returns: defense code
396@end verbatim
397@cindex defend_both
398@item defend_both: Try to defend both of two strings
399@verbatim
400Arguments: two vertices
401Fails: invalid vertex, empty vertex
402Returns: 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
409Arguments: vertex
410Fails: invalid vertex, empty vertex
411Returns: 1 if dragon can live, 0 otherwise
412@end verbatim
413@cindex analyze_semeai
414@item analyze_semeai: Analyze a semeai
415@verbatim
416Arguments: dragona, dragonb
417Fails: invalid vertices, empty vertices
418Returns: 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
423Arguments: color, vertex, dragona, dragonb
424Fails: invalid vertices
425Returns: 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
430Arguments: dragona, dragonb
431Fails: invalid vertices, empty vertices
432Returns: status of dragona, dragonb assuming dragona moves first
433@end verbatim
434@cindex connect
435@item connect: Try to connect two strings.
436@verbatim
437Arguments: vertex, vertex
438Fails: invalid vertex, empty vertex, vertices of different colors
439Returns: connect result followed by connect point if successful.
440@end verbatim
441@cindex disconnect
442@item disconnect: Try to disconnect two strings.
443@verbatim
444Arguments: vertex, vertex
445Fails: invalid vertex, empty vertex, vertices of different colors
446Returns: 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
451Arguments: vertex, vertices
452Fails: invalid vertex, empty vertex.
453Returns: 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
458Arguments: vertex, vertices
459Fails: invalid vertex, empty vertex.
460Returns: 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
466Arguments: vertex
467Fails: invalid vertex
468Returns: 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
477Arguments: optional vertex
478Fails: invalid vertex, empty vertex
479Returns: 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
485FIXME: 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
492Arguments: vertex, vertex
493Fails: invalid vertex, empty vertex
494Returns: 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
500Arguments: vertex
501Fails: invalid vertex
502Returns: 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
511Arguments: color
512Fails: invalid color
513Returns: 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
520Arguments: color
521Fails: invalid color
522Returns: 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
528Arguments: move, optional int
529Fails: invalid move
530Returns: 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
535Arguments: none
536Fails: never
537Returns: a move coordinate or "PASS"
538
539Status: 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
544Arguments: none
545Fails: never
546Returns: a move coordinate or "PASS"
547
548Status: 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
553Arguments: color to move
554Fails: invalid color
555Returns: a move coordinate or "PASS" (or "resign" if resignation_allowed)
556
557Status: 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
562Arguments: color to move
563Fails: invalid color
564Returns: a move coordinate (or "PASS")
565
566Status: 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
571Arguments: color to move, optionally a random seed
572Fails: invalid color
573Returns: a move coordinate (or "PASS")
574
575This 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
580Arguments: color to move, allowed vertices
581Fails: invalid color, invalid vertex, no vertex listed
582Returns: 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
587Arguments: color to move
588Fails: invalid color
589Returns: a move coordinate (or "PASS")
590
591Status: KGS specific command.
592
593A similar command, but possibly somewhat different, will likely be added
594to GTP version 3 at a later time.
595@end verbatim
596@cindex level
597@item level: Set the playing level.
598@verbatim
599Arguments: int
600Fails: incorrect argument
601Returns: nothing
602@end verbatim
603
604@cindex undo
605@item undo: Undo one move
606@verbatim
607Arguments: none
608Fails: If move history is too short.
609Returns: nothing
610
611Status: GTP version 2 standard command.
612@end verbatim
613
614@cindex gg-undo
615@item gg-undo: Undo a number of moves
616@verbatim
617Arguments: optional int
618Fails: If move history is too short.
619Returns: nothing
620@end verbatim
621
622@cindex time_settings
623@item time_settings: Set time allowance
624@verbatim
625Arguments: int main_time, int byo_yomi_time, int byo_yomi_stones
626Fails: syntax error
627Returns: nothing
628
629Status: GTP version 2 standard command.
630@end verbatim
631
632@cindex time_left
633@item time_left: Report remaining time
634@verbatim
635Arguments: color color, int time, int stones
636Fails: syntax error
637Returns: nothing
638
639Status: 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
644Arguments: Optional random seed
645Fails: never
646Returns: Score in SGF format (RE property).
647
648Status: 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
653Arguments: Vertex, optional random seed
654Fails: invalid vertex
655Returns: 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
661Arguments: 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.
664Fails: missing or invalid status string
665Returns: 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
669Status: 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
677Arguments: None
678Fails: never
679Returns: 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
685Arguments: Color to play
686Fails: Invalid color
687Returns: Score.
688
689This function generates a move for color, then adds the
690value of the move generated to the value of the position.
691Critical dragons are awarded to the opponent since the
692value of rescuing a critical dragon is taken into account
693in 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
698Arguments: none
699Fails: never
700Returns: nothing
701
702Note: This function is obsolete and only remains for backwards
703compatibility.
704@end verbatim
705@cindex get_life_node_counter
706@item get_life_node_counter: Retrieve the count of life nodes.
707@verbatim
708Arguments: none
709Fails: never
710Returns: number of life nodes
711
712Note: This function is obsolete and only remains for backwards
713compatibility.
714@end verbatim
715@cindex reset_owl_node_counter
716@item reset_owl_node_counter: Reset the count of owl nodes.
717@verbatim
718Arguments: none
719Fails: never
720Returns: nothing
721@end verbatim
722@cindex get_owl_node_counter
723@item get_owl_node_counter: Retrieve the count of owl nodes.
724@verbatim
725Arguments: none
726Fails: never
727Returns: 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
732Arguments: none
733Fails: never
734Returns: nothing
735@end verbatim
736@cindex get_reading_node_counter
737@item get_reading_node_counter: Retrieve the count of reading nodes.
738@verbatim
739Arguments: none
740Fails: never
741Returns: 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
746Arguments: none
747Fails: never
748Returns: nothing
749@end verbatim
750@cindex get_trymove_counter
751@item get_trymove_counter: Retrieve the count of trymoves/trykos.
752@verbatim
753Arguments: none
754Fails: never
755Returns: 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
760Arguments: none
761Fails: never
762Returns: nothing
763@end verbatim
764@cindex get_connection_node_counter
765@item get_connection_node_counter: Retrieve the count of connection nodes.
766@verbatim
767Arguments: none
768Fails: never
769Returns: number of connection nodes
770@end verbatim
771@cindex test_eyeshape
772@item test_eyeshape: Test an eyeshape for inconsistent evaluations
773@verbatim
774Arguments: Eyeshape vertices
775Fails: Bad vertices
776Returns: 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
781Arguments: Eyeshape encoded in string
782Fails: Bad eyeshape, analysis failed
783Returns: Eyevalue, vital points
784@end verbatim
785@cindex cputime
786@item cputime: Returns elapsed CPU time in seconds.
787@verbatim
788Arguments: none
789Fails: never
790Returns: Total elapsed (user + system) CPU time in seconds.
791@end verbatim
792@cindex showboard
793@item showboard: Write the position to stdout.
794@verbatim
795Arguments: none
796Fails: never
797Returns: nothing
798
799Status: GTP version 2 standard command.
800@end verbatim
801@cindex dump_stack
802@item dump_stack: Dump stack to stderr.
803@verbatim
804Arguments: none
805Fails: never
806Returns: nothing
807@end verbatim
808@cindex initial_influence
809@item initial_influence: Return information about the initial influence function.
810@verbatim
811Arguments: color to move, what information
812Fails: never
813Returns: 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
822The available choices of information are:
823
824white_influence (float)
825black_influence (float)
826white_strength (float)
827black_strength (float)
828white_attenuation (float)
829black_attenuation (float)
830white_permeability (float)
831black_permeability (float)
832territory_value (float)
833influence_regions (int)
834non_territory (int)
835
836The 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
850Arguments: move, what information
851Fails: never
852Returns: 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
858Arguments: none
859Fails: never
860Returns: 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
866Arguments: none
867Fails: never
868Returns: 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
873Arguments: move, what information
874Fails: never
875Returns: 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
880Arguments: optional vertex
881Fails: never
882Returns: Worm data formatted like:
883
884A19:
885color black
886size 10
887effective_size 17.83
888origin A19
889liberties 8
890liberties2 15
891liberties3 10
892liberties4 8
893attack PASS
894attack_code 0
895lunch B19
896defend PASS
897defend_code 0
898cutstone 2
899cutstone2 0
900genus 0
901inessential 0
902B19:
903color white
904.
905.
906.
907inessential 0
908C19:
909...
910
911If 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
916Arguments: the location, "BLACK" or "WHITE"
917Fails: if called on an empty or off-board location
918Returns: 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
923Arguments: non-empty vertex
924Fails: never
925Returns: cutstone
926@end verbatim
927@cindex dragon_data
928@item dragon_data: Return the information in the dragon data structure.
929@verbatim
930Arguments: optional intersection
931Fails: never
932Returns: 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
937Arguments: the location
938Fails: if called on an empty or off-board location
939Returns: list of stones
940@end verbatim
941@cindex eye_data
942@item eye_data: Return the information in the eye data structure.
943@verbatim
944Arguments: color, vertex
945Fails: never
946Returns: 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
951Arguments: vertex
952Fails: never
953Returns: 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
958Arguments: none
959Fails: never
960Returns: nothing
961
962Warning: 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
968Arguments: filename
969Fails: never
970Returns: nothing
971
972Warning: 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
978Arguments: optional filename
979Fails: never
980Returns: 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
985Arguments: MOVE_ORDERING_PARAMETERS integers
986Fails: incorrect arguments
987Returns: nothing
988@end verbatim
989@cindex echo
990@item echo: Echo the parameter
991@verbatim
992Arguments: string
993Fails: never
994Returns: nothing
995@end verbatim
996@cindex echo_err
997@item echo_err: Echo the parameter to stdout AND stderr
998@verbatim
999Arguments: string
1000Fails: never
1001Returns: nothing
1002@end verbatim
1003@cindex help
1004@item help: List all known commands
1005@verbatim
1006Arguments: none
1007Fails: never
1008Returns: list of known commands, one per line
1009
1010Status: GTP version 2 standard command.
1011@end verbatim
1012@cindex known_command
1013@item known_command: Tell whether a command is known.
1014@verbatim
1015Arguments: command name
1016Fails: never
1017Returns: "true" if command exists, "false" if not
1018
1019Status: 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
1024Arguments: "on" or "off"
1025Fails: invalid argument
1026Returns: nothing
1027@end verbatim
1028@cindex get_random_seed
1029@item get_random_seed: Get the random seed
1030@verbatim
1031Arguments: none
1032Fails: never
1033Returns: random seed
1034@end verbatim
1035@cindex set_random_seed
1036@item set_random_seed: Set the random seed
1037@verbatim
1038Arguments: integer
1039Fails: invalid data
1040Returns: 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
1045Arguments: integer
1046Fails: invalid data
1047Returns: New random seed.
1048@end verbatim
1049@cindex is_surrounded
1050@item is_surrounded: Determine if a dragon is surrounded
1051@verbatim
1052Arguments: vertex (dragon)
1053Fails: invalid vertex, empty vertex
1054Returns: 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
1059Arguments: vertex (move), vertex (dragon)
1060Fails: invalid vertex, empty (dragon, nonempty (move)
1061Returns: 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
1067Arguments: vertex (dragon), vertex (mapped location)
1068Fails: invalid vertex, empty dragon
1069Returns: 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
1075Arguments: pos
1076Fails: invalid value
1077Returns: nothing
1078@end verbatim
1079@cindex reset_search_mask
1080@item reset_search_mask: unmark the entire board for limited search
1081@verbatim
1082Arguments: none
1083Fails: never
1084Returns: nothing
1085@end verbatim
1086@cindex limit_search
1087@item limit_search: sets the global variable limit_search
1088@verbatim
1089Arguments: value
1090Fails: invalid arguments
1091Returns: nothing
1092@end verbatim
1093@cindex set_search_limit
1094@item set_search_limit: mark a vertex for limited search
1095@verbatim
1096Arguments: position
1097Fails: invalid arguments
1098Returns: nothing
1099@end verbatim
1100@cindex draw_search_area
1101@item draw_search_area: Draw search area. Writes to stderr.
1102@verbatim
1103Arguments: none
1104Fails: never
1105Returns: nothing
1106@end verbatim