SabakiHQ / Sabaki

An elegant Go board and SGF editor for a more civilized age.
https://sabaki.yichuanshen.de/
MIT License
2.41k stars 377 forks source link

phoenixgo and minigo engine don't work #518

Closed loverofvenus closed 5 years ago

loverofvenus commented 5 years ago

Recently I apply phoenixgo and minigo engine in sabaki , and the engine format is bat file minigo: play20.bat set BOARD_SIZE=19 & %cd%\Python36\python gtp.py ^ --load_file=models\v15-001008 ^ --num_readouts=20 ^ --verbose=3 ^ --minigui_mode=True --cgos_mode=True phoenixgo start.bat : supported by tencent and they don't work

Minigo Problems look like this :

[2019-01-31 15:18:24.886] W <mingo20>    (in) : name
[2019-01-31 15:18:24.890] W <mingo20>    (in) : version
[2019-01-31 15:18:24.893] W <mingo20>    (in) : protocol_version
[2019-01-31 15:18:24.894] W <mingo20>    (in) : list_commands
[2019-01-31 15:18:24.898] W <mingo20>  (meta) : Engine Started
[2019-01-31 15:18:36.423] B <mingo20>    (in) : komi 6.5
[2019-01-31 15:18:36.636] B <mingo20>   (err) : 2019-01-31 15:18:36.637000: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
[2019-01-31 15:18:36.683] B <mingo20>   (err) : I0131 15:18:36.643000  8460 dual_net.py:144] TPU inference is supported on C++ only. DualNetwork will ignore use_tpu=True
[2019-01-31 15:18:40.648] B <mingo20>   (err) : I0131 15:18:40.651000  8460 tf_logging.py:115] Restoring parameters from models\v15-001008
[2019-01-31 15:18:41.320] B <mingo20>   (err) : GTP engine ready
[2019-01-31 15:18:41.322] B <mingo20>   (err) : 
[2019-01-31 15:18:41.345] B <mingo20>   (out) : = Minigo-v15-001008
[2019-01-31 15:18:41.347] B <mingo20>   (out) : 
[2019-01-31 15:18:41.347] B <mingo20>   (out) : = 0.2
[2019-01-31 15:18:41.349] B <mingo20>   (out) : 
[2019-01-31 15:18:41.349] B <mingo20>   (out) : = 2
[2019-01-31 15:18:41.350] B <mingo20>   (out) : 
[2019-01-31 15:18:41.392] B <mingo20>    (in) : boardsize 19
[2019-01-31 15:18:41.419] B <mingo20>   (out) : =
[2019-01-31 15:18:41.420] B <mingo20>   (out) : 
[2019-01-31 15:18:41.443] B <mingo20>    (in) : clear_board
[2019-01-31 15:18:41.472] B <mingo20>   (out) : =
[2019-01-31 15:18:41.473] B <mingo20>   (out) : 
[2019-01-31 15:18:41.501] B <mingo20>    (in) : undefined B 100
[2019-01-31 15:18:41.534] B <mingo20>   (out) : ? unknown command
[2019-01-31 15:18:41.535] B <mingo20>   (out) : 
[2019-01-31 15:19:01.998] B <mingo20>    (in) : clear_board
[2019-01-31 15:19:02.086] B <mingo20>   (out) : =
[2019-01-31 15:19:02.088] B <mingo20>   (out) : 
[2019-01-31 15:19:02.139] B <mingo20>    (in) : undefined B 100
[2019-01-31 15:19:02.198] B <mingo20>   (out) : ? unknown command
[2019-01-31 15:19:02.200] B <mingo20>   (out) : 
[2019-01-31 15:29:23.596] B <mingo20>    (in) : quit

There's a undefined command,

Phoenixgo problems look like as follows:

