pnprog / goreviewpartner

A tool to help analyse and review your game of go (weiqi, baduk) using strong bots.
GNU General Public License v3.0
285 stars 66 forks source link

Sometimes in some variations, a player plays on the position where a stone is already there. #29

Closed liverex closed 6 years ago

liverex commented 6 years ago

Please try the attached rsgf file which I generated. At Variation A of step 94/263, black 2 is at L18 where a black stone is already over there. I'm using the latest code. grp

liverex commented 6 years ago

(;FF[4]AP[Sabaki:0.33.1]BOT[Leela Zero]BOTV[0.12]BR[18级]CA[UTF-8] DT[2018-03-08]GM[1]KM[6.5]PB[zip12345]PW[moya11]RE[B+0] RSGF[Analysis by GoReviewPartner Bot: Leela Zero/0.12 Komi: 6.5 Intervals: 90-100 (both colors) ] SZ[19]WR[18级];B[pp];W[cd];B[dp];W[pc];B[jp];W[qe];B[ed];W[hd];B[dg];W[ee]; B[fe];W[ef];B[dd];W[cf];B[de];W[df];B[ce];W[cc];B[bd];W[eb];B[fc];W[fb];B[ff]; W[eg];B[bf];W[fg];B[gg];W[gh];B[gc];W[bc];B[hh];W[gf];B[hg];W[ge];B[fd];W[ch]; B[cg];W[dh];B[bg];W[ei];B[gi];W[cn];B[fh];W[eh];B[hc];W[id];B[ic];W[kd];B[jd]; W[je];B[jc];W[if];B[ke];W[kf];B[le];W[ld];B[md];W[me];B[lf];W[mc];B[nd];W[lg]; B[mf];W[mg];B[nf];W[lb];B[nc];W[nb];B[ob];W[kg];B[hf];W[he];B[gd];W[ie];B[ig]; W[jf];B[ng];W[mi];B[nh];W[lj];B[gl];W[fj];B[hk];W[gj];B[hj];W[ii];B[hi];W[pb]; Blc(;B[fm]PLYO[585] PNV[70.47%]VNWR[90.42%/9.58%];W[ck];B[cl];W[bl];B[bm];W[bk];B[bn];W[el];B[dk]; W[dj];B[ek];W[bh];B[kb];W[oj];B[mk])(;B[dj]PLYO[85]PNV[12.77%] VNWR[89.36%/10.64%];W[fm];B[dn];W[gn];B[gp];W[in];B[jl];W[km])(;B[ck]PLYO[48] PNV[7.53%]VNWR[89.34%/10.66%];W[fm];B[dn];W[gm];B[hm];W[hn];B[im];W[go];B[in]; W[kc];B[kb])(;B[mh]PLYO[15]PNV[1.36%]VNWR[90.65%/9.35%];W[lh];B[fm];W[ck];B[cl] )(;B[ek]PLYO[14]PNV[1.59%]VNWR[90.28%/9.72%];W[fk];B[fm];W[ck];B[cl];W[bl]; B[bm];W[bk];B[bn])(;B[em]PLYO[10]PNV[2.34%]VNWR[86.99%/13.01%];W[ck];B[cl]; W[bl];B[bm];W[bk]))(;PLYO[704]PNV[47.50%]VNWR[87.42%/12.58%]W[ck];B[cl];W[bl]; B[bm];W[bk];B[bn];W[bh];B[kb];W[oj];B[ek];W[dk];B[mk];W[ni])(;PLYO[41] PNV[10.80%]VNWR[91.99%/8.01%]W[cl];B[ck];W[dk];B[cj];W[dj];B[bl];W[cm];B[el])(; PLYO[27]PNV[9.35%]VNWR[94.08%/5.92%]W[el];B[dm];W[ck];B[bl];W[dk];B[em])(; PLYO[22]PNV[8.56%]VNWR[94.84%/5.16%]W[bk];B[ck];W[bl];B[cj];W[bj])(;PLYO[18] PNV[6.71%]VNWR[94.24%/5.76%]W[kc];B[ck];W[oj];B[pf];W[oe];B[pe])(;PLYO[17] PNV[5.74%]VNWR[93.43%/6.57%]W[fl];B[fm];W[el];B[em];W[dk];B[ck];W[cl];B[dm]; W[bk])(;PLYO[16]PNV[2.65%]VNWR[89.88%/10.12%]W[ad];B[be];W[ck];B[cl];W[bl]; B[bm];W[bk];B[bn];W[bh];B[kb])(;PLYO[12]PNV[3.65%]VNWR[92.79%/7.21%]W[dk];B[cl] ;W[ck];B[bl];W[el]))(;B[cl]PLYO[552]PNV[19.49%]VNWR[90.60%/9.4%];W[dl];B[dm]; W[ck];B[cm];W[bk];B[el];W[dk];B[bh])(;B[ck]PLYO[537]PNV[35.28%] VNWR[89.61%/10.39%];W[dl];B[cl];W[dm];B[dj];W[fl];B[fm];W[ek];B[bh];W[ci];B[bi] ;W[cj];B[bj])(;B[dl]PLYO[244]PNV[14.31%]VNWR[89.86%/10.14%];W[ck];B[cl];W[bl]; B[bm];W[bk];B[bn];W[bh];B[ek];W[dk];B[oj];W[ml];B[ol];W[km])(;B[dk]PLYO[121] PNV[4.23%]VNWR[90.58%/9.42%];W[fl];B[dm];W[fm];B[gn];W[bk];B[bl];W[cl];B[ck])(; B[bq]PLYO[72]PNV[8.83%]VNWR[87.73%/12.27%];W[br];B[ck];W[dl];B[cl];W[dm];B[dj]; W[fl])(;B[oc]PLYO[63]PNV[4.29%]VNWR[89.46%/10.54%];W[oa];B[ck];W[dl];B[cl]; W[dm];B[dj];W[fl];B[fm])(;B[mh]PLYO[38]PNV[3.09%]VNWR[88.88%/11.12%];W[lh]; B[ki];W[li];B[oj];W[kc];B[kb];W[lc];B[ck])(;B[oj]PLYO[26]PNV[2.20%] VNWR[88.20%/11.8%];W[dl];B[gp];W[ll];B[gq])(;B[mk]PLYO[8]PNV[1.50%] VNWR[86.08%/13.92%];W[lk];B[ml];W[ll];B[lm])(;B[nj]PLYO[7]PNV[1.32%] VNWR[85.78%/14.22%];W[ll];B[nl];W[dl];B[gp];W[kc]))(;PLYO[534]PNV[2.74%] VNWR[84.6%/15.40%]W[ck];B[oc];W[oa];B[kb];W[dq];B[gp];W[gq];B[hp];W[oj];B[mk]; W[ni];B[pl])(;PLYO[350]PNV[79.56%]VNWR[90.63%/9.37%]W[dq];B[ck];W[dl];B[cl]; W[dm];B[dj];W[fl];B[fm];W[ek];B[bh];W[fn];B[en])(;PLYO[104]PNV[6.23%] VNWR[86.37%/13.63%]W[dl];B[dq];W[kc];B[kb];W[lc];B[bh];W[bi];B[bj];W[ci];B[ai]; W[ck];B[bl])(;PLYO[61]PNV[5.18%]VNWR[87.02%/12.98%]W[kc];B[kb];W[lc];B[ck]; W[dl];B[cl];W[dm];B[bh];W[fm]))(;B[dq]PLYO[451]PNV[53.21%]VNWR[91.06%/8.94%]; W[cp];B[dl];W[ck];B[cl];W[bl];B[bm];W[bk];B[cm];W[kc];B[kb];W[lc];B[bi];W[bh]; B[ah])(;B[cl]PLYO[121]PNV[3.94%]VNWR[93.27%/6.73%];W[dl];B[dk];W[ek];B[dm]; W[el];B[cm];W[ck];B[bk];W[dj];B[dq])(;B[dl]PLYO[73]PNV[8.87%]VNWR[90.60%/9.4%]; W[ck];B[cl];W[bl];B[bm];W[bk];B[dq];W[cp];B[cm];W[bn];B[dn];W[am])(;B[ck] PLYO[61]PNV[8.21%]VNWR[90.54%/9.46%];W[dl];B[dj];W[fl];B[fm];W[el];B[bh];W[ci]) (;B[mh]PLYO[55]PNV[3.05%]VNWR[92.54%/7.46%];W[lh];B[dq];W[cp];B[dm];W[cm];B[dl] ;W[ck];B[nj])(;B[er]PLYO[45]PNV[4.08%]VNWR[91.39%/8.61%];W[cp];B[dm];W[cl]; B[cm];W[bm];B[bn];W[bo])(;B[cp]PLYO[38]PNV[2.92%]VNWR[92.02%/7.98%];W[dq];B[ck] ;W[dl];B[cl];W[dm];B[dj];W[fl];B[fm];W[ek])(;B[oc]PLYO[36]PNV[6.08%] VNWR[89.92%/10.08%];W[oa];B[dq];W[cp];B[dm];W[kc];B[kb];W[lc])(;B[oj]PLYO[33] PNV[2.67%]VNWR[91.99%/8.01%];W[ll];B[dq];W[cp];B[dm];W[ck];B[cm];W[dr])(;B[mk] PLYO[6]PNV[1.14%]VNWR[89.86%/10.14%];W[lk];B[ml];W[ll];B[lm])(;B[nj]PLYO[6] PNV[1.30%]VNWR[89.10%/10.9%];W[ll];B[dq];W[cp]))(;PLYO[550]PNV[9.68%] VNWR[83.65%/16.35%]W[kc];B[kb];W[lc];B[ck];W[dl];B[bh];W[dk];B[cj];W[fn];B[dj]; W[fl])(;PLYO[381]PNV[47.61%]VNWR[86.34%/13.66%]W[dl];B[oc];W[oa];B[kb];W[oj]; B[mk];W[ni];B[kl];W[pl])(;PLYO[31]PNV[5.84%]VNWR[88.01%/11.99%]W[ck];B[dm]; W[cm];B[dl];W[cl];B[bh];W[bi])(;PLYO[25]PNV[6.50%]VNWR[89.82%/10.18%]W[em]; B[oc];W[oa];B[kb];W[fn];B[gp];W[hn])(;PLYO[23]PNV[10.27%]VNWR[94.43%/5.57%] W[cq];B[dq];W[cp];B[dm];W[cm];B[dl];W[bk];B[oj];W[ll])(;PLYO[20]PNV[6.52%] VNWR[91.58%/8.42%]W[fm];B[fl];W[dl];B[em];W[el];B[dm])(;PLYO[11]PNV[3.03%] VNWR[89.9%/10.10%]W[cl];B[bh];W[bi];B[bj];W[ci];B[ai])(;PLYO[5]PNV[1.73%] VNWR[92.78%/7.22%]W[el];B[dm];W[cl];B[dl])(;PLYO[3]PNV[1.49%]VNWR[94.52%/5.48%] W[ad];B[be]))(;B[oc]PLYO[377]PNV[21.04%]VNWR[92.98%/7.02%];W[oa];B[dl];W[cl]; B[ck];W[dk];B[bj];W[el];B[dm];W[em])(;B[kb]PLYO[159]PNV[31.69%] VNWR[89.41%/10.59%];W[eo];B[dl];W[ck];B[cl];W[bl];B[bm];W[bk];B[cm];W[bn];B[an] ;W[ao];B[am];W[bp])(;B[dl]PLYO[150]PNV[10.95%]VNWR[92.74%/7.26%];W[ck];B[cl]; W[bl];B[bm];W[bk];B[cm];W[kc];B[kb];W[lc];B[bh];W[bi];B[ek];W[dj];B[ci];W[ai])( ;B[mh]PLYO[100]PNV[4.99%]VNWR[93.11%/6.89%];W[lh];B[ki];W[li];B[oj];W[kc];B[kb] ;W[lc];B[ll];W[ml])(;B[cl]PLYO[100]PNV[7.50%]VNWR[92.52%/7.48%];W[dl];B[dm]; W[cm];B[ck];W[dk];B[dj];W[ek])(;B[dm]PLYO[55]PNV[4.52%]VNWR[92.48%/7.52%];W[cl] ;B[cm];W[bm];B[dn];W[co];B[do];W[bk];B[cp];W[iq])(;B[fp]PLYO[16]PNV[4.57%] VNWR[87.54%/12.46%];W[gp];B[fo];W[kc];B[kb];W[lc];B[ck];W[dl];B[bh])(;B[eq] PLYO[15]PNV[3.39%]VNWR[88.16%/11.84%];W[dl];B[oc];W[oa];B[kb])(;B[oj]PLYO[14] PNV[1.04%]VNWR[92.17%/7.83%];W[eo];B[dl];W[ck];B[cl];W[bl])(;B[eo]PLYO[10] PNV[1.49%]VNWR[90.69%/9.31%];W[dl];B[oc];W[oa];B[kb];W[oj];B[mk];W[ni])(;B[ck] PLYO[7]PNV[1.35%]VNWR[90.03%/9.97%];W[dl];B[cl];W[dm];B[bh]))(;B[kb]PLYO[604] PNV[74.26%]VNWR[99.10%/0.9%];W[dl];B[oc];W[oa];B[dn];W[dm];B[co];W[en])(;B[oc] PLYO[91]PNV[9.02%]VNWR[99.16%/0.84%];W[oa];B[kb];W[dl];B[na];W[ma];B[nj];W[ll]; B[nl])(;B[dl]PLYO[45]PNV[3.65%]VNWR[99.59%/0.41%];W[kc];B[kb];W[lc];B[ck];W[oj] ;B[qg];W[qi];B[pe])(;B[mh]PLYO[19]PNV[2.39%]VNWR[98.66%/1.34%];W[lh];B[ki]; W[li];B[oj];W[kc];B[kb];W[lc])(;B[cl]PLYO[18]PNV[2.13%]VNWR[98.79%/1.21%];W[dl] ;B[dm];W[cm];B[ck];W[dk])(;B[ck]PLYO[11]PNV[1.52%]VNWR[98.50%/1.5%];W[dl];B[dj] ;W[fl];B[fm])(;B[kc]PLYO[11]PNV[1.64%]VNWR[98.24%/1.76%];W[dl];B[oc];W[oa]; B[ll];W[oj];B[mk])(;B[oj]PLYO[10]PNV[1.18%]VNWR[98.88%/1.12%];W[kc];B[kb];W[lc] ))(;PLYO[627]PNV[83.22%]VNWR[97.74%/2.26%]W[kc];B[kb];W[dl];B[bh];W[bi];B[bj]; W[ci];B[ai];W[ad];B[be];W[ck];B[co])(;PLYO[23]PNV[3.48%]VNWR[98.01%/1.99%]W[em] ;B[mb];W[kl];B[co];W[bn];B[fn])(;PLYO[18]PNV[3.30%]VNWR[98.73%/1.27%]W[dl]; B[mb];W[kl];B[ki];W[li])(;PLYO[12]PNV[2.09%]VNWR[98.49%/1.51%]W[el];B[dm];W[kc] ;B[kb];W[cl])(;PLYO[7]PNV[1.51%]VNWR[99.19%/0.81%]W[fl];B[fm];W[el];B[dn];W[dm] )(;PLYO[6]PNV[1.41%]VNWR[99.31%/0.69%]W[oj];B[mb];W[dl];B[mk]))

