[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: computer-go: Board representation
Hi Conor,
No, there is no general format for that.
When writing Go playing programs, people generally try to use a format that
enables
very fast mutation and retrieval of relevant data.
If you use a huge database of patterns and you want to do a lot of pattern
matching,
you could use 2 bitfields in 32-bit words, one for all black stones, one for
all white.
But if you pursue a more high-level approach and you will not generate
millions of positions
to examine, you might take a 2-dimensional array.
If you want to have the highest speed, you have to invent something clever.
with several 1-dimensional arrays and bitfields to incrementally adjust the
position
and get the fastest 'answers to questions' of your algorithms that access
the board position.
Regards,
Frank
----- Original Message -----
From: "Conor O' Kane" <cokane@xxxxxxxxxxxxxxxxx>
To: <computer-go@xxxxxxxxxxxxxxxxx>
Sent: Friday, February 15, 2002 1:33 PM
Subject: computer-go: Board representation
> Hi,
>
> I'm working on a Go program as part of a final year project at the
> moment, and I was wondering about how to represent the board as a data
> structure internally? I'm writing the program in Java, and was just
> wondering if there's a universally accepted data structure for the board
> or if each program out there at the moment has their own way of holding
> the info?
>
> Thanks,
> Conor
>
>