[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Saphir game
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] Saphir game |
Date: |
Tue, 03 Dec 2002 21:35:28 +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) |
Dan wrote:
> 221. Q18 kills.
I assume you mean move 222.
> 258. Should be A4.
>
> After this, B begins to play inside his own territory.
258 is also a play inside own territory. Later 292 at P5 is a truly
fantastic semeai mistake (--experimental-semeai does not make the
mistake).
The patch below fixes all of the play inside own territory moves.
- find_more_attack_and_defense_moves() revised
/Gunnar
Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.68
diff -u -r1.68 value_moves.c
--- engine/value_moves.c 30 Nov 2002 16:20:42 -0000 1.68
+++ engine/value_moves.c 3 Dec 2002 20:32:51 -0000
@@ -192,12 +192,31 @@
&& !defense_move_reason_known(ii, unstable_worms[k])) {
int acode = attack(aa, NULL);
if (acode < worm[aa].attack_codes[0]) {
- if (!cursor_at_start_of_line)
- TRACE("\n");
- TRACE("%ofound extra point of defense of %1m at %1m code %d\n",
- aa, ii, REVERSE_RESULT(acode));
- cursor_at_start_of_line = 1;
- add_defense_move(ii, aa, REVERSE_RESULT(acode));
+ /* Maybe attack() doesn't find the attack. Try to
+ * attack with the stored attack move.
+ */
+ int defense_works = 1;
+
+ if (trymove(worm[aa].attack_points[0], other,
+ "find_more_attack_and_defense_moves", 0,
+ EMPTY, 0)) {
+ int this_acode = REVERSE_RESULT(find_defense(aa, NULL));
+ if (this_acode > acode) {
+ acode = this_acode;
+ if (acode >= worm[aa].attack_codes[0])
+ defense_works = 0;
+ }
+ popgo();
+ }
+
+ if (defense_works) {
+ if (!cursor_at_start_of_line)
+ TRACE("\n");
+ TRACE("%ofound extra point of defense of %1m at %1m code %d\n",
+ aa, ii, REVERSE_RESULT(acode));
+ cursor_at_start_of_line = 1;
+ add_defense_move(ii, aa, REVERSE_RESULT(acode));
+ }
}
}
Re: [gnugo-devel] Saphir game, Arend Bayer, 2002/12/05