I considered something similar. But instead of using a win count and a loss count, I use a win count and a simulation count. In that scenario, you would
update the simulation count immediately, and then maybe update the wincount once you know the result. But I haven't tried it either.
Álvaro Begué wrote:
I haven't implemented this successfully, so I probably shouldn't be
giving advice to anyone, but what I was trying to do when we stopped
developing dimwit was the following:
* When a thread enters a node of the UCT tree, increment the number
of losses (This will discourage other threads from entering the same
branch).
* When you want find out if the playout was actually a win or a loss,
increment the wins counter and decrement the losses counter.
All the manipulations can be done without locks with a tiny little bit
of assembly or with intrinsic functions.
If you need details, I can try to get you sample code for Mac OS X or
Linux (both on x86).
Álvaro.
On Mon, Apr 13, 2009 at 6:08 PM, Rémi Coulom <remi.cou...@univ-lille3.fr> wrote:
Michael Williams wrote:
What tricks are people doing to minimize the performance degradation due
to multiple threads contending for access to the tree (in MCTS)? Do you
only lock a portion of the tree? How would that work?
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/
If you are motivated, you can try a completely lockless solution:
http://computer-go.org/pipermail/computer-go/2008-March/014537.html
It scales well up to 16 cores:
http://computer-go.org/pipermail/computer-go/2008-March/014547.html
Using a single global lock is really very inefficient, especially for 9x9 or
if you have many cores.
Rémi
_______________________________________________
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/
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/