2009/4/8 Gunnar Farnebäck <gun...@lysator.liu.se>:
> Łukasz Lew wrote:
>>>> ...
>>>> For a reference you can take a look for a libego implementation:
>>> Ah, so you already use this idea in libego?
>>
>> libego uses this idea only for list of stones in chain.
>> list of liberties are not implemented.
>> but I guess I will implement it sometime soon.
>
> You can find this idea in the GNU Go montecarlo board implementation,
> although with doubly linked lists, see for example
> http://git.savannah.gnu.org/cgit/gnugo.git/tree/engine/montecarlo.c
> starting at line 43. This code is doing quite a lot of book-keeping to
> support tunable pattern-based heavy playouts, however, so it may be
> easier to start with a previous iteration of the code at
> http://git.savannah.gnu.org/cgit/gnugo.git/tree/engine/montecarlo.c?id=67cc097ed8c7e326d3b1659ca668326e23f65c3b
Indeed that's almost exactly what I meant.
I can see that you are using doubly linked list to have a constant
time liberty_edge removal. Is there any other reason?
Have you considered amortized constant time (we remove it when we have
an occasion) approach?

Lukasz
PS
This is nice code to read :)

>
> /Gunnar
> _______________________________________________
> computer-go mailing list
> computer-go@computer-go.org
> http://www.computer-go.org/mailman/listinfo/computer-go/
>
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to