gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] strategic effect


From: Arend Bayer
Subject: Re: [gnugo-devel] strategic effect
Date: Sun, 13 Oct 2002 18:08:57 +0200 (CEST)

This is basically the same as the previous patch, just with the values
tuned a little (admittedly mostly by counting #PASSes vs #FAILs and not
much further investigation). There are now 19 PASSes and 7 FAILs. A detailed
analysis below.

The patch may combine well with Inge's, but needs to be reevaluated
of course (and requires some hand-merging).

Arend

(The fails with comment "tenuki" are ok. GNU tenukies from a joseki
because of a strategically urgent move; but with the new strategical
value it would not have started the joseki in the first place.)

PASS
trevora:130: good, lucky
nngs1:35: Also present in CVS. (It's however a typical mistake and very good
        to solve this one twice :-) )
nngs1:50: Good, some luck
nngs1:52: Very good.
strategy:20: Good.
ego:8: ? (No longer present.)
strategy2:83: Good.
niki:4: Some luck.
trevorc:350: Good (this one was actually solved by _reducing_ the strategic
                effect)
trevorc:600: Luck.
trevorc:1080: Luck.
trevord:870: Good. (R6 is now valued 31 pts).
nngs2:400: Good (some luck)
strategy5:277: Luck (original FAIL due to atari-atari problem)
safety:1: Good.
safety:2: Also present in CVS.
safety:4: Good.
safety:7: Good.

FAIL
nngs1:48: bad tenuki
strategy3:126: accidental (atari_atari blunder bug uncovered)
global:5: 40% accidental (various valuations are far from perfect)
arend:35: bad
13x13:28: tenuki, ok (E3 is really big, and GNU Go would not invade at L11
        in the first place with the patch)
strategy4:200: accidental (very bad owl mistake)
nngs3:400: not good, but acceptable (I don't think Q15, which should close
the corner, is so bad here)


Index: engine/move_reasons.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/move_reasons.c,v
retrieving revision 1.99
diff -u -p -r1.99 move_reasons.c
--- engine/move_reasons.c       9 Oct 2002 18:36:23 -0000       1.99
+++ engine/move_reasons.c       12 Oct 2002 04:03:26 -0000
@@ -1983,6 +1983,17 @@ scale_randomness(int pos, float scaling)
     move[pos].randomness_scaling = scaling;
 }

+
+/* Returns a capped effective size of the dragon at pos for use in
+ * the strategic effect.
+ */
+float
+strategic_effective_size(int pos)
+{
+  float eff = dragon[pos].effective_size;
+  return ((15.0 * eff) / (15.0 + eff));
+}
+
 /*
  * Local Variables:
  * tab-width: 8
Index: engine/move_reasons.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/move_reasons.h,v
retrieving revision 1.25
diff -u -p -r1.25 move_reasons.h
--- engine/move_reasons.h       9 Oct 2002 18:36:23 -0000       1.25
+++ engine/move_reasons.h       12 Oct 2002 04:03:27 -0000
@@ -203,6 +203,8 @@ void mark_changed_dragon(int pos, int co
                         int move_reason_type, char changed_stones[BOARDMAX],
                         float *effective_size);

+float strategic_effective_size(int pos);
+
 /*
  * Local Variables:
  * tab-width: 8
Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.61
diff -u -p -r1.61 value_moves.c
--- engine/value_moves.c        9 Oct 2002 18:36:23 -0000       1.61
+++ engine/value_moves.c        12 Oct 2002 04:03:39 -0000
@@ -841,7 +841,7 @@ examine_move_safety(int color)
  */

 static float
-dragon_safety(int dr, int ignore_dead_dragons)
+dragon_weakness(int dr, int ignore_dead_dragons)
 {
   int dragon_safety = DRAGON2(dr).safety;

@@ -852,13 +852,13 @@ dragon_safety(int dr, int ignore_dead_dr
       && (dragon_safety == DEAD
          || dragon_safety == INESSENTIAL
          || dragon_safety == TACTICALLY_DEAD))
-    return 1.0;
+    return 0.0;

   /* When scoring, we don't want to reinforce ALIVE dragons. */
   if (doing_scoring && dragon_safety == ALIVE)
-    return 1.0;
+    return 0.0;

-  return (1.0 - DRAGON2(dr).weakness);
+  return DRAGON2(dr).weakness;
 }

 /*
@@ -1939,8 +1939,8 @@ estimate_strategical_value(int pos, int
             * The dragon safety alone is not enough. The question is
             * whether the dragon is threatened by the move or not.
             */
-           this_value = (dragon[bb].effective_size
-                         * (1.0 - dragon_safety(bb, 0)));
+           this_value = (1.8 * strategic_effective_size(bb)
+                         * dragon_weakness(bb, 0));

            /* If this dragon consists of only one worm and that worm
             * can be tactically captured or defended by this move, we
@@ -2209,13 +2209,8 @@ estimate_strategical_value(int pos, int
         * dragon safety alone is not enough. The question is whether
         * the dragon is threatened by the move or not.
         */
-       this_value = (dragon[aa].effective_size
-                     * (1.0 - dragon_safety(aa, 1)));
-
-       /* To prefer good connections and cuts, we lower this value
-        * somewhat.
-        */
-       this_value *= 0.75;
+       this_value = (1.8 * strategic_effective_size(aa)
+                     * dragon_weakness(aa, 1));

        /* No strategical attack value is awarded if the dragon at (aa)
         * has an adjacent (friendly) critical dragon, which is not





reply via email to

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