facebookresearch / darkforestGo

DarkForest, the Facebook Go engine.
Other
2.1k stars 325 forks source link

Can darkforest return genmove in only one commands ? #25

Open teddy960370 opened 7 years ago

teddy960370 commented 7 years ago

I have a project to use PHP to control darkforest in my website . My algorithm is let darkforest load the last game's sgf file and return the AI genmove result ex: th cnnPlayerMCTSV2.lua --num_gpu 1 --pipe_path /home/bio1607b/darkforestGo/local_evaluator --setup_board "/home/bio1607b/darkforestGo/sgfs/alphago_leesedol_1.sgf 12" but i don't know how to let darkforest return the result which it move .

I need help !!

hiarcs commented 7 years ago

"extract_win_rate xxx.sgf" for entire game, or use "run_cmds your_cmds_file". Put 'set_board' and 'g' in your cmds file will do.

hiarcs commented 7 years ago

And can I ask what gpu you use, how many rollouts per second you get?

teddy960370 commented 7 years ago

Can you detailed descript what is the 'g' and 'run_cmds' ? I didn't see those commands in cnnPlayerMCTSV2.lua file .

I used Nvidia GTX 980ti to run this . and rollout is default 1000 in darkforest . Thanks a lot .

hiarcs commented 7 years ago

Let's say you have a file /path/dfcmds: setup_board /path/1.sgf g then, you can type run_cmds /path/dfcmds in darkforest, or, you can launch it with dfcmds as: th cnnPlayerMCTSV2.lua --exec /path/dfcmds

Btw, g, is a shortcut for 'genmove current_player', and you should check 'cnnPlayerV2Framework.lua' instead cnnPlayerMCTSV2.

And I guess 'peek' would be better, if you try to analyze your game.

teddy960370 commented 7 years ago

Thanks a lot The problem has been solved