H:\portage\games-board\gnugo\gnugo-3.9.1.chm
# gnugo 的核心代码在这个列表中, 本身 gtp 的协议是ascii的协议, 类似于telnet
# gtp 的协议 对应的处理函数 , 列表如下, 对gnugo 的代码分析会集中在下面的一些函数中的.
root/interface/play_gtp.c
186 /* List of known commands. */
187 static struct gtp_command commands[] = {
188 {"aa_confirm_safety", gtp_aa_confirm_safety},
189 {"accurate_approxlib", gtp_accurate_approxlib},
190 {"accuratelib", gtp_accuratelib},
191 {"advance_random_seed", gtp_advance_random_seed},
192 {"all_legal", gtp_all_legal},
193 {"all_move_values", gtp_all_move_values},
194 {"analyze_eyegraph", gtp_analyze_eyegraph},
195 {"analyze_semeai", gtp_analyze_semeai},
196 {"analyze_semeai_after_move", gtp_analyze_semeai_after_move},
197 {"attack", gtp_attack},
198 {"attack_either", gtp_attack_either},
199 {"black", gtp_playblack},
200 {"block_off", gtp_block_off},
201 {"boardsize", gtp_set_boardsize},
202 {"break_in", gtp_break_in},
203 {"captures", gtp_captures},
204 {"clear_board", gtp_clear_board},
205 {"clear_cache", gtp_clear_cache},
206 {"color", gtp_what_color},
207 {"combination_attack", gtp_combination_attack},
208 {"combination_defend", gtp_combination_defend},
209 {"connect", gtp_connect},
210 {"countlib", gtp_countlib},
211 {"cputime", gtp_cputime},
212 {"decrease_depths", gtp_decrease_depths},
213 {"defend", gtp_defend},
214 {"defend_both", gtp_defend_both},
215 {"disconnect", gtp_disconnect},
216 {"does_attack", gtp_does_attack},
217 {"does_defend", gtp_does_defend},
218 {"does_surround", gtp_does_surround},
219 {"dragon_data", gtp_dragon_data},
220 {"dragon_status", gtp_dragon_status},
221 {"dragon_stones", gtp_dragon_stones},
222 {"draw_search_area", gtp_draw_search_area},
223 {"dump_stack", gtp_dump_stack},
224 {"echo" , gtp_echo},
225 {"echo_err" , gtp_echo_err},
226 {"estimate_score", gtp_estimate_score},
227 {"eval_eye", gtp_eval_eye},
228 {"experimental_score", gtp_experimental_score},
229 {"eye_data", gtp_eye_data},
230 {"final_score", gtp_final_score},
231 {"final_status", gtp_final_status},
232 {"final_status_list", gtp_final_status_list},
233 {"findlib", gtp_findlib},
234 {"finish_sgftrace", gtp_finish_sgftrace},
235 {"fixed_handicap", gtp_fixed_handicap},
236 {"followup_influence", gtp_followup_influence},
237 {"genmove", gtp_genmove},
238 {"genmove_black", gtp_genmove_black},
239 {"genmove_white", gtp_genmove_white},
240 {"get_connection_node_counter", gtp_get_connection_node_counter},
241 {"get_handicap", gtp_get_handicap},
242 {"get_komi", gtp_get_komi},
243 {"get_life_node_counter", gtp_get_life_node_counter},
244 {"get_owl_node_counter", gtp_get_owl_node_counter},
245 {"get_random_seed", gtp_get_random_seed},
246 {"get_reading_node_counter", gtp_get_reading_node_counter},
247 {"get_trymove_counter", gtp_get_trymove_counter},
248 {"gg-undo", gtp_gg_undo},
249 {"gg_genmove", gtp_gg_genmove},
250 {"half_eye_data", gtp_half_eye_data},
251 {"help", gtp_list_commands},
252 {"increase_depths", gtp_increase_depths},
253 {"initial_influence", gtp_initial_influence},
254 {"invariant_hash_for_moves",gtp_invariant_hash_for_moves},
255 {"invariant_hash", gtp_invariant_hash},
256 {"is_legal", gtp_is_legal},
257 {"is_surrounded", gtp_is_surrounded},
258 {"kgs-genmove_cleanup", gtp_kgs_genmove_cleanup},
259 {"known_command", gtp_known_command},
260 {"komi", gtp_set_komi},
261 {"ladder_attack", gtp_ladder_attack},
262 {"last_move", gtp_last_move},
263 {"level", gtp_set_level},
264 {"limit_search", gtp_limit_search},
265 {"list_commands", gtp_list_commands},
266 {"list_stones", gtp_list_stones},
267 {"loadsgf", gtp_loadsgf},
268 {"move_influence", gtp_move_influence},
269 {"move_probabilities", gtp_move_probabilities},
270 {"move_reasons", gtp_move_reasons},
271 {"move_uncertainty", gtp_move_uncertainty},
272 {"move_history", gtp_move_history},
273 {"name", gtp_name},
274 {"new_score", gtp_estimate_score},
275 {"orientation", gtp_set_orientation},
276 {"owl_attack", gtp_owl_attack},
277 {"owl_connection_defends", gtp_owl_connection_defends},
278 {"owl_defend", gtp_owl_defend},
279 {"owl_does_attack", gtp_owl_does_attack},
280 {"owl_does_defend", gtp_owl_does_defend},
281 {"owl_substantial", gtp_owl_substantial},
282 {"owl_threaten_attack", gtp_owl_threaten_attack},
283 {"owl_threaten_defense", gtp_owl_threaten_defense},
284 {"place_free_handicap", gtp_place_free_handicap},
285 {"play", gtp_play},
286 {"popgo", gtp_popgo},
287 {"printsgf", gtp_printsgf},
288 {"protocol_version", gtp_protocol_version},
289 {"query_boardsize", gtp_query_boardsize},
290 {"query_orientation", gtp_query_orientation},
291 {"quit", gtp_quit},
292 {"reg_genmove", gtp_reg_genmove},
293 {"report_uncertainty", gtp_report_uncertainty},
294 {"reset_connection_node_counter", gtp_reset_connection_node_counter},
295 {"reset_life_node_counter", gtp_reset_life_node_counter},
296 {"reset_owl_node_counter", gtp_reset_owl_node_counter},
297 {"reset_reading_node_counter", gtp_reset_reading_node_counter},
298 {"reset_search_mask", gtp_reset_search_mask},
299 {"reset_trymove_counter", gtp_reset_trymove_counter},
300 {"restricted_genmove", gtp_restricted_genmove},
301 {"same_dragon", gtp_same_dragon},
302 {"set_free_handicap", gtp_set_free_handicap},
303 {"set_random_seed", gtp_set_random_seed},
304 {"set_search_diamond", gtp_set_search_diamond},
305 {"set_search_limit", gtp_set_search_limit},
306 {"showboard", gtp_showboard},
307 {"start_sgftrace", gtp_start_sgftrace},
308 {"surround_map", gtp_surround_map},
309 {"tactical_analyze_semeai", gtp_tactical_analyze_semeai},
310 {"test_eyeshape", gtp_test_eyeshape},
311 {"time_left", gtp_time_left},
312 {"time_settings", gtp_time_settings},
313 {"top_moves", gtp_top_moves},
314 {"top_moves_black", gtp_top_moves_black},
315 {"top_moves_white", gtp_top_moves_white},
316 {"tryko", gtp_tryko},
317 {"trymove", gtp_trymove},
318 {"tune_move_ordering", gtp_tune_move_ordering},
319 {"unconditional_status", gtp_unconditional_status},
320 {"undo", gtp_undo},
321 {"version", gtp_program_version},
322 {"white", gtp_playwhite},
323 {"worm_cutstone", gtp_worm_cutstone},
324 {"worm_data", gtp_worm_data},
325 {"worm_stones", gtp_worm_stones},
326 {NULL, NULL}
327 };