[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] strategic effect
From: |
Arend Bayer |
Subject: |
[gnugo-devel] strategic effect |
Date: |
Fri, 11 Oct 2002 16:16:27 +0200 (CEST) |
As I said I tried tweaking the strategic effect valuation a little. The
results look encouraging, 22 PASSes and 10 FAILs, with four of the tests
in safety.tst solved. It is not yet finished, as I will try to do some
fine-tuning (I also haven't looked at the failures yet).
As that might take some time, I am posting this preliminary version.
The patch itself is extremely simple, see below.
Arend
./regress.sh . nngs1.tst
35 unexpected PASS!
48 unexpected FAIL: Correct 'R16', got 'F15'
50 unexpected PASS!
52 unexpected PASS!
./regress.sh . strategy.tst
20 unexpected PASS!
./regress.sh . ego.tst
8 unexpected PASS!
./regress.sh . strategy2.tst
70 unexpected FAIL: Correct 'M15|J15|N16|J16', got 'C15'
83 unexpected PASS!
91 unexpected PASS!
94 unexpected FAIL: Correct 'A2', got 'J2'
./regress.sh . niki.tst
4 unexpected PASS!
./regress.sh . trevorc.tst
600 unexpected PASS!
1080 unexpected PASS!
./regress.sh . global.tst
5 unexpected FAIL: Correct 'O4', got 'F5'
./regress.sh . arend.tst
35 unexpected FAIL: Correct 'H17|J19', got 'F15'
38 unexpected FAIL: Correct 'O5', got 'O17'
./regress.sh . 13x13.tst
28 unexpected FAIL: Correct 'L10', got 'E3'
41 unexpected PASS!
./regress.sh . trevord.tst
120 unexpected FAIL: Correct 'B9', got 'F7'
870 unexpected PASS!
./regress.sh . strategy4.tst
200 unexpected FAIL: Correct 'P6|P7|Q7|S18', got 'Q8'
./regress.sh . nngs2.tst
240 unexpected FAIL: Correct 'F17', got 'B14'
290 unexpected PASS!
400 unexpected PASS!
./regress.sh . nngs3.tst
140 unexpected PASS!
290 unexpected PASS!
320 unexpected PASS!
./regress.sh . strategy5.tst
277 unexpected PASS!
./regress.sh . safety.tst
1 unexpected PASS!
2 unexpected PASS!
4 unexpected PASS!
7 unexpected PASS!
Index: engine/move_reasons.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/move_reasons.c,v
retrieving revision 1.99
diff -u -r1.99 move_reasons.c
--- engine/move_reasons.c 9 Oct 2002 18:36:23 -0000 1.99
+++ engine/move_reasons.c 10 Oct 2002 19:26:13 -0000
@@ -1983,6 +1983,17 @@
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 ((20.0 * eff) / (20.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 -r1.25 move_reasons.h
--- engine/move_reasons.h 9 Oct 2002 18:36:23 -0000 1.25
+++ engine/move_reasons.h 10 Oct 2002 19:26:14 -0000
@@ -203,6 +203,8 @@
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 -r1.61 value_moves.c
--- engine/value_moves.c 9 Oct 2002 18:36:23 -0000 1.61
+++ engine/value_moves.c 10 Oct 2002 19:26:26 -0000
@@ -2209,13 +2209,13 @@
* 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
+ this_value = (strategic_effective_size(aa)
* (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;
/* No strategical attack value is awarded if the dragon at (aa)
* has an adjacent (friendly) critical dragon, which is not
- [gnugo-devel] strategic effect,
Arend Bayer <=