gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] Replacement patterns


From: bump
Subject: [gnugo-devel] Replacement patterns
Date: Tue, 2 Apr 2002 08:39:14 -0800

I got a crash in a game which I tracked down to a pattern that was
not written as intended. It is now fixed in the CVS by the patch
at the end of this message.

The actual crash was caused by this assertion in add_replacement_moves:

  /* First check for an incompatible redistribution rule. */
  if (replacement_map[from] != NO_MOVE) {
    int dd = replacement_map[from];

    /* Crash if the old rule isn't compatible with the new one. */
    ASSERT1(dd == to || to == replacement_map[dd], from);
    /* There already is a compatible redistribution in effect so we
     * have nothing more to do.
     */
    return;
  }

This seems rather dangerous to me. For this to be correct
we need to know that no two patterns can propose different
replacements. It is difficult to verify this.

Perhaps we should leave this in for now but when we've finished
stress testing by playing about 1000 games we should take it
out and not have this assertion in GNU Go 3.2.

Dan





Index: patterns/patterns.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/patterns.db,v
retrieving revision 1.65
diff -u -r1.65 patterns.db
--- patterns/patterns.db        31 Mar 2002 20:46:47 -0000      1.65
+++ patterns/patterns.db        2 Apr 2002 16:33:46 -0000
@@ -7192,20 +7192,21 @@
 
 Pattern CB107
 # db New pattern (3.1.28)
+# db corrected (3.1.28)
 
-?Oxxxx       defend the cut before leaping
+?OXxxx       defend the cut before leaping
 ..O...
 ?*....
 ?.....
 
 :8,O
 
-?Oxxxx
+?OAxxx
 .bO...
 ?*c.a.
 ?.....
 
-; oplay_defend(a,b,c,b)
+; oplay_defend(a,b,c,b) && !attack(A)
 > replace(a,*)
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]