This reminds me of my own struggles when I was trying to learn how to program 
computers by trying to make a Go program, about 25 years ago. My first attempt 
was a program that understood the rules and it was huge, 4Kb of assembler. That 
was just the code for the go board, the interface was in Basic. When I redid it 
a few times based on what I learned, the same program got down to 256 bytes. I 
think there can hardly be a better subject to learn about programming.

Mark

On Dec 9, 2011, at 3:14 AM, Jouni Valkonen <[email protected]> wrote:

> Thank you for your theoretical ideas. I will look them and see if I
> can improve my algorithm.
> 
> However, I fixed a bug from the algorithm so that SGF records now are
> working properly. And I improved the kou recognition ability. It still
> cannot fill the kou, but at least it can try to avoid taking it right
> back, although there are some minor problems with it. Now playouts are
> as they should be around 110 moves in length at 9×9.
> 
> I also enhanced the efficiency of algorithm, that it breaks the loops
> if they found what they were looking for. Now it is 100 times faster
> than the original version. This means that playout takes perhaps only
> about 10 milliseconds in 9×9, which is enough for a while, that it is
> worthy to try to make an evaluation function.
> 
> As the algorithm is now fast, board size can be chosen arbitrarily.
> 
> Tessa version 2.0 at 19×19 board
> http://valkonen.kapsi.fi/tessa.php?board=19
> 
>    –Jouni
> 
> 
> On 9 December 2011 14:54, Álvaro Begué <[email protected]> wrote:
>> You can accelerate the detection of whether a chain ran out of
>> liberties or not dramatically by using additional data structures. For
>> instance, you can keep an array of the same size as the board
>> indicating which stone is the leader of the chain. It really doesn't
>> matter which stone you make the leader, but just make sure that all
>> the stones in the chain have the same leader (when you join two chains
>> you change who the leader is for one of them, to make them match). You
>> can then have another array with the size of the board which is
>> indexed by leader and tells you how many "pseudo-liberties" each chain
>> has. A pseudo-liberty is an adjacency to an empty point, but you count
>> the point multiple times if there are multiple stones in the chain
>> that touch it. This number is much easier to update incrementally.
>> 
>> In dimwit we also have an array of 16-bit integers which tell us the
>> contents of the 8 neighbors, so we can determine if something looks
>> like an eye with a single lookup into a precomputed table.
>> 
>> I think these ideas can make your program much, much faster.
>> 
> _______________________________________________
> Computer-go mailing list
> [email protected]
> http://dvandva.org/cgi-bin/mailman/listinfo/computer-go
_______________________________________________
Computer-go mailing list
[email protected]
http://dvandva.org/cgi-bin/mailman/listinfo/computer-go

Reply via email to