[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] optics improvement
From: |
Paul Pogonyshev |
Subject: |
[gnugo-devel] optics improvement |
Date: |
Sun, 22 Sep 2002 17:12:06 +0300 |
this time a real one ;)
i looked at the reason of owl_rot 244 fail and found this in
topological_eye():
/* Store these in sorted (descending) order. We remap val
* differently for attack and defense points according to:
*
* val attack_value defense_value
* --- ------------ -------------
* 1.0 3 3
* <1.0 2 1
* >1.0 1 2
...
else if (val < 1.0) {
attack_value = 2;
defense_value = 3;
}
else {
attack_value = 3;
defense_value = 2;
}
clearly, version in comments is better since securing diagonals
opponent can control only by winning ko is not so important as ones he
can control unconditionally (val == 1.0). this is just a typo mistake,
i think.
to my mind, it doesn't matter how we place those 1's and 2's as long
as attack and defense values for ko-dependent diagonals are less than
for ones with val == 1.0. double ko is rare enough and as i can see,
one of the two can be won no matter which you play first. however, i
kept the original values (those which are in comments).
i ran modified version with these test files: owl, owl1, owl_rot,
ld_owl, ld_owl_rot, optics and optics_rot and got three PASSes:
owl_rot:244: PASSED: correct: (2|3) F11 answer: 3 F11
owl_rot:245: PASSED: correct: 1 (F11|H8|F8) answer: 1 F11
ld_owl_rot:179: PASSED: correct: 3 T17 answer: 3 T17
Paul
Index: gnugo/engine/optics.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/optics.c,v
retrieving revision 1.50
diff -u -r1.50 optics.c
--- gnugo/engine/optics.c 18 Sep 2002 15:10:02 -0000 1.50
+++ gnugo/engine/optics.c 22 Sep 2002 14:07:09 -0000
@@ -1469,10 +1469,10 @@
}
else if (val < 1.0) {
attack_value = 2;
- defense_value = 3;
+ defense_value = 1;
}
else {
- attack_value = 3;
+ attack_value = 1;
defense_value = 2;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] optics improvement,
Paul Pogonyshev <=