[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] reorganitations in owl code
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] reorganitations in owl code |
Date: |
Sat, 12 Oct 2002 22:19:07 +0200 |
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) |
Arend wrote:
> With Nando's owl patches, do_owl_attack/defend got even more lengthy than
> they already were. Judging from the FIXME in do_owl_attack()
>
> "This block probably should reappear somewhere in this function."
>
> I am not the only one who gets confused by this... :-)
I added that comment long ago when I made a major rewrite of the owl
code and it turned out that the escape test was no longer appropriate,
at least not where it was. I was not at all confused though. :-)
> (Admittedly, it's not entirely clear that this (outcommented) block
> should really appear in this function, and I didn't change that.)
It probably shouldn't, since noone has found a need to reintroduce it
in all this time.
> Question: I see some reason for do_owl_attack to still call
> owl_determine_life() even if (escape >= MAX_ESCAPE). (If the defender
> built life without intending to do so, he is still alife.)
There's of course a performance issue but I think the added
flexibility of always knowing that an up to date eye count is
available is worth the price.
> But I see no reason to actually play vital moves in this case.
Well, if there happens to appear a vital move to definitely make a
second eye it should clearly be played anyway. Moves to make the first
eye or to just maybe make the second eye had better be skipped though.
> Should this be changed?
Try it and see what it does to performance and regression results. I'd
prefer to have it changed.
> Some of the changes are certainly a matter of taste, so I'll wait for
> complaints before merging this to CVS.
I think the patch looks fine. It's a good idea to wait a day or so
before adding it to CVS anyway, to let people with owl changes in
their working copies prepare themselves. With such a big code
restructure it's usually much easier to merge by hand, but only if you
have a fresh diff available.
/Gunnar