pnprog commented 6 years ago

Hi!

Thanks for reporting this issue, I just pushed a modification that should fix that.

In fact, yesterday, I post on L19 a message that was describing a strange behaviour by Leela and Leela Zero (full message there):

I also noticed some behaviour that may be a violation of the GTP protocol for Leela and Leela Zero: When they choose to resign, they create a move in their move history that requires to be undo if one want to go back in the game tree.

  • GnuGo does not consider "Resign" as a valid move.
  • GoGui also agrees with GnuGo interpretation of the standard.
  • Sabaki avoid this issue by replacing "undo" by "clearboard" and replaying the whole game up to the previous move.
  • Ray does not undo.
  • AQ undo command is broken at the moment (did not check for the previous version behaviour).

I think this is an area where the GTP protocol documentation is not clear enough. I did not opened an issue for this one, seems everybody has its work around. But clearly, this poses problem when using Leela/LeelaZero with Gogui.

Apparently this has been fixed since v0.9 (the version I was using). In your case, during the analysis, Leela Zero would have resign after black 91 at L18. Then when undoing Leela's answer to black 91 at L18 (so white 92 resign) I was in fact undoing black 91 because the new version of Leela Zero does not requires to undo a resign move. The whole analysis following 91 is wrong because Leela Zero believe there is no stone at L18.

