gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] scoring tweaks


From: Gunnar Farnebäck
Subject: [gnugo-devel] scoring tweaks
Date: Tue, 18 Jan 2005 06:05:00 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

This patch adds two scoring tweaks and disables trash around patterns
when fuseki move generation is disabled. It solves score:15.

- do not trust strategic attack and defense moves to be safe when
  scoring
- thrash_around_helper() returns false if fuseki is disabled

/Gunnar

Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.141
diff -u -r1.141 value_moves.c
--- engine/value_moves.c        18 Dec 2004 19:32:43 -0000      1.141
+++ engine/value_moves.c        4 Jan 2005 03:39:50 -0000
@@ -2124,13 +2124,21 @@
       
     case CONNECT_MOVE:
     case CUT_MOVE:
-    case STRATEGIC_ATTACK_MOVE:
-    case STRATEGIC_DEFEND_MOVE:
     case EXPAND_MOYO_MOVE:
     case EXPAND_TERRITORY_MOVE:
     case INVASION_MOVE:
       does_block = 1;
       break;
+
+    case STRATEGIC_ATTACK_MOVE:
+    case STRATEGIC_DEFEND_MOVE:
+      /* Do not trust these when we are scoring. Maybe we shouldn't
+       * trust them otherwise either but require them to be
+       * accompanied by e.g. an EXPAND move reason.
+       */
+      if (!doing_scoring)
+       does_block = 1;
+      break;
       
     case SEMEAI_THREAT:
       aa = move_reasons[r].what;
Index: patterns/helpers.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/helpers.c,v
retrieving revision 1.66
diff -u -r1.66 helpers.c
--- patterns/helpers.c  24 Dec 2004 20:11:38 -0000      1.66
+++ patterns/helpers.c  4 Jan 2005 03:39:52 -0000
@@ -763,8 +763,13 @@
   UNUSED(pattern);
   UNUSED(trans);
   UNUSED(move);
-  
+
+  /* Do not generate these moves when doing scoring or if fuseki move
+   * generation is disabled (typically used when solving life and
+   * death problems embedded on a big board).
+   */
   if (doing_scoring
+      || disable_fuseki
       || (stones_on_board(BLACK | WHITE) > board_size * board_size * 2 / 5
          && stones_on_board(WHITE) > board_size * board_size / 5)
       || color == BLACK
Index: patterns/patterns.db
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/patterns.db,v
retrieving revision 1.135
diff -u -r1.135 patterns.db
--- patterns/patterns.db        7 Dec 2004 04:36:35 -0000       1.135
+++ patterns/patterns.db        4 Jan 2005 03:39:54 -0000
@@ -14357,6 +14357,7 @@
 
 Pattern Reinforce102
 # FIXME: This pattern should be contingent on being clearly ahead.
+# gf In any case, don't play it while scoring. (3.7.2)
 
 .......
 O..O..O     Eliminate invasion point
@@ -14367,6 +14368,15 @@
 
 :8,O,value(8)
 
+.......
+O..O..O
+...*...
+.......
+.......
+-------
+
+;!doing_scoring
+
 
 ######################################################################
 #




reply via email to

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