gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] strategic bonus for connection moves


From: Arend Bayer
Subject: [gnugo-devel] strategic bonus for connection moves
Date: Sat, 30 Nov 2002 17:52:56 +0100 (CET)

My latest connection value patch killed the strategic bonus that preferred
connection moves over owl defenses for critical dragons, because this
did not check whether the connecting move was an owl defense at all.
(Such an inconsistency typically happens when there are intranstivity
issues with the connection move.)

Instead it seems saner to me to keep the strategic bonus, but only in
case we have a owl defense recorded.

The regression delta is mixed, but I'd feel a lot safer having the patch
in.

Arend

- reintroduce strategic bonus for connecting critical dragons


strategy:20     PASS Q11 [Q11]
strategy:35     PASS S12 [!B17]
lazarus:4       FAIL T5 [R12|Q12|M8]
trevorb:740     FAIL H10 [!H10]
strategy2:75    PASS Q11 [Q11]
./regress.sh . nngs3.tst
480 unexpected PASS!
800 unexpected FAIL: Correct 'G4', got 'E3'
960 unexpected FAIL: Correct 'L8', got 'Q8'
1170 unexpected PASS!

Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.67
diff -u -p -r1.67 value_moves.c
--- engine/value_moves.c        19 Nov 2002 16:32:35 -0000      1.67
+++ engine/value_moves.c        29 Nov 2002 14:07:58 -0000
@@ -985,7 +994,8 @@ connection_value(int dragona, int dragon
   }

   if (crude_weakness_a == 0.0
-      || dragon[dragona].status == CRITICAL
+      || (dragon[dragona].status == CRITICAL
+         && !owl_defense_move_reason_known(tt, find_dragon(dragona)))
       || dragon[dragona].status == DEAD)
     return 0.0;
   if (terr_val < 0.0)
@@ -1007,7 +1017,14 @@ connection_value(int dragona, int dragon
                            + terr_val,
                            (float) da->escape_route);

-  {
+  /* Kludge: For a CRITICAL dragon, we have to use the usual effective
+   * size and give a strategic effect bigger than 2.0 * effective size.
+   * This is to match the "strategic bonus computation" in
+   * estimate_strategical_value().
+   */
+  if (dragon[dragona].status == CRITICAL)
+    return_value = (2.2 - 0.5 * crude_weakness_sum) * sizea;
+  else {
     float old_burden = 2.0 * crude_weakness_a * soft_cap(sizea, 15.0);

     /* The new burden is the burden of defending new joint dragon; but






reply via email to

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