Let me know if this problem happens again.

liverex commented 6 years ago

A new issue is found for the same sgf file. I will post the sgf file in the next comment.

I use the command to analyse as before: c:\tools\Python27\python.exe c:\rex\sgf\goreviewpartner-master\leela_zero_analysis.py --color=both --range=90-100 c:\rex\sgf\jn\2018030801.sgf

But there are only variations generated for odd moves(black player), I cannot find any variations for even moves(white player) except move 90.

Here is part of the running log:

============== move 90 leela Zero play white Number of alternative sequences: 6 ==== no more sequences ===== now asking Leela Zero to play the game move: white at n18 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 91 leela Zero play black Number of alternative sequences: 9 ==== no more sequences ===== now asking Leela Zero to play the game move: black at l18 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 92 leela Zero play white now asking Leela Zero to play the game move: white at f3 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 93 leela Zero play black Number of alternative sequences: 15 ==== no more sequences ===== now asking Leela Zero to play the game move: black at e5 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 94 leela Zero play white now asking Leela Zero to play the game move: white at c3 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 95 leela Zero play black Number of alternative sequences: 10 ==== no more sequences ===== now asking Leela Zero to play the game move: black at c4 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 96 leela Zero play white now asking Leela Zero to play the game move: white at d3 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 97 leela Zero play black Number of alternative sequences: 9 ==== no more sequences ===== now asking Leela Zero to play the game move: black at d8 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 98 leela Zero play white now asking Leela Zero to play the game move: white at f8 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 99 leela Zero play black Number of alternative sequences: 5 ==== no more sequences ===== now asking Leela Zero to play the game move: black at f7 Analysis for this move is completed Saving RSGF file c:\rex\sgf\jn\2018030801.rsgf

