Got it -- now I'm getting just under 10,000 games per second! Whee!
(FWIW, I actually don't have the UCT part in there yet -- these are
purely random games.)
Peter Drake
Assistant Professor of Computer Science
Lewis & Clark College
http://www.lclark.edu/~drake/
On Dec 7, 2006, at 10:07 AM, Peter Drake wrote:
Aha! Now I get it. You only have to look at the tree during the
opening part of the run. Once you've fallen off and are making
purely random moves, you can let someone else use the tree.
Thanks!
Peter Drake
Assistant Professor of Computer Science
Lewis & Clark College
http://www.lclark.edu/~drake/
On Dec 7, 2006, at 9:59 AM, [EMAIL PROTECTED] wrote:
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/
_______________________________________________
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/