> The problem is that a single MC run takes about 1/5 of a millisecond,
> so it's not worth the overhead of putting it off into another thread.
Creating a thread for each MC simulation is clearly very costy.

> I need some way to tell a thread to do many runs, then somehow
> incorporate the multiple runs back into my search tree. I believe
> others are already doing this and I'm curious how.
Yes we do that in MoGo.

I try to explain the algorithm here:

3 methods:
DescendTheTreeUsingUCT
MCSimulation
UpdateTheTree

At the beginning of a genmove, we create n threads (n==nbProcessors), then 
each thread calls the method "think" which is:

think {
while (time left) {
mutex.lock()
DescendTheTreeUsingUCT
mutex.unlock()
MCSimulation
mutex.lock()
UpdateTheTree
mutex.unlock()
}
}

Each thread has his own data for all except tree (for exemple we keep the 
current sequence, ...).

Is it cleared that way ?

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

Reply via email to