gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Saphir game


From: bump
Subject: Re: [gnugo-devel] Saphir game
Date: Fri, 6 Dec 2002 09:31:17 -0800

Gunnar wrote:

> 258 is also a play inside own territory. Later 292 at P5 is a truly
> fantastic semeai mistake (--experimental-semeai does not make the
> mistake).
> 
> The patch below fixes all of the play inside own territory moves.

The patch causes crashes in filllib:19 and golife:4. The following
patch stops these crashes.

I think an underlying problem may still not be fixed. Starting around
258 GNU started filling its own territory, attacking various
already-dead worms. These moves were given the reason "E11 cutstone".
These traces are mostly gone after the patch but not entirely.

Even after this patch, at move 260 we get:

  F3: -0.5 - penalty for ko stone G3 (workaround)
  F3: 6.00 - E11 cutstone
  F3: 8.98 - strategic effect on A6
  F3:   0.00 - total followup value, added 0.00 as territorial followup
  F3: 0.17 - secondary
  F3: 0.63 - connects strings (connect value 6, shape factor 0.126)
  F3:   1.00 - maximum accepted value
Move generation values F3 to 1.00

Dan


Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.68
diff -u -r1.68 value_moves.c
--- engine/value_moves.c        30 Nov 2002 16:20:42 -0000      1.68
+++ engine/value_moves.c        6 Dec 2002 17:17:22 -0000
@@ -192,12 +192,35 @@
              && !defense_move_reason_known(ii, unstable_worms[k])) {
            int acode = attack(aa, NULL);
            if (acode < worm[aa].attack_codes[0]) {
-             if (!cursor_at_start_of_line)
-               TRACE("\n");
-             TRACE("%ofound extra point of defense of %1m at %1m code %d\n",
-                   aa, ii, REVERSE_RESULT(acode));
-             cursor_at_start_of_line = 1;
-             add_defense_move(ii, aa, REVERSE_RESULT(acode));
+             /* Maybe attack() doesn't find the attack. Try to
+              * attack with the stored attack move.
+              */
+             int defense_works = 1;
+
+             if (trymove(worm[aa].attack_points[0], other, 
+                         "find_more_attack_and_defense_moves", 0,
+                         EMPTY, 0)) {
+               if (!board[aa])
+                 defense_works = 0;
+               else {
+                 int this_acode = REVERSE_RESULT(find_defense(aa, NULL));
+                 if (this_acode > acode) {
+                   acode = this_acode;
+                   if (acode >= worm[aa].attack_codes[0])
+                     defense_works = 0;
+                 }
+               }
+               popgo();
+             }
+               
+             if (defense_works) {
+               if (!cursor_at_start_of_line)
+                 TRACE("\n");
+               TRACE("%ofound extra point of defense of %1m at %1m code %d\n",
+                     aa, ii, REVERSE_RESULT(acode));
+               cursor_at_start_of_line = 1;
+               add_defense_move(ii, aa, REVERSE_RESULT(acode));
+             }
            }
          }
            




reply via email to

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