aki65 / aki65.github.io

69 stars 12 forks source link

bug in Ko play #104

Closed bltoby closed 9 months ago

bltoby commented 11 months ago

With the latest release when it cames to ko play, sometimes the software will suggest you to capture back opponent's stone immediately without finding a ko threat.

This bug should be fixed. Thanks.

aki65 commented 10 months ago

I couldn't reproduce that. Could you please post a position where that happens ?

bltoby commented 10 months ago

I can't reproduce the bug for sure either. Even with the same sgf or at the same position, when I restart BadukAI, the bug can disappear by itself.

But I noticed this bug will mostly come up (with about 20 percent possibility) when during longer analysing.

aki65 commented 10 months ago

Nevertheless, if you encounter the problem the next time, please post a screenshot with the wrong suggested move and save the sgf and post it. Even a position, where it may happen, would possibly help.

bltoby commented 10 months ago

Some follow up Info

The last release without this bug is 1.18.12

With any sgf, that includes ko plays, can this bug be reproduced at the chance of about 50%.

But under the following condition: The ko plays should occur relatively late, because only that can assure BadukAI has been analyzing the sgf for a longer time.

Can't upload attachment with Smartphone, Just copied the kifu in txt form. Ko play from move 244 to 274. Remember to analyze the whole game from the beginning for at least 2000v per move. The bug will come and go, meaning when it occurred, move backwards and then forward, it will disappear by itself.

( ;B[pd]TL[0,0];W[dp]TL[0,0];B[pq]TL[0,0];W[dc]TL[0,0] ;B[ce]TL[0,0];W[ed]TL[0,0];B[ch]TL[0,0];W[qo]TL[0,0] ;B[qm]TL[0,0];W[op]TL[0,0];B[mq]TL[0,0];W[oq]TL[0,0] ;B[or]TL[0,0];W[nr]TL[0,0];B[pr]TL[0,0];W[nq]TL[0,0] ;B[pp]TL[0,0];W[po]TL[0,0];B[oo]TL[0,0];W[no]TL[0,0] ;B[on]TL[0,0];W[rq]TL[0,0];B[mr]TL[0,0];W[os]TL[0,0] ;B[mp]TL[0,0];W[np]TL[0,0];B[mm]TL[0,0];W[ms]TL[0,0] ;B[kr]TL[0,0];W[mo]TL[0,0];B[ls]TL[0,0];W[lo]TL[0,0] ;B[ns]TL[0,0];W[pm]TL[0,0];B[pn]TL[0,0];W[ms]TL[0,0] ;B[qp]TL[0,0];W[ro]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0];B[fj]TL[0,0];W[cs]TL[0,0] ;B[fk]TL[0,0];W[fl]TL[0,0];B[eo]TL[0,0];W[do]TL[0,0] ;B[ds]TL[0,0];W[ho]TL[0,0];B[in]TL[0,0];W[hl]TL[0,0] ;B[ss]TL[0,0];W[ri]TL[0,0];B[si]TL[0,0];W[rs]TL[0,0] ;B[cl]TL[0,0];W[ck]TL[0,0];B[ss]TL[0,0];W[tt]TL[0,0] ;B[hf]TL[0,0];W[fe]TL[0,0];B[rs]TL[0,0];W[tt]TL[0,0] ;B[fi]TL[0,0];W[nm]TL[0,0];B[rf]TL[0,0];W[rl]TL[0,0] ;B[sf]TL[0,0];W[rh]TL[0,0];B[tt]TL[0,0];W[jg]TL[0,0] ;B[jh]TL[0,0];W[kg]TL[0,0];B[ii]TL[0,0];W[tt]TL[0,0] ;B[tt]TL[0,0] )

aki65 commented 10 months ago

Thank you very much for all the additional information. I did the following: load 18b network s740... load your kifu set visits/move to 2000 tap "analyse all" and let it run until the end of the game.

Although I repeated this test 8 times, the bug never occured. What are you doing differently ?

bltoby commented 9 months ago

bug.sgf.txt

finally I could reproduce the bug with the uploaded sgf file. (remember to delete the.txt)

Load the sgf to BadukAI, press 'ponder', AI will suggest black to play at f12, then play at f12. Now AI will suggest white to play at f13 to capture back directly. That's the bug.

Repeat the process, if you didn't reproduce the bug at the first try.

aki65 commented 9 months ago

Thank you very much for reproducing the issue. I fixed it in https://github.com/aki65/aki65.github.io/releases/tag/v1.19.4 (at least it doesn't occur anymore on my device).