pasky / pachi

A fairly strong Go/Baduk/Weiqi playing program
http://pachi.or.cz/
GNU General Public License v2.0
505 stars 117 forks source link

Pachi can not be set as Analyser in Sabaki,or it would display bad argument. #134

Closed Saturday-morning closed 4 years ago

Saturday-morning commented 4 years ago
pachi> name 
= Pachi
pachi> version 
= 12.45
pachi> protocol_version 
= 2
pachi> list_commands 
= protocol_version
name
echo
version
(and a lot of commands)
Pachi 12.45 (Jowa)
git 74f57b47 (master)
i686 dcnn build, Apr  8 2020  
Random seed: 1588185465
Scoring: using mcts (possibly inaccurate)
Loaded Darkforest dcnn for 19x19
Loaded spatial dictionary of 18016 patterns.
Loaded 18101 gammas.
Checking gammas ... OK
Threads: 2

#when I chick analyze, or push F4:
IN: name
IN: version
IN: protocol_version
IN: list_commands
pachi> komi 7.5
= IN: komi 7.5
pachi> boardsize 19
= IN: boardsize 19
pachi> clear_board 
= IN: clear_board
○ pachi> lz-analyze B 50
? bad argument
IN: lz-analyze B 50

(Windows10,sabaki ia32 portable and pachi) When I set Pachi as an analyzer, Sabaki puts" the bad arguement",except this is nothing. However, when I set Pachi as the analyzer and the white go player at the same time, the heat map and the win rate curve can be successfully displayed, but when the Pachi calculation is completed, the heat map will disappear and "the bad arguement" is displayed. Is this is a problem,or normal?The issue is belong to Pachi or Sabaki? …… (My English is not well,so this is form google translate,and I edit it.) 图片 Looking for help… Thanks.

lemonsqueeze commented 4 years ago

Hi, Looks like Sabaki is getting confused because it's getting both Pachi output and debug messages mixed up. Pachi answers gtp commands on standard output and uses standard error for logging by default. Normally Sabaki should ignore standard error. Depending on how you run Pachi, i guess it's also possible something in between is causing both channels to merge which would confuse Sabaki just the same.

As a workaround you can pass -o pachi.log option to Pachi to log to a file instead, or -d 0 to suppress logging altogether.

Saturday-morning commented 4 years ago

图片 图片 图片

IN: protocol_version pachi> clear_board = ○ pachi> play B D4 = IN: clear_board IN: play B D4 ● pachi> lz-analyze W 50 ? bad argument IN: lz-analyze W 50


Is Sabaki read this output and stop,or Pachi did not running?
I think Pachi supports `lz-genmove_analyze W 50` perfectly,but the sopport (or compatibility?) to `lz-analyze W 50` may need some fixes.
But I don't know the problem is just on my computer or not…I will try more later[windows/linux,ia 32/64(about 11 days later),sabaki portable/install(maybe tomorrow)].
When use `lz-analyze W 50`,The `bad arguement` will as an output.(although use option)
Thanks.
lemonsqueeze commented 4 years ago

You're right, the problem is Pachi doesn't know lz-analyze W 50 syntax, only lz-analyze 50 syntax is supported right now. Fortunately this is easy to fix. Could you try this pachi.exe, see if it works for you ?

Saturday-morning commented 4 years ago

Sure,and the bad arguement has disappeared. 图片

Although now it has not the the heat map and the win rate curve,next picture shows that Pachi keeps running.

图片

图片

and…Below may be the syntax https://github.com/SabakiHQ/Sabaki/blob/master/docs/guides/engine-analysis-integration.md

lemonsqueeze commented 4 years ago

Ok, i see it too. There was a newline issue which was confusing Sabaki.

If you try this pachi.exe heat map should work now when you toggle analysis. You can toggle analysis on and off, as long as tree memory limit is not reached it should be ok.

There is still the issue that if tree memory limit is reached Pachi stops but Sabaki keeps waiting forever and you have to detach and reattach the engine. Not sure why this is happening, i'd suggest using a big enough max_tree_size so that it doesn't happen for now =)

I haven't found a way to get heat map output during genmove with either Leela-Zero or Pachi. Have you ?

lemonsqueeze commented 4 years ago

By the way looks like there is a typo in your command line:

-t =10000:35000 --fuseki-time =8000 resign_threshold=0.20 threads=2,max_tree_size=320,pondering

should be:

-t =10000:35000 --fuseki-time =8000 resign_threshold=0.20,threads=2,max_tree_size=320,pondering

It should give an error really, because of space only resign_threshold=0.20 part is used !

Saturday-morning commented 4 years ago

