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

Internal representation of the board



A very small and low level detail...

At 10.08 28/03/99 -0800, David Fotland wrote:

>I use a 19x19 board representation, so checking the 2 or 3 or 4 adjacent
>points
>has a little bit of overhead.  If I had to start over I would use a 21x21
>board
>to make this faster, but it's too late now to rewrite all that code :(
>
>David

Thanks to you all for the very enlightening discussion!!

I have no go playing program so far, I'm simply playing with an SGF browser
and IGS client program... old stuff for all of you, I think, but I need
practice... I have started from scratch three times now and I do not see an
end yet (things usually start with a 'brilliant' idea and then end up
terribly convoluted...).

Anyway, coming back to the topic. I discovered that even 21x21 board
representation is not enough and I need 23x23, mainly for liberty count.

This is why.

Counting the liberties of a stone at, say, the (n, m) point, if the (n-1,
m) point is empty I need to check if the (n-2, m) point contains a stone
belonging to the same string, in which case the (n-1, m) point is NOT an
additional liberty of the string. To do that without any concern for
special cases (borders, corners, etc.), I need a 'border' 2 stones wide all
around the board, for a total internal board size fo 23x23.

Just my 1 cent contribution...

	Maurizio M. Gavioli

    /==========================================\
    |  ___________    Maurizio M. Gavioli      |
    |  / /  / /  /         LAGO snc.           |
    |   /    / _/       p.za Ghiberti 6,       |
    |                 I-50122 Firenze, ITALY   |
    \==========================================/