[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] pattern classes b and e
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] pattern classes b and e |
Date: |
Thu, 02 May 2002 20:21:05 +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) |
I wrote:
> I intend to clean away the distinction between the block territory
> (pattern class b) and expand territory (pattern class e) move reasons.
> In practice this will mean reclassifying all b patterns in
> patterns.db, patterns2.db, endgame.db, and fuseki.db to e patterns,
> followed by removing the block territory move reason.
>
> The patch
> http://www.lysator.liu.se/~gunnar/gnugo/patches/gunnar_3_2.5.gz
> does the first step,
This patch finishes this cleaning operation.
- doc revisions
- add_block_territory_move() removed
- BLOCK_TERRITORY_MOVE reason removed
/Gunnar
Index: doc/move_generation.texi
===================================================================
RCS file: /cvsroot/gnugo/gnugo/doc/move_generation.texi,v
retrieving revision 1.13
diff -u -r1.13 move_generation.texi
--- doc/move_generation.texi 2 Apr 2002 18:04:19 -0000 1.13
+++ doc/move_generation.texi 29 Apr 2002 21:05:29 -0000
@@ -139,10 +139,9 @@
@itemx SEMEAI_THREAT
Win or threaten to win a semeai.
@item EXPAND_TERRITORY_MOVE
address@hidden BLOCK_TERRITORY_MOVE
@item EXPAND_MOYO_MOVE
-Move expanding/blocking our territory/moyo. These reasons are at the
-moment treated identically.
+Move expanding our territory/moyo. These reasons are at the moment
+treated identically.
@item VITAL_EYE_MOVE
A vital point for life and death.
@item STRATEGIC_ATTACK_MOVE
@@ -307,13 +306,12 @@
@comment node-name, next, previous, up
@subsection Territorial moves
-Any move that increases territory gets a move reason. These are
-the block territory and expand territory move reasons. Such move
-reasons are added by the @samp{b} and @samp{e} patterns in
address@hidden/patterns.db}. Similarly the @samp{E} patterns attempt to
-generate or mitigate an moyo, which is a region of influence not yet secure
-territory, yet valuable. Such a pattern sets the ``expand moyo'' move
-reason.
+Any move that increases territory gets a move reason. This is the expand
+territory move reason. That move reason is added by the @samp{e}
+patterns in @file{patterns/patterns.db}. Similarly the @samp{E} patterns
+attempt to generate or mitigate a moyo, which is a region of influence
+not yet secure territory, yet valuable. Such a pattern sets the ``expand
+moyo'' move reason.
@node Owl attack and defense, Combination Attacks, Territorial moves, MG
Details
@comment node-name, next, previous, up
@@ -680,23 +678,10 @@
@code{target2}. At this time, @code{reason} can only be @code{DEFEND_STRING}.
More reasons will be implemented in the future.
@end quotation
address@hidden @code{void add_block_territory_move(int pos)}
address@hidden add_block_territory_move
address@hidden
-Add to the reasons for the move at @code{pos} that it secures
-territory by blocking.
address@hidden quotation
address@hidden @code{void add_block_territory_move(int pos)}
address@hidden add_block_territory_move
address@hidden
-Add to the reasons for the move at @code{pos} that it secures
-territory by blocking.
address@hidden quotation
@item @code{void add_expand_territory_move(int pos)}
@findex add_expand_territory_move
@quotation
-Add to the reasons for the move at @code{pos} that it expands
-territory.
+Add to the reasons for the move at @code{pos} that it expands territory.
@end quotation
@item @code{void add_expand_moyo_move(int pos) }
@findex add_expand_moyo_move
Index: doc/patterns.texi
===================================================================
RCS file: /cvsroot/gnugo/gnugo/doc/patterns.texi,v
retrieving revision 1.12
diff -u -r1.12 patterns.texi
--- doc/patterns.texi 22 Mar 2002 16:34:44 -0000 1.12
+++ doc/patterns.texi 29 Apr 2002 21:05:29 -0000
@@ -215,13 +215,9 @@
move is given the move reasons that it cuts each pair of
dragons.
@end quotation
address@hidden @samp{b}
address@hidden
-The move secures territory by blocking it from intrusion.
address@hidden quotation
@item @samp{e}
@quotation
-The move makes territory by expanding, e.g. along the edge.
+The move makes or secures territory.
@end quotation
@item @samp{E}
@quotation
Index: engine/liberty.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/liberty.h,v
retrieving revision 1.96
diff -u -r1.96 liberty.h
--- engine/liberty.h 12 Apr 2002 14:23:54 -0000 1.96
+++ engine/liberty.h 29 Apr 2002 21:05:30 -0000
@@ -377,7 +377,6 @@
void add_my_atari_atari_move(int pos, int size);
void add_your_atari_atari_move(int pos, int size);
void add_vital_eye_move(int pos, int eyespace, int color);
-void add_block_territory_move(int pos);
void add_expand_territory_move(int pos);
void add_expand_moyo_move(int pos);
void add_strategical_attack_move(int pos, int dr);
Index: engine/move_reasons.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/move_reasons.c,v
retrieving revision 1.83
diff -u -r1.83 move_reasons.c
--- engine/move_reasons.c 27 Apr 2002 22:08:58 -0000 1.83
+++ engine/move_reasons.c 29 Apr 2002 21:05:31 -0000
@@ -371,7 +371,6 @@
case CUT_MOVE:
return dragons[conn_dragon1[what]];
case ANTISUJI_MOVE:
- case BLOCK_TERRITORY_MOVE:
case EXPAND_TERRITORY_MOVE:
case EXPAND_MOYO_MOVE:
case MY_ATARI_ATARI_MOVE:
@@ -1061,17 +1060,6 @@
/*
- * Add to the reasons for the move at (pos) that it secures
- * territory by blocking.
- */
-void
-add_block_territory_move(int pos)
-{
- gg_assert(0 && "block_territory move reason obsolete");
- add_move_reason(pos, BLOCK_TERRITORY_MOVE, 0);
-}
-
-/*
* Add to the reasons for the move at (pos) that it expands
* territory.
*/
@@ -1658,10 +1646,6 @@
pos, aa);
break;
- case BLOCK_TERRITORY_MOVE:
- gprintf("Move at %1m blocks territory\n", pos);
- break;
-
case EXPAND_TERRITORY_MOVE:
gprintf("Move at %1m expands territory\n", pos);
break;
Index: engine/move_reasons.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/move_reasons.h,v
retrieving revision 1.17
diff -u -r1.17 move_reasons.h
--- engine/move_reasons.h 27 Apr 2002 22:08:58 -0000 1.17
+++ engine/move_reasons.h 29 Apr 2002 21:05:31 -0000
@@ -37,7 +37,7 @@
#define SEMEAI_MOVE 18
#define SEMEAI_THREAT (SEMEAI_MOVE | THREAT_BIT)
-#define BLOCK_TERRITORY_MOVE 20
+/* BLOCK_TERRITORY_MOVE 20 OBSOLETE */
#define EXPAND_TERRITORY_MOVE 22
#define EXPAND_MOYO_MOVE 24
Index: engine/shapes.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/shapes.c,v
retrieving revision 1.30
diff -u -r1.30 shapes.c
--- engine/shapes.c 19 Apr 2002 17:13:25 -0000 1.30
+++ engine/shapes.c 29 Apr 2002 21:05:34 -0000
@@ -279,11 +279,8 @@
TRACE("...shape value 1\n");
}
- /* Pattern class b, block to secure territory. */
- if (class & CLASS_b) {
- add_block_territory_move(move);
- TRACE("...blocks territory\n");
- }
+ /* Pattern class b is obsolete in the pattern databases handled here. */
+ gg_assert(!(class & CLASS_b));
/* Pattern class e, expand to make territory. */
if (class & CLASS_e) {
Index: engine/value_moves.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.32
diff -u -r1.32 value_moves.c
--- engine/value_moves.c 29 Apr 2002 20:50:42 -0000 1.32
+++ engine/value_moves.c 29 Apr 2002 21:05:35 -0000
@@ -654,7 +654,6 @@
tactical_safety = 1;
safety = 1;
break;
- case BLOCK_TERRITORY_MOVE:
case EXPAND_TERRITORY_MOVE:
case EXPAND_MOYO_MOVE:
safety = 1;
@@ -1186,7 +1185,6 @@
*/
switch (move_reasons[r].type) {
case EXPAND_TERRITORY_MOVE:
- case BLOCK_TERRITORY_MOVE:
case EXPAND_MOYO_MOVE:
case STRATEGIC_ATTACK_MOVE:
continue;
@@ -1538,19 +1564,8 @@
case CUT_MOVE:
case STRATEGIC_ATTACK_MOVE:
case STRATEGIC_DEFEND_MOVE:
- case BLOCK_TERRITORY_MOVE:
- does_block = 1;
- break;
-
case EXPAND_MOYO_MOVE:
case EXPAND_TERRITORY_MOVE:
- /* We don't make any difference between blocking and expanding
- * territory.
- *
- * FIXME: Fuse the BLOCK_TERRITORY and EXPAND_TERRITORY move
- * reasons to one and do the same with the b and e class
- * patterns.
- */
does_block = 1;
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [gnugo-devel] pattern classes b and e,
Gunnar Farneback <=