[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Patch arend_1_14.2 -- Missing endgame pattern
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] Patch arend_1_14.2 -- Missing endgame pattern |
Date: |
Mon, 12 Nov 2001 17:56:51 +0100 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode) |
Arend wrote:
> Here is a basic endgame pattern that I found to be missing. I also added
> the test where it is necessary. Should be very precise with the
> constraints.
Good timing. I was just about to add two test cases from a recent NNGS
game, one of which I think exactly shows the lack of this pattern. The
patch below adds the two test cases, which I've also added to CVS.
> New file: (Don't know how to do that with cvs)
Usually the solution is to use "cvs add" to add the file to the
repository, then do "cvs diff -uN" to include the new file in the
patch. However, I guess this doesn't work with read-only access. I
don't know if there's a workaround then. The solution you chose is
manageable in any case. With many new files the best solution is
probably to package them in a tar archive.
/Gunnar
> > Pattern EB715
> > # Added for 3.1.14
> >
> > O.*
> > X..
> > ---
> >
> > :8,OXb
> >
> > ac*
> > Xbd
> > ---
> >
> > ;oplay_attack_either(b,a,b) && oplay_attack_either(c,b,d,c,d)
The constraint looks good, but it may be worth commenting that there's
an alternative solution, which might be better. If we look at the
first half of the constraint, the effective move (to attack either
string) is usually at c. Then an alternative is to use the
construction
!oplay_defend_both(b,c,a,b)
These differ in two relevant aspects:
1. attack_either() is somewhat weak at coming up with effective moves.
It may miss the cutting move at c. Then the defend_both()
construction has better chances to analyze correctly.
2. If the effective move is something other than c, then the
defend_both() construction will fail.
Of course the same argument holds for the second half of the
constraint.
/Gunnar
Index: regression/strategy4.tst
===================================================================
RCS file: /cvsroot/gnugo/gnugo/regression/strategy4.tst,v
retrieving revision 1.23
diff -u -r1.23 strategy4.tst
--- regression/strategy4.tst 2001/11/10 09:26:25 1.23
+++ regression/strategy4.tst 2001/11/12 16:24:24
@@ -310,6 +310,14 @@
212 gg_genmove white
#? [G2]
+loadsgf games/strategy46.sgf 172
+213 gg_genmove white
+#? [F1]
+
+loadsgf games/strategy46.sgf 174
+214 gg_genmove white
+#? [D2]
+
############ End of Tests #################
# Report number of nodes visited by the tactical reading
Index: regression/games/strategy46.sgf
===================================================================
RCS file: strategy46.sgf
diff -N strategy46.sgf
--- /dev/null Sat Apr 14 20:46:23 2001
+++ strategy46.sgf Mon Nov 12 11:24:24 2001
@@ -0,0 +1,33 @@
+(;GM[1]FF[4]
+SZ[19]HA[0]KM[0.5]
+PW[GnuGo (GNU Go 3.1.13)]WR[14k*]
+PB[crazymonk]BR[18k]
+PC[NNGS]DT[2001-11-10]AP[gnugoclient:2.0]
+RE[B+21.5]
+;B[pd];W[dp];B[dd];W[qp];B[jd];W[qf];B[nd];W[pj];B[dj];W[op];B[cn]
+;W[fq];B[jq];W[rd];B[qc];W[ph];B[bp];W[cq];B[mp];W[qm];B[nq];W[oq]
+;B[hq];W[bq];B[en];W[gp];B[hp];W[bo];B[co];W[cp];B[bn];W[ap];B[eo]
+;W[cf];B[fd];W[bd];B[cc];W[dh];B[ci];W[ml];B[nn];W[ch];B[ef];W[gr]
+;B[go];W[js];B[jr];W[kr];B[is];W[ng];B[jj];W[mi];B[kl];W[lm];B[ln]
+;W[km];B[jm];W[kn];B[ko];W[nl];B[jn];W[rc];B[lf];W[on];B[om];W[nm]
+;B[oo];W[mn];B[pn];W[no];B[mo];W[on];B[po];W[nn];B[ol];W[kh];B[jg]
+;W[fh];B[gh];W[fg];B[gg];W[ff];B[gf];W[ee];B[de];W[df];B[fe];W[bc]
+;B[fi];W[eg];B[nk];W[ed];B[ec];W[cb];B[db];W[mk];B[bb];W[ab];B[ca]
+;W[qb];B[pb];W[lo];B[lp];W[nr];B[mr];W[or];B[np];W[kp]C[L:7];B[jo]
+;W[kq]C[L:6];B[lr];W[ks]C[L:7];B[ir];W[lq]C[L:8];B[ln];W[mq]C[L:5]
+;B[lo];W[ls]C[L:6];B[ll];W[pm]C[L:5];B[lk];W[nj]C[L:6];B[mm];W[ok]
+C[L:7];B[li];W[lh]C[L:8];B[mg];W[lg]C[L:9];B[nf];W[mh];B[jp];W[ms]
+;B[mf];W[jh];B[ih];W[lj];B[og];W[lm];B[nh];W[kj];B[jk];W[bi];B[bj]
+;W[ai]C[L:8];B[aj];W[bh];B[ef];W[ee]C[L:9];B[rb];W[sb]C[L:10];B[qa]
+;W[ei];B[fj];W[ej];B[ek];W[di];B[cj];W[an];B[am];W[ao];B[bm];W[ji]
+;B[ii];W[ep];B[gq];W[ac];B[fp];W[fr];B[gs];W[hr];B[hs];W[sc];B[fs]
+;W[qe];B[pf];W[pg];B[qd];W[pe];B[oe];W[km];B[jl];W[ce];B[cd];W[do]
+;B[dn];W[kg];B[jf];W[kf];B[ke];W[ni];B[oi];W[pi];B[oh];W[of];B[er]
+;W[dr];B[eq];W[ds];B[dq];W[pf];B[ng];W[oj];B[kn];W[mm];B[es];W[cr]
+;B[ar];W[aq];B[];W[kk];B[ed];W[ef];B[ba];W[bf];B[ra];W[aa];B[sa]
+;W[re];B[];W[]
+C[final_score: B+21.5
+M11 removed
+P8 removed
+Q6 removed
+A2 removed])