zakki / Ray

Computer Go Program. Download:https://github.com/zakki/Ray/releases
BSD 2-Clause "Simplified" License
149 stars 58 forks source link

Seki #64

Open nikoryu opened 7 years ago

nikoryu commented 7 years ago

Maybe this is a known issue, but I noticed that Rayon 4.2.5 fails to recognise seki (please see the attached sgf files). More specifically, in 2 out of 50 games played against Leela on my PC, Rayon got seki completely wrong where Leela recognised it. Leela did not completely understand the situation, either, judging from its score estimation, but at least it recognised that the group was alive. (BTW, The 50 game match ended in Rayon 27 - 23 Leela, after counting the above two games as Leela's victories) I do not know if this can be fixed easily, but I just wanted to let you know. Thanks for making this great Go program public.

0_23.sgf.txt 0_31.sgf.txt

zakki commented 7 years ago

Ray (and Rn) can detect seki that has 6 or more stones or that outer liberties is filled. https://github.com/zakki/Ray/blob/nn/src/Seki.cpp#L29

@koban6 0_23.sgf: Liberty is shared by two opponent white string, but it's seki https://github.com/zakki/Ray/blob/nn/src/Seki.cpp#L93 image

0_31.sgf: E_NOT_EYE check seems too strict https://github.com/zakki/Ray/blob/nn/src/Seki.cpp#L105 image

nikoryu commented 7 years ago

OK, so the functions to detect seki are not always working properly.. I was a bit surprised that Seki.cpp does not use Nakade related functions at all, because that is how human players would recognize seki in those cases. In both cases above, if black fills in one liberty inside and white captures, the removed area will not be nakade; on the other hand, if white fills in one liberty inside, the removed area will become nakade. So black and white are in stalemate, which is seki. Maybe you guys can improve the seki detection functions using nakade related functions in Nakade.cpp? Just a quick thought from a programming novice..