               GNU GO - the game of Go (Wei-Chi)
               Version 1.1   last revised 3-1-89
         Copyright (C) Free Software Foundation, Inc.
                    written by Man L. Li
                    modified by Wayne Iba
                   documented by Bob Webber

This program is the updated version of Hugo (Version 1.0).  It is an
attempt to start a free program to play Go.  The idea is based on the
article "Programming the Game of Go. Byte, Vol.6 No.4" by J. K. Millen.

Currently, this program only understands basic Go rules and play skills.
It counts the number of liberty for each board piece.  Computer move is
generated by choosing among several possible moves to attack the opponent,
defense own pieces and match playing patterns.  If no good move is found
then random move will be generated.  It doesn't have the concept of eye
although it will try to form one.

The program is written in C running on Sun and IBM PC.  The only difference
is the function to get system time as the seed for the random number
generator.  It can easily ported to other systems by changing this function.
Computer Innovation C86 compiler is used for the PC version.  To use other
C compilers, simple change is required.

You are encouraged to send in enhencement, suggestion, bug/fix for this
program.  Future release can be obtained from Free Software Foundation and
usenet rec.games.go newsgroup.

This package contains the following files:

README - you are reading it.

COPYING - GNU general public license

Documentation - description of each function

Makefile - file to compile gnugo program on Sun

make.bat - file to compile gnugo program on IBM PC with C86 compiler

objs - linking list used by make.bat

count.c - count liberty of one piece

countlib.c - count liberty of pieces

endgame.c - bookkeeping at end of game

eval.c - evaluate liberty

exambord.c - update game board

findcolr.c - find connected pieces of the same color

findnext.c - find move to defense against attack and function to evaluate move

findopen.c - find opponent liberty and choose move to attack

findpatn.c - match play patterns for next move

findsavr.c - check own weakness to defense

findwinr.c - find opponent weakness to attack

fioe.c - check if fill in its own eye

genmove.c - main function to generate computer move

getij.c - convert move string to board position

getmove.c - read move or command from human player

initmark.c - initialize marking array

main.c - gnugo main program

matchpat.c - match play pattern

opening.c - generate game opening moves

openregn.c - check open region

patterns.c - playing patterns

random.c - random number generator

seed.c - start random number generator seed

sethand.c - setup handicap pieces

showbord.c - show GO board and stone positions

showinst.c - show instruction on game playing

suicide.c - check illegal move if suicide

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation - version 1.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License in file COPYING for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Please report any bug/fix, modification, suggestion to

mail address:   Man L. Li
                Dept. of Computer Science
                University of Houston
                4800 Calhoun Road
                Houston, TX 77004

e-mail address: manli@cs.uh.edu         (Internet)
                coscgbn@uhvax1.bitnet   (BITNET)
                70070,404               (CompuServe)

To recompile gnugo, type:

	make -f Makefile.coh

To install, su to root and then type:

	Install.coh

"gnugo" was originally port to Coherent by Rick Nickel (rick@think.com).

/*
                GNU GO - the game of Go (Wei-Chi)
                Version 1.1   last revised 3-1-89
           Copyright (C) Free Software Foundation, Inc.
                      written by Man L. Li
                      modified by Wayne Iba
                    documented by Bob Webber
*/
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation - version 1.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License in file COPYING for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Please report any bug/fix, modification, suggestion to

mail address:   Man L. Li
                Dept. of Computer Science
                University of Houston
                4800 Calhoun Road
                Houston, TX 77004

e-mail address: manli@cs.uh.edu         (Internet)
                coscgbn@uhvax1.bitnet   (BITNET)
                70070,404               (CompuServe)
*/

#define  SUN  68000

#include <stdio.h>

showinst()
/* show program instructions */
{
 printf("XOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX");
 printf("OXOXOXOXOXOX\n");
 printf("O                                                                  ");
 printf("           O\n");
 printf("X                           GNU GO (Previously Hugo)               ");
 printf("           X\n");
 printf("O                           the game of Go (Wei-Chi)               ");
 printf("           O\n");
 printf("X                                                                  ");
 printf("           X\n");
 printf("O                            version 1.1    3-1-89                 ");
 printf("           O\n");
 printf("X              Copyright (C) 1989 Free Software Foundation, Inc.   ");
 printf("           X\n");
 printf("O                              Author: Man L. Li                   ");
 printf("           O\n");
 printf("X         GNU GO comes with ABSOLUTELY NO WARRANTY; see COPYING for");
 printf("           X\n");
 printf("O         detail.   This is free software, and you are welcome to  ");
 printf("           O\n");
 printf("X         redistribute it; see COPYING for copying conditions.     ");
 printf("           X\n");
 printf("O                                                                  ");
 printf("           O\n");

#ifdef SUN

 printf("X              Please report all bugs, modifications, suggestions  ");
 printf("           X\n");
 printf("O                         to manli@cs.uh.edu  (Internet)           ");
 printf("           O\n");

#endif

 printf("X                                                                  ");
 printf("           X\n");
 printf("OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXO");
 printf("XOXOXOXOXOXO\n");
 printf("\n\n\n\n\n\n\n\nPress return to continue");
 getchar();
 printf("\n\nTo play this game first select number of handicap pieces (0 to");
 printf(" 17) for the\nblack side.  Next choose your color (black or white).");
 printf("  To place your piece,\nenter your move as coordinate on the board");
 printf(" in column and row.  The column\nis from 'A' to 'T'(excluding 'I').");
 printf("  The row is from 1 to 19.\n\nTo pass your move enter 'pass' for");
 printf(" your turn.  After both you and the computer\npassed the game will");
 printf(" end.  To save the board and exit enter 'save'.  The game\nwill");
 printf(" continue the next time you start the program.  To stop the game in");
 printf(" the\nmiddle of play enter 'stop' for your move.  You will be");
 printf(" asked whether you want\nto count the result of the game.  If you");
 printf(" answer 'y' then you need to remove the\nremaining dead pieces and");
 printf(" fill up neutral turf on the board as instructed.\nFinally, the");
 printf(" computer will count all pieces for both side and show the result.\n\n");
}  /* end showinst */

