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

Re: key subroutines



I would start with the trival ones:

groups of stones, liberty counts, lists of liberties,
lists of adjacent enemy groups, counts at each point
of adjacent empty points, adjacent groups of each
color.

Then write some simple heuristics for group strength.
It takes forever to get group strength right, so if
you try to get it perfect, you will never have anything that
plays go.

Then write a low liberty count tactics module.  Every program
needs one.

Then write a pattern matcher to suggest moves at the full board,
and enter a few hundred patterns to start.  Now you have 
a respectable program for just a few months work.

David

At 07:02 PM 4/15/99 -0700, Stuart Cracraft wrote:
>I was curious what you folks think are the key Go-type
>subroutines for a GO program to have at its beginning
>and how hard they are to write (likely to impossible
>to semi-perfect only)
>
>All I could think of are:
>
>	liberties(gst) - calculates and returns number of liberties of
>			 any stone st or group. Only the intersection
>			 of the stone needs to be supplied. 

trivial to write.  for tactical search, make it incremental, and
it is a little more complex, but still pretty easy.

>
>	eyes(g) - calculates the number of eyes of the group g and
>		   returns it

impossible to write for the general case or eyes of any shape,
and considering tactics on the surorunding groups.

>
>	alive(g) - simply returns 'eyes(g) > 1' - returns true if group
>		    has more than one eye

trivial to write if can do the last one.  if you track 1/2 eyes, it
had better be eyes >= 2 rathern eyes > 1.

>
>	group(st) - returns list of stones belonging to the same group
>		    of which stone st is a member

trivial.

>
>How about others? influence()?
>
>--Stuart
>
>
>