[2019-01-31 15:43:20.480] W <PhoenixGo>    (in) : name
[2019-01-31 15:43:20.486] W <PhoenixGo>    (in) : version
[2019-01-31 15:43:20.489] W <PhoenixGo>    (in) : protocol_version
[2019-01-31 15:43:20.491] W <PhoenixGo>    (in) : list_commands
[2019-01-31 15:43:20.493] W <PhoenixGo>  (meta) : Engine Started
[2019-01-31 15:43:20.585] W <PhoenixGo>   (err) : use config file 'etc\mcts_cpu.conf' 
[2019-01-31 15:43:20.588] W <PhoenixGo>   (err) : log to E:\experiment\PhoenixGo-cpuonly\log 
[2019-01-31 15:43:20.650] W <PhoenixGo>   (err) : start mcts_main 
[2019-01-31 15:43:20.785] W <PhoenixGo>   (err) : 2019-01-31 15:43:20.785000: I model\zero_model.cc:72] Read checkpoint state succ
[2019-01-31 15:43:20.815] W <PhoenixGo>   (err) : 2019-01-31 15:43:20.802000: I model\zero_model.cc:80] Read meta graph succ
[2019-01-31 15:43:20.817] W <PhoenixGo>   (err) : 2019-01-31 15:43:20.803000: I E:\Tensorflow\PhoenixGo\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
[2019-01-31 15:43:20.817] W <PhoenixGo>   (err) : 2019-01-31 15:43:20.806000: I model\zero_model.cc:100] Create session succ
[2019-01-31 15:43:20.879] W <PhoenixGo>   (err) : 2019-01-31 15:43:20.880000: I model\zero_model.cc:107] Create graph succ
[2019-01-31 15:43:21.502] W <PhoenixGo>   (err) : 2019-01-31 15:43:21.503000: I model\zero_model.cc:119] Load checkpoint succ
[2019-01-31 15:43:22.906] W <PhoenixGo>   (out) : = PhoenixGo
[2019-01-31 15:43:22.909] W <PhoenixGo>   (out) : 
[2019-01-31 15:43:22.925] W <PhoenixGo>   (out) : = 1.0
[2019-01-31 15:43:22.926] W <PhoenixGo>   (out) : 
[2019-01-31 15:43:22.928] W <PhoenixGo>   (out) : = 2
[2019-01-31 15:43:22.928] W <PhoenixGo>   (out) : 
[2019-01-31 15:43:22.929] W <PhoenixGo>   (out) : = name
[2019-01-31 15:43:22.930] W <PhoenixGo>   (out) : version
[2019-01-31 15:43:22.930] W <PhoenixGo>   (out) : protocol_version
[2019-01-31 15:43:22.930] W <PhoenixGo>   (out) : list_commands
[2019-01-31 15:43:22.931] W <PhoenixGo>   (out) : quit
[2019-01-31 15:43:22.931] W <PhoenixGo>   (out) : clear_board
[2019-01-31 15:43:22.933] W <PhoenixGo>   (out) : boardsize
[2019-01-31 15:43:22.933] W <PhoenixGo>   (out) : komi
[2019-01-31 15:43:22.934] W <PhoenixGo>   (out) : time_settings
[2019-01-31 15:43:22.934] W <PhoenixGo>   (out) : time_left
[2019-01-31 15:43:22.934] W <PhoenixGo>   (out) : place_free_handicap
[2019-01-31 15:43:22.935] W <PhoenixGo>   (out) : set_free_handicap
[2019-01-31 15:43:22.936] W <PhoenixGo>   (out) : play
[2019-01-31 15:43:22.936] W <PhoenixGo>   (out) : genmove
[2019-01-31 15:43:22.937] W <PhoenixGo>   (out) : final_score
[2019-01-31 15:43:22.947] W <PhoenixGo>   (out) : get_debug_info
[2019-01-31 15:43:22.948] W <PhoenixGo>   (out) : get_last_move_debug_info
[2019-01-31 15:43:22.949] W <PhoenixGo>   (out) : 
[2019-01-31 15:43:28.981] W <PhoenixGo>    (in) : komi 6.5
[2019-01-31 15:43:29.122] W <PhoenixGo>   (out) : ? unacceptable komi
[2019-01-31 15:43:29.122] W <PhoenixGo>   (out) : 
[2019-01-31 15:43:32.033] B <PhoenixGo>    (in) : komi 6.5
[2019-01-31 15:43:32.216] B <PhoenixGo>   (out) : ? unacceptable komi
[2019-01-31 15:43:32.217] B <PhoenixGo>   (out) : 
[2019-01-31 15:43:35.355] B <PhoenixGo>    (in) : quit
[2019-01-31 15:43:35.400] W <PhoenixGo>   (out) : =
[2019-01-31 15:43:35.401] W <PhoenixGo>   (out) : 

genmove command is replaced by komi 6.5

I don't know why these unknown commands appear, and how to solve the problems.

kinggozhang commented 5 years ago

However, PhonexGo works well in my side.

loverofvenus commented 5 years ago

I changed version from latest 0.42.0 to 0.33.4, and minigo works fine, but PhonexGo still doesn't work.

loverofvenus commented 5 years ago

However, PhonexGo works well in my side.

which version of sabaki do you use? 0.42.0 ?

yishn commented 5 years ago

So, if I look at the logs it seems like minigo ignored the list_commands command which every engine should have. This is why Sabaki can't detect the genmove command. This can be fixed by defaulting to genmove if list_commands fails. But this seems like a minigo bug as well, so please open an issue on their repository.

On PhoenixGo's side, the error message seems clear: PhoenixGo doesn't support 6.5 komi. That's why Sabaki aborts engine move generation. I'm wondering what komi PhoenixGo does support? Just change the komi of your game to fix that.

loverofvenus commented 5 years ago

komi

Thanks~I solve the problems both. Phoenix go is indeed the komi version problem. Thank you again.