[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] attack_either patches analysis
From: |
Evan Berggren Daniel |
Subject: |
Re: [gnugo-devel] attack_either patches analysis |
Date: |
Fri, 8 Nov 2002 08:47:49 -0500 (EST) |
On Fri, 8 Nov 2002, Arend Bayer wrote:
>
> Dan wrote:
> > About Evan's defend_both patch, and Arend's updating of Arend wrote:
> >
> > > What remains to do is a measurement whether your patches have a negative
> > > performance impact.
>
> > A net increase of about 54 seconds or 4.5%.
>
> This probably means the patch in its current form is not worth its costs.
> However, looking at the code, improvements can be made.
>
> Just looking at attack_either(): We should
>
> 1. just return asuccess when the other string is safe, i.e.
> if countlib(bstr) >= 5 or maybe 4
> 2. similar if stackp > branch_depth
> 3. really not worry about ko results when you've already called
> defend_both() (you simply cannot do that when you don't use a
> komaster scheme).
> 4. try to return as soon as possible (i.e. insert
> if (defend0 != 0)
> return defended0;
> between the two alibs trymove's
> 5. maybe worry about not playing the same move twice (in case they
> have common liberties).
>
> Evan, do you want to give (some of) it a try?
Yes, I plan to do that.
I'm going to move both functions to the candidate move macros, and maybe
add some depth checks.
Also, I believe the performance hit is closer to 1% overall, if we use a
game replay as the benchmark. I think the tests are biased against this
sort of patch. I also think we should have a standard benchmark, either a
game replay or a carefully chosen set of tests.
Thanks for your help on this
Evan Daniel