[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Tiny boards
From: |
Gunnar Farnebäck |
Subject: |
Re: [gnugo-devel] Tiny boards |
Date: |
Wed, 15 Dec 2004 04:26:34 +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) |
John wrote:
> I can see 0x0 being a bit questionable, but 1x1 makes a good
> test-case if nothing else.
If you insist...
The patch below reduces MIN_BOARD to 1 and avoids to resign
immediately on 1x1 and 2x2.
> And if GnuGo is to allow non-square boards, then 1x2 offers some
> opportunities for fun play and testing of ko rule implementations...
Non-square boards would require a fair bit of infrastructural
upgrades. It's much, much easier now than it was before we changed to
1D board representation, but still some work. I don't feel it's worth
the trouble at this time but if someone does it would probably get
accepted.
/Gunnar
Index: engine/board.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/board.h,v
retrieving revision 1.19
diff -u -r1.19 board.h
--- engine/board.h 7 Dec 2004 04:31:05 -0000 1.19
+++ engine/board.h 15 Dec 2004 03:25:51 -0000
@@ -72,7 +72,7 @@
#define DEFAULT_BOARD_SIZE 19
-#define MIN_BOARD 2 /* Minimum supported board size. */
+#define MIN_BOARD 1 /* 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: engine/genmove.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/genmove.c,v
retrieving revision 1.100
diff -u -r1.100 genmove.c
--- engine/genmove.c 7 Dec 2004 04:50:02 -0000 1.100
+++ engine/genmove.c 15 Dec 2004 03:25:52 -0000
@@ -751,7 +748,7 @@
* it looks like all our dragons are dead and the generated move
* is a pass.
*/
- if (move == PASS_MOVE && !lively_dragon_exists(color))
+ if (board_size > 2 && move == PASS_MOVE && !lively_dragon_exists(color))
return 1;
if (move == PASS_MOVE