[Top][All Lists]

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

Re: [gnugo-devel] GTP GnuGo and small boards

From: Allan Crossman
Subject: Re: [gnugo-devel] GTP GnuGo and small boards
Date: Sat, 6 Oct 2001 23:02:01 +0100

The official answer is that boards smaller than 9x9 are not really
supported by GNU Go. If someone tracks the bug down a fix will of
course be accepted anyway. Personally I won't bother with it, but it
could be a good exercise for someone who wants to start learning about
the inner workings of the engine.

I do realize that small boards aren't too well supported, but I thought a well-behaved GTP engine shouldn't crash like this. :)

I don't have the abilities to do a real fix, but the following is a workaround that at least makes the problem cause a graceful error.

diff -u play_gtp.c play_gtp_fixed.c
--- play_gtp.c  Sun Sep 30 11:56:03 2001
+++ play_gtp_fixed.c    Sat Oct  6 22:59:32 2001
@@ -298,8 +298,11 @@
   int boardsize;
   if (sscanf(s, "%d", &boardsize) < 1)
     return gtp_failure(id, "boardsize not an integer");
-  if (boardsize < MIN_BOARD || boardsize > MAX_BOARD)
+/* FIXME: The following should be: if (boardsize < MIN_BOARD || boardsize > MAX_BOARD) + but actually a boardsize under 5 will crash GnuGo in GTP mode for some reason. */
+  if (boardsize < 5 || boardsize > MAX_BOARD)
     return gtp_failure(id, "unacceptable boardsize");

   board_size = boardsize;

reply via email to

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