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

Re: key subroutines



Hi Stuart

I dont know, if I understand your sentence right. I think you wonder, why
the discussion about the GO programming always gives the feeling, that
there are many complicated algorithms necessary (even for elemetry GO
programms). It seems for me, that you think this could be done much easier.
But you are wrong.

In your 4 example functions the two funkctions liberties() and group() are
of cause no big problem. But the other two {eyes() and alive()} are a very
big problem, which (I think) no one of the world could solve this final
(for all possible situations). At the very first look, it may seem that
writing an algorithm which recognises eyes, could be done with not too much
work. But if you think about it in more detail, you will see what a very
big problem this is. The question is 'What is an "Eye" '? The Go player
uses it with no exeact definition, but if you want to make a program, you
have to define exactly what it is. And this is a very complicated task, if
it should be correct in all possible board situations. The same probem is
for your function alive(). It is not always correct, that a group is alive
if eyes()>1! That depends on your definition of 'eyes', of cause.

The second thing is, that you are wrong, if you think that this 4 functions
are enough. Not only influence() is needed. You need at least:
- a good board/position representation, which is flexible in use
- a good move generator (with heuristic seaching orders, usually called
'best first search')
- seaching algorithms for several purposes (which searches in the game tree
for a special purpose, like connecting, ...)
- a good functions which gives the boardposition (or a part of the board) a
value
...

This are only examples - you need many more things!

Try to write a go program, and you will see that I'm tell you the truth.

Ciao, and I hope, I don't have misunderstand you.

----------------------------------------------------------------
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.
>
>         eyes(g) - calculates the number of eyes of the group g and
>                    returns it
>
>         alive(g) - simply returns 'eyes(g) > 1' - returns true if group
>                     has more than one eye
>
>         group(st) - returns list of stones belonging to the same group
>                     of which stone st is a member
>
> How about others? influence()?