图片 (now change the typo... 图片

图片 Success.


Is the following heat map output?( But I don't get it from Sabaki.I get it from a GTP shell,which belongs to FoxFTP.exe,which is only running on Windows.)

desired 9.00, worst 10.00, clock [1] 0.00 + 10.00/1*1, lag 2.00

mcowner 0.13s

dcnn in 0.22s

dcnn = [ Q16 C16 D16 Q17 D17 R16 Q14 K10 C15 P17 R17 Q4  E17 C17 Q3  R15 P15 P16 Q15 D15 ]

       [ 30  23  19  11  3   2   1   1   0   0   0   0   0   0   0   0   0   0   0   0   ]

info move Q16 visits 978 winrate 4959 prior 10000 order 0 pv Q16 O17 R14 info move D16 visits 873 winrate 5120 prior 8438 order 1 pv D16 Q16 Q4 O3 info move C16 visits 837 winrate 5161 prior 8415 order 2 pv C16 Q3 Q5 

info move Q16 visits 1653 winrate 5021 prior 10000 order 0 pv Q16 D17 D15 C15 C14 C16 info move D16 visits 1382 winrate 5057 prior 8438 order 1 pv D16 Q16 Q4 O3 info move C16 visits 1366 winrate 5109 prior 8415 order 2 pv C16 Q3 Q5 

info move Q16 visits 1943 winrate 4981 prior 10000 order 0 pv Q16 D16 F17 C14 Q4 info move D16 visits 1901 winrate 5092 prior 8438 order 1 pv D16 Q16 Q4 R6 info move C16 visits 1667 winrate 5122 prior 8415 order 2 pv C16 E16 E17 F17 D17 G16 info move Q17 visits 644 winrate 5201 prior 6258 order 3 pv Q17 D16 C14 F17 

info move D16 visits 3433 winrate 5083 prior 8438 order 0 pv D16 Q16 Q4 R6 O3 info move Q16 visits 3394 winrate 5008 prior 10000 order 1 pv Q16 D16 F17 C14 Q4 info move C16 visits 3165 winrate 5134 prior 8415 order 2 pv C16 Q17 Q3 Q5 R5 R6 info move Q17 visits 1149 winrate 5178 prior 6258 order 3 pv Q17 D16 C14 F17 

info move Q16 visits 5356 winrate 5067 prior 10000 order 0 pv Q16 D16 Q3 Q5 R7 R3 R2 R4 N3 info move C16 visits 4536 winrate 5110 prior 8415 order 1 pv C16 Q17 Q3 Q5 R5 R6 R4 info move D16 visits 4503 winrate 5058 prior 8438 order 2 pv D16 Q3 Q16 O17 R14 info move Q17 visits 1563 winrate 5060 prior 6258 order 3 pv Q17 D16 C14 F17 B16 C17 

(avg score -1.569023/19833; dynkomi's -1.569023/19833 value 0.490445/19833)

*** WINNER is Q16 with score 0.5052 (5697/19831:19831/19833 games), extra komi 0.000000

genmove in 8.77s, mcts 8.42s (2354 games/s, 1177 games/s/thread)

info move Q16 visits 5697 winrate 5051 prior 10000 order 0 pv Q16 D16 Q3 Q5 R7 R3 R2 R4 N3 info move D16 visits 5623 winrate 5093 prior 8438 order 1 pv D16 Q3 Q17 R15 info move C16 visits 5124 winrate 5117 prior 8415 order 2 pv C16 Q17 Q3 Q5 R5 R6 R4 info move Q17 visits 3309 winrate 5161 prior 6258 order 3 pv Q17 D16 C14 F17 B16 C17 

tree pruned in 0.016s, prev 0.0s ago, dest depth 13 wanted 3, size 34294800->9766240/62914560, playouts 5697
lemonsqueeze commented 4 years ago

Yes, info move ... lines are the heat map output. Sabaki hides them but you see them if you run Pachi directly. I fixed a few other issues, I'll make a new release soon. Thanks for helping with this

lemonsqueeze commented 4 years ago

Pachi 12.50 is released. Please let me know if you see issues with it.

Saturday-morning commented 4 years ago

5 24


And I found a new way to find out the heat map output.Using Go Review Partner 0.15 5 24-2 Put the test icon.There will be a window where can input gtp command,so just input lz-analyze W 50 in it.(This way does not depends on windows.)

Saturday-morning commented 4 years ago

帕奇12.50已经发布,问题应该已经被解决了,新的特性已经出现。此时最好的做法还是关闭这个issue。另外当然得说一句,感谢开发者,感谢大家。