On Wed, Apr 8, 2009 at 13:10, Isaac Deutsch <i...@gmx.ch> wrote: > Hi Lukasz, > > I think I understand the way it is done for storing the stones; I do it > exactly the same way. > > For the liberties: Does the index of the direction (NWSE) state where the > chain is in respect to the liberty? So if you place a single stone on the > board at "position", you add 4 liberties and link them: > - left of position, E > - right of position, W > - below of position, N > - above of position, S > Is that correct?
Yep. I'm thinking about implementing it in libego with heavy playouts for demonstration. Maybe It will get libego some attention. :) > > I have another question. How do you efficiently track visited positions to > avoid superko? > I use zobrist hashing, but the memory it uses is quite big, and I think > copying it from board to board takes a lot of time. Of course I don't do > superko checks in the playouts, but in the UCT tree I have to check for it. I use zobrist hashing as well. But the random base is separated from board and shared so I don't copy it. I copy just a xor hash which is no more than 8 bytes per board. > > Isaac > >> Now the liberties. One liberty can be in many groups. But in only as many >> as 4. >> Let's call links between neighboring vertices "pseudoliberties". >> Now we can create a structure similar to chain_next_v that track all >> pseudo-liberties of a group. >> It would be again map implemented as an array indexed by vertex and >> direction (N,W,S,E). >> >> Now when you merge you just go over this list and throw away >> duplicates. This can be done in linear time >> using another map-array vertex -> bool. That will have info whether >> particular liberty (vertex without direction) was already in visited. >> >> Hope this helps :) >> Lukasz > > -- > Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss > für nur 17,95 Euro/mtl.!* > http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a > _______________________________________________ > 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/