gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] tiny boards


From: Gunnar Farnebäck
Subject: [gnugo-devel] tiny boards
Date: Sat, 04 Dec 2004 21:08:49 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

Currently GNU Go has BOARD_MIN set to 5. As nothing seems to break
there's no really good reason why we shouldn't allow 2x2, 3x3, and
4x4, however. This patch reduces BOARD_MIN to 2 and adds a testsuite,
tiny.tst, to give the tiny boards some exercise.

Initially seven testcases fail. Number 1, 101, and 201 should be
easily solved by revising fuseki.c. 104 and 202 are basically "invade
eyespace to make seki" problems (currently most easily solved by
adding patterns). 207 and 209 are possibly okay, but I haven't checked
and it might depend on the rules used.

/Gunnar

Index: engine/board.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/board.h,v
retrieving revision 1.18
diff -u -r1.18 board.h
--- engine/board.h      28 Nov 2004 23:00:20 -0000      1.18
+++ engine/board.h      4 Dec 2004 20:03:41 -0000
@@ -72,7 +72,7 @@
 
 #define DEFAULT_BOARD_SIZE 19
 
-#define MIN_BOARD          5       /* Minimum supported board size.   */
+#define MIN_BOARD          2       /* Minimum supported board size.   */
 #define MAX_BOARD         19       /* Maximum supported board size.   */
 #define MAX_HANDICAP       9       /* Maximum supported handicap.     */
 #define MAX_MOVE_HISTORY 500       /* Max number of moves remembered. */
Index: regression/Makefile.am
===================================================================
RCS file: /cvsroot/gnugo/gnugo/regression/Makefile.am,v
retrieving revision 1.79
diff -u -r1.79 Makefile.am
--- regression/Makefile.am      14 Sep 2004 00:30:49 -0000      1.79
+++ regression/Makefile.am      4 Dec 2004 20:03:50 -0000
@@ -19,7 +19,8 @@
       strategy_rot.tst strategy.tst tactics1.tst tactics.tst \
       thrash.tst trevora.tst trevorb.tst trevorc.tst \
       trevord.tst trevor.tst vie.tst viking.tst gifu03.tst seki.tst \
-      9x9.tst unconditional.tst cgf2004.tst kgs.tst olympiad2004.tst
+      9x9.tst unconditional.tst cgf2004.tst kgs.tst olympiad2004.tst \
+      tiny.tst
 
 noinst_SCRIPTS = eval.sh regress.sh test.sh eval3.sh
 
@@ -62,7 +63,7 @@
        env RD=$(srcdir) $(srcdir)/eval.sh $(srcdir)/auto02.tst $(GG_OPTIONS)
        env RD=$(srcdir) $(srcdir)/eval.sh $(srcdir)/auto03.tst $(GG_OPTIONS)
        env RD=$(srcdir) $(srcdir)/eval.sh $(srcdir)/auto04.tst $(GG_OPTIONS)
-      
+
 auto_handtalk: auto_handtalk.tst
        env RD=$(srcdir) $(srcdir)/eval.sh $^
 
@@ -279,6 +280,9 @@
 thrash: thrash.tst
        env RD=$(srcdir) $(srcdir)/eval.sh $^ $(GG_OPTIONS)
 
+tiny: tiny.tst
+       env RD=$(srcdir) $(srcdir)/eval.sh $^ $(GG_OPTIONS)
+
 trevor: trevor.tst
        env RD=$(srcdir) $(srcdir)/eval.sh $^ $(GG_OPTIONS)
 
@@ -389,3 +393,4 @@
        $(srcdir)/regress.sh $(srcdir) cgf2004.tst $(GG_OPTIONS)
        $(srcdir)/regress.sh $(srcdir) kgs.tst $(GG_OPTIONS)
        $(srcdir)/regress.sh $(srcdir) olympiad2004.tst $(GG_OPTIONS)
