gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] Minor value_moves.c patch


From: Stéphane Nicolet
Subject: [gnugo-devel] Minor value_moves.c patch
Date: Tue, 3 Feb 2004 20:52:01 +0100


Small patch to avoid aji :

- malus for suspected ineffective owl attacks changed from epsilon
  to 2 + epsilon in estimate_territorial_value().

- bonus for owl defenses which connect dragons together raised a bit
  (and bonus also checked to be >= 0) in connection_value().



Regression results are 10 PASS and 4 FAIL :


290 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?trevora.tst:290
6 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?arion.tst:6
1107 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?nicklas1.tst:1107
1300 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?nngs.tst:1300
1750 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?nngs.tst:1750
119 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?strategy3.tst:119
52 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?13x13.tst:52
87 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?13x13.tst:87
700 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?nngs3.tst:700
150 unexpected PASS!
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?arend2.tst:150


740 unexpected FAIL: Correct '!H10', got 'H10'
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?trevorb.tst:740
163 unexpected FAIL: Correct 'B9', got 'C7'
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?trevor.tst:163
135 unexpected FAIL: Correct 'M12|N13|M13', got 'L13'
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?strategy3.tst:135
150 unexpected FAIL: Correct 'C5|D5', got 'G14'
   http://evand.rh.ncsu.edu/~evand/gnugo/regress.plx?ninestones.tst:150


Stephane.


*******************************************


--- gnugo-3.5.4-cvs/engine/value_moves.c        Sat Jan 24 04:34:59 2004
+++ gnugo-3.5.4/engine/value_moves.c     Tue Feb  3 12:10:12 2004
@@ -1064,10 +1064,15 @@
    * owl defend a dragon to other owl defense move.
    */
   if (dragon[dragona].status == CRITICAL) {
-    float bonus = (0.2 - 0.3 * crude_weakness_sum) * sizea;
+    float bonus = (0.4 - 0.3 * crude_weakness_sum) * sizea;
+
+    if (bonus < 0.0)
+      bonus = 0.0;
+
     /* If ahead, give extra bonus to connections. */
     if (margin > 0.0 && bonus > 0.0)
       bonus *= 1.0 + 0.05 * margin;
+
     return_value = 2.0 * sizea + bonus;
   }
   else {
@@ -1818,7 +1823,7 @@
          && dragon[aa].size == worm[aa].size
          && worm[aa].attack_codes[0] == WIN
          && attack_move_reason_known(pos, aa) != WIN) {
-       this_value = 0.05 * (2 * worm[aa].effective_size);
+       this_value = 2.0 + 0.05 * (2 * worm[aa].effective_size);
TRACE(" %1m: -%f - suspected ineffective owl attack of worm %1m\n",
              pos, this_value, aa);
        tot_value -= this_value;



























... /// ... \\\ ...





reply via email to

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