gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] atari_atari patch


From: Gunnar Farneback
Subject: Re: [gnugo-devel] atari_atari patch
Date: Sat, 29 Mar 2003 23:18:26 +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)

Evan wrote:
> The problem in the position is that white has an atari on an enclosing
> string available as a delaying move.  After white plays the atari, black
> needs to connect in order to continue the attack, but the current code
> does not find the move.

Right. I made the same conclusion when I added the test .

> To fix this I added code to look for intermediate defensive moves for
> tactically critical neighbor strings before continuing the attack.
> 
> I have not run complete regressions; however, the speed penalty on
> atari_atari.tst is relatively high, at around 12%.

I'm not sure whether that translates to something substantial for
whole games on average. It may or it may not.

> Does the patch look ok in its current form, or should I work more on it?

It looks a bit too unfocused, which may explain the relatively large
performance hit. Rather than checking blindly it may be better to keep
track of the last defended string and only test neighbors of that,
plus requiring that the defense is again an attack threat on the same
string. 

+    if (!ON_BOARD1(k))
+      continue;

Usually the ON_BOARD() macro is to be preferred. ON_BOARD1() contains
an extra range check which definitely isn't needed here.

+    if (board[k] != other)
+      continue;

And with this test the separate on board testing is redundant.

/Gunnar




reply via email to

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