+       $(srcdir)/regress.sh $(srcdir) tiny.tst $(GG_OPTIONS)
Index: regression/tiny.tst
===================================================================
RCS file: regression/tiny.tst
diff -N regression/tiny.tst
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ regression/tiny.tst 4 Dec 2004 20:03:51 -0000
@@ -0,0 +1,95 @@
+# This test suite contains tests for boards of size 2x2, 3x3, and 4x4.
+
+# Should play on the empty board. (?)
+loadsgf games/tiny/2x2.sgf 1
+1 reg_genmove black
+#? [A1|A2|B1|B2]
+
+# B2 urgent
+loadsgf games/tiny/2x2.sgf 2
+2 reg_genmove white
+#? [B2]
+
+# Black can make two eyes.
+3 reg_genmove black
+#? [B2]
+
+# Black can make two eyes.
+loadsgf games/tiny/2x2.sgf 3
+4 reg_genmove black
+#? [B2]
+
+
+# Taking the center point secures the whole board.
+loadsgf games/tiny/3x3a.sgf 1
+101 reg_genmove black
+#? [B2]
+
+loadsgf games/tiny/3x3a.sgf 3
+102 reg_genmove black
+#? [B1|B3|C2]
+
+loadsgf games/tiny/3x3a.sgf 5
+103 reg_genmove black
+#? [C2]
+
+loadsgf games/tiny/3x3b.sgf 2
+104 reg_genmove white
+#? [B2]
+
+loadsgf games/tiny/3x3b.sgf 3
+105 reg_genmove black
+#? [B3|B1|C2]
+
+loadsgf games/tiny/3x3b.sgf 5
+106 reg_genmove black
+#? [C2]
+
+
+loadsgf games/tiny/4x4a.sgf 1
+201 reg_genmove black
+#? [B2|C2|B3|C3]
+
+loadsgf games/tiny/4x4a.sgf 2
+202 reg_genmove white
+#? [B2]
+
+loadsgf games/tiny/4x4a.sgf 3
+203 reg_genmove black
+#? [B3|C2]
+
+loadsgf games/tiny/4x4a.sgf 4
+204 reg_genmove white
+#? [B3]
+
+loadsgf games/tiny/4x4a.sgf 5
+205 reg_genmove black
+#? [B1|B4|C1|C4]
+
+# C4 might also be okay.
+loadsgf games/tiny/4x4a.sgf 6
+206 reg_genmove white
+#? [C1]
+
+# B1, C4, and D2 might also be okay.
+loadsgf games/tiny/4x4a.sgf 7
+207 reg_genmove black
+#? [A3]
+
+# C4 might also be okay.
+loadsgf games/tiny/4x4a.sgf 8
+208 reg_genmove white
+#? [B1]
+
+# C4 and D2 might also be okay.
+loadsgf games/tiny/4x4a.sgf 9
+209 reg_genmove black
+#? [A2]
+
+loadsgf games/tiny/4x4a.sgf 10
+210 reg_genmove white
+#? [D2]
+
+loadsgf games/tiny/4x4a.sgf 11
+211 reg_genmove black
+#? [D4]
Index: regression/games/tiny/2x2.sgf
===================================================================
RCS file: regression/games/tiny/2x2.sgf
diff -N regression/games/tiny/2x2.sgf
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ regression/games/tiny/2x2.sgf       4 Dec 2004 20:03:51 -0000
@@ -0,0 +1,3 @@
+(;GM[1]FF[4]SZ[2]
+;B[ab];W[aa];B[ba]
+)
Index: regression/games/tiny/3x3a.sgf
===================================================================
RCS file: regression/games/tiny/3x3a.sgf
diff -N regression/games/tiny/3x3a.sgf
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ regression/games/tiny/3x3a.sgf      4 Dec 2004 20:03:51 -0000
@@ -0,0 +1,3 @@
+(;GM[1]FF[4]SZ[3]
+;B[bb];W[ab];B[ba];W[bc];B[cb]
+)
Index: regression/games/tiny/3x3b.sgf
===================================================================
RCS file: regression/games/tiny/3x3b.sgf
diff -N regression/games/tiny/3x3b.sgf
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ regression/games/tiny/3x3b.sgf      4 Dec 2004 20:03:51 -0000
@@ -0,0 +1,3 @@
+(;GM[1]FF[4]SZ[3]
+;B[ab];W[bb];B[ba];W[bc];B[cb]
+)
Index: regression/games/tiny/4x4a.sgf
===================================================================
RCS file: regression/games/tiny/4x4a.sgf
diff -N regression/games/tiny/4x4a.sgf
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ regression/games/tiny/4x4a.sgf      4 Dec 2004 20:03:51 -0000
@@ -0,0 +1,4 @@
+(;GM[1]FF[3]
+SZ[4];B[cb];W[bc];B[cc];W[bb];B[ba];W[cd];B[ab];W[bd];B[ac];W[dc];
+B[da]
+)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]