============== move 100 leela Zero play white now asking Leela Zero to play the game move: white at e8 Analysis for this move is completed

liverex commented 6 years ago

(;CA[UTF-8]FF[4]GM[1]SZ[19]PW[moya11]WR[18级]PB[zip12345]BR[18级]RE[B+0]KM[6.5]DT[2018-03-08]AP[Sabaki:0.33.1];B[pp];W[cd];B[dp];W[pc];B[jp];W[qe];B[ed];W[hd];B[dg];W[ee];B[fe];W[ef];B[dd];W[cf];B[de];W[df];B[ce];W[cc];B[bd];W[eb];B[fc];W[fb];B[ff];W[eg];B[bf];W[fg];B[gg];W[gh];B[gc];W[bc];B[hh];W[gf];B[hg];W[ge];B[fd];W[ch];B[cg];W[dh];B[bg];W[ei];B[gi];W[cn];B[fh];W[eh];B[hc];W[id];B[ic];W[kd];B[jd];W[je];B[jc];W[if];B[ke];W[kf];B[le];W[ld];B[md];W[me];B[lf];W[mc];B[nd];W[lg];B[mf];W[mg];B[nf];W[lb];B[nc];W[nb];B[ob];W[kg];B[hf];W[he];B[gd];W[ie];B[ig];W[jf];B[ng];W[mi];B[nh];W[lj];B[gl];W[fj];B[hk];W[gj];B[hj];W[ii];B[hi];W[pb];B[lc];W[mb];B[kb];W[fq];B[eo];W[cq];B[cp];W[dq];B[dl];W[fl];B[fm];W[el];B[em];W[dk];B[ck];W[cl];B[dm];W[cj];B[bk];W[bj];B[ek];W[dj];B[hq];W[ep];B[do];W[qq];B[pq];W[qp];B[po];W[qo];B[qn];W[rn];B[nj];W[ni];B[oi];W[nk];B[mh];W[lh];B[mj];W[li];B[lk];W[mk];B[oj];W[kk];B[ll];W[kl];B[km];W[lm];B[ml];W[mm];B[nl];W[jm];B[kn];W[il];B[fk];W[jn];B[ko];W[jo];B[kp];W[ip];B[iq];W[hp];B[jj];W[ij];B[ik];W[kj];B[jk];W[jl];B[hn];W[gq];B[io];W[ok];B[ol];W[hl];B[hm];W[gk];B[fi];W[ej];B[ji];W[pk];B[pl];W[qm];B[qk];W[ql];B[pj];W[pn];B[on];W[pr];B[or];W[qr];B[nq];W[ho];B[in];W[hr];B[ir];W[gr];B[fp];W[gp];B[eq];W[er];B[dc];W[ad];B[be];W[db];B[cm];W[bl];B[bm];W[ak];B[bq];W[br];B[bp];W[ds];B[qg];W[rf];B[oc];W[oa];B[pd];W[qd];B[na];W[ma];B[ka];W[na];B[rg];W[pa];B[qf];W[se];B[pe];W[fo];B[ep];W[gn];B[fn];W[go];B[gm];W[is];B[jr];W[js];B[ks];W[hs];B[kr];W[aq];B[ar];W[bs];B[ap];W[rk];B[rj];W[rl];B[sj];W[gb];B[ae];W[ac];B[hb];W[ha];B[ia];W[ga];B[bh];W[bi];B[pm];W[am];B[an];W[al];B[sk];W[sl];B[qn];W[sn];B[rc];W[rd];B[qc];W[rb];B[sg];W[sf];B[sb];W[qb];B[sc];W[ra];B[la])

pnprog commented 6 years ago

My guess is that Leela Zero want to resign as white for every moves from 92 to 100. Does the RSGF file says something like this in the lest side comment box?

Move XXX White to play, in the game, white played YYY For this position, Leela Zero would play: resign

I plan to modify the code so that the variations are available even if Leela Zero wants to resign. In the mean time, I seem to remember there is a command line parameter for Leela Zero to change the resig threshold, maybe it's -r ?

pnprog commented 6 years ago

Hi!

I just went ahead and modified the code so that the variations are saved even when Leela/LeelaZero wants to resign.

Please have a try and let me know :)

liverex commented 6 years ago

Thank you very much for your fix.