[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Reading patch
From: |
Nando |
Subject: |
Re: [gnugo-devel] Reading patch |
Date: |
Wed, 26 Feb 2003 03:02:49 +0100 |
Gunnar wrote:
>
> Nice.
Thanx.
> owl:179 FAIL 0 [3 R19]
> blunder:23 PASS L2 [!F4|F5|F6]
> arb:203 PASS T7 [T7]
> arb:220 PASS F7 [!F6]
> arend:3 PASS P6 [P6|Q5]
Very good.
> I haven't checked what's going on with owl:179 but the passes, in
> particular blunder:23, are quite significant.
Definitely.
Also, your recent code maintenance patch is impressive and appreciated.
I just finished testing the appended patch with following results which look
rather good to me. The breakage :
trevora:220 PASS
trevorc:1440 FAIL the test would pass with --owl-node-limit 1250
global:4 FAIL current CVS would also fail both tests if the owl node
global:5 FAIL limit would be similarly increased (1250)
tactics1:101 PASS
tactics1:104 PASS
Performance impact :
- reading nodes: +0.6%
- owl nodes: +0.3%
- connection nodes: -eps
Globally, I think the patch is just logical and removes a rotational
dependency.
/nando
- try (a bit) harder in attack_either()
Index: engine/reading.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/reading.c,v
retrieving revision 1.106
diff -u -r1.106 reading.c
--- engine/reading.c 22 Feb 2003 16:02:25 -0000 1.106
+++ engine/reading.c 23 Feb 2003 16:13:16 -0000
@@ -452,23 +452,48 @@
/* Try (a little) harder */
{
- int libs[2];
- int alibs = findlib(astr, 2, libs);
+ int alibs[2];
+ int blibs[2];
+ int alib = findlib(astr, 2, alibs);
int defended0 = WIN;
int defended1 = WIN;
int other = OTHER_COLOR(color);
/* Let's just try the case where the group with the fewest liberties
* has only 2, and try each atari in turn.
*/
- if (alibs == 2) {
- if (trymove(libs[0], other, "attack_either-A", astr, EMPTY, NO_MOVE)) {
+ if (alib == 2) {
+ if (trymove(alibs[0], other, "attack_either-A", astr,
+ EMPTY, NO_MOVE)) {
defended0 = defend_both(astr, bstr);
popgo();
}
if (defended0
- && trymove(libs[1], other, "attack_either-B", astr,
+ && trymove(alibs[1], other, "attack_either-B", astr,
EMPTY, NO_MOVE)) {
defended1 = defend_both(astr, bstr);
+ popgo();
+ }
+ }
+ /* The second string is possibly also short in liberties.
+ * Let's try to improve the result.
+ */
+ if (defended0 > 0 && defended1 > 0
+ && findlib(bstr, 2, blibs) == 2) {
+ defended0 = gg_min(defended0, defended1);
+ defended1 = defended0;
+ if (blibs[0] != alibs[0] && blibs[0] != alibs[1]
+ && trymove(blibs[0], other, "attack_either-C", bstr,
+ EMPTY, NO_MOVE)) {
+ int defended = defend_both(astr, bstr);
+ defended0 = gg_min(defended0, defended);
+ popgo();
+ }
+ if (defended0
+ && blibs[1] != alibs[0] && blibs[1] != alibs[1]
+ && trymove(blibs[1], other, "attack_either-D", bstr,
+ EMPTY, NO_MOVE)) {
+ int defended = defend_both(astr, bstr);
+ defended1 = gg_min(defended1, defended);
popgo();
}
}
- [gnugo-devel] Reading patch, Portela Fernand, 2003/02/21
- Re: [gnugo-devel] Reading patch, Gunnar Farneback, 2003/02/22
- Re: [gnugo-devel] Reading patch,
Nando <=
- Re: [gnugo-devel] Reading patch, Evan Berggren Daniel, 2003/02/23
- Re: [gnugo-devel] Reading patch, Paul Pogonyshev, 2003/02/23
- Re: [gnugo-devel] Reading patch, Evan Berggren Daniel, 2003/02/23
- Re: [gnugo-devel] Reading patch, Paul Pogonyshev, 2003/02/23
- Re: [gnugo-devel] Reading patch, bump, 2003/02/23
- Re: [gnugo-devel] Reading patch, Paul Pogonyshev, 2003/02/23