[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Owl threats
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] Owl threats |
Date: |
Mon, 04 Feb 2002 17:39:07 +0100 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode) |
Dan wrote (on January 19):
> Previously I put up a patch called owl_threats_1_22.1 which
> made the owl threat computation optional. I added this
> to the CVS.
>
> Taking out the owl threat computation gives a very
> substantial speedup. It does break some regressions.
>
> The version I tested it on omits some patches that are now
> in the CVS so you probably won't get identical results.
> I ran two similarly patched GNU Go processes and with
> the owl threats disabled we got 74 PASS and 42 FAIL
> where the version which computed the owl threats gave
> 59 PASS and 16 FAIL.
There's a bug in the patch giving the effect that also worm threats
have been disabled, which I don't think was the purpose. This breaks
e.g. Arend:36. Trevor later added a pattern CF3 in endgame.db to solve
this test case, but with worm threats working the pattern is
redundant.
The patch below fixes the bug and makes the
disable_threat_computations variable (needed by aftermath) independent
from the owl_threats variable.
/Gunnar
Index: engine/aftermath.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/aftermath.c,v
retrieving revision 1.19
diff -u -r1.19 aftermath.c
--- engine/aftermath.c 19 Jan 2002 16:11:16 -0000 1.19
+++ engine/aftermath.c 4 Feb 2002 12:02:41 -0000
@@ -727,8 +727,7 @@
}
/* Reenable worm and dragon threats and endgame patterns. */
- if (owl_threats)
- disable_threat_computation = 0;
+ disable_threat_computation = 0;
disable_endgame_patterns = 0;
}
Index: engine/dragon.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/dragon.c,v
retrieving revision 1.50
diff -u -r1.50 dragon.c
--- engine/dragon.c 2 Feb 2002 10:27:16 -0000 1.50
+++ engine/dragon.c 4 Feb 2002 12:02:42 -0000
@@ -500,7 +500,8 @@
dragon[ii].owl_defense_point = NO_MOVE;
dragon[ii].owl_defense_code = 0;
if (level >= 8
- && !disable_threat_computation) {
+ && !disable_threat_computation
+ && owl_threats) {
if (owl_threaten_defense(ii, &defense_point,
&second_defense_point)) {
dragon[ii].owl_threat_status = CAN_THREATEN_DEFENSE;
@@ -527,7 +528,8 @@
dragon[ii].owl_attack_point = NO_MOVE;
dragon[ii].owl_attack_code = 0;
if (level >= 8
- && !disable_threat_computation) {
+ && !disable_threat_computation
+ && owl_threats) {
if (owl_threaten_attack(ii, &attack_point, &second_attack_point)) {
dragon[ii].owl_threat_status = CAN_THREATEN_ATTACK;
dragon[ii].owl_attack_point = attack_point;
Index: engine/genmove.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/genmove.c,v
retrieving revision 1.27
diff -u -r1.27 genmove.c
--- engine/genmove.c 2 Feb 2002 19:05:12 -0000 1.27
+++ engine/genmove.c 4 Feb 2002 12:02:42 -0000
@@ -341,8 +341,6 @@
val = -1;
if (get_level(&level))
fprintf(stderr, "level = %d\n", level);
- if (!owl_threats)
- disable_threat_computation = 1;
/* experimental level adapter */
clock_adapt_level(&level, color);
- Re: [gnugo-devel] Owl threats,
Gunnar Farneback <=