[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: computer-go: Sharing Go modules
OK, not everone seems to understand so I'll explain. When mapping a
2-dimensional array onto a 1-dimensional array it wraps around, so the right
edge is the same as the left edge of the next row. I use arrays of length
421 so that it can even move diagonally from each point without going out of
bounds. Anyone who has trouble seeing this should write out the board in a
single long line and you'll see that each stretch of 19 board-points is
separated by a single edge-point. In a 21x21 array, when mapped onto a
1-dimensional array, each stretch of 19 board-points is separated by two
edge-points. It's logical, since 21-19=2.
Mark
> -----Original Message-----
> From: owner-computer-go@xxxxxxxxxxxxxxxxx
> [mailto:owner-computer-go@xxxxxxxxxxxxxxxxx]On Behalf Of
> birk@xxxxxxxxxxxxxxxxx
> Sent: Wednesday, May 16, 2001 10:50 PM
> To: computer-go@xxxxxxxxxxxxxxxxx
> Cc: birk@xxxxxxxxxxxxxxxxx
> Subject: RE: computer-go: Sharing Go modules
>
>
> "Mark Boon" <tesuji@xxxxxxxxxxxxxxxxx> wrote:
>
> > In the early days I started out with a 21x21 array too, until I
> realized it
> > was a mistake. You get a two-point border at the sides, but
> only a one-point
> > border at the top and bottom.
>
> Can you explain that? The board is 19x19; if you center it on a 21x21
> grid that leaves you with a one point boundary all around. You only
> "waste" 4 corner points (0,0),(20,0),(0,20),(20,20).
>
> Christoph
>
>
>
>