[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Preparatory patch
From: |
Arend Bayer |
Subject: |
Re: [gnugo-devel] Preparatory patch |
Date: |
Wed, 19 Dec 2001 00:56:17 +0100 (CET) |
> I haven't actually tried it but I'm quite certain it clashes a lot
> with Arend's patch.
Certainly you won't be able to compile after simply applying both our
patches.
> > - remove all _THREAT move reasons
> > - new member in move_reason: is_threat
> > - All move reasons except strategic attacks and defends can now be
> > threats
> > - handling of threats in move_reasons.c rewritten
> > - calls to add and remove move reasons changed to new calling
> > standards everywhere
>
> I'm not satisfied with the design of this. The is_threat parameter is
> a real nuisance. Quite frankly I don't see that this has improved the
> code at all. I might appreciate these changes more if you explain why
> they are necessary for your scheme, but I really hope it's possible to
> come up with some nicer solution.
What about this:
#define IS_THREAT 1
#define ATTACK_MOVE 2
#define DEFEND_MOVE 4
#define CONNECT_MOVE 6
#define CUT_MOVE 8
(...)
#define ATTACK_THREAT_MOVE (ATTACK_MOVE | IS_THREAT)
#define DEFEND_THREAT_MOVE (DEFEND_MOVE | IS_THREAT)
etc.
The existing code would not need to be changed, but where necessary
in potential new code, threat moves can be filtered out elegantly
(e.g. the addition to my patch that I described in my last e-mail could
implemented nicely).
-Arend
Re: [gnugo-devel] Preparatory patch, Arend Bayer, 2001/12/18