[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] other pattern question:
From: |
alain Baeckeroot |
Subject: |
[gnugo-devel] other pattern question: |
Date: |
Mon, 04 Dec 2006 17:43:57 +0100 |
User-agent: |
KMail/1.9.3 |
Hi
in patterns2.db i found DD3
------------------------------------------------------
Pattern DD3
OXX
X*.
X..
:8,O
OEE
D*c
Dba
;oplay_attack(*,D) && oplay_attack_either(*,a,D,E)
;&& !oplay_defend_both(*,b,c,D,E)
>test_attack_either_move(D,E)
---------------------------------------------------
mkpat.c:
{"oplay_defend_both", 2, 1, 3.00, "play_attack_defend2_n(color, 0,
%d"},
-----------------------------------------------------
helpers.c:
void test_attack_either_move(int move, int color, int worma, int wormb) {
...
if (trymove(move, color, "test_attack_either_move", worma)) {
...
else if (!defend_both(worma, wormb))
add_either_move(move, ATTACK_STRING, worma, ATTACK_STRING, wormb);
...
}
----------------------------------------------------
I don't understand 2 things:
- why a test is done in action ? I expected only setting the either_move
(if it should do only this, maybe rename it to add_attack_either_move
for better clarity ;)
- why different tests are done in the helper, and the action ?
Alain
- [gnugo-devel] other pattern question:,
alain Baeckeroot <=