I'm afraid I don't follow you. I THINK I'm doing what you describe.
My Player object creates several threads, each of which plays a game.
After all of the games are completed, the main thread incorporates
them into the search tree. Here's the Java:
timer.schedule(interrupt, MSEC_PER_MOVE);
while (!currentThread().isInterrupted()) {
// Create and start the threads
for (int i = 0; i < NUMBER_OF_THREADS; i++) {
runnables[i].prepareForLongUndo();
threads[i] = new Thread(runnables[i]); // I suspect this is the
expensive part
threads[i].start();
}
// Wait for all of the threads to finish (code omitted)
// Incorporate games
for (int i = 0; i < NUMBER_OF_THREADS; i++) {
incorporateRun(runnables[i].getBoard());
runnables[i].longUndo();
}
}
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.
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.
Remi? Sylvain?
Peter Drake
Assistant Professor of Computer Science
Lewis & Clark College
http://www.lclark.edu/~drake/
On Dec 7, 2006, at 9:41 AM, steve uurtamo wrote:
Those of you with multithreaded UCT programs -- how
do you do it?
Doesn't UCT pretty much require updating a common
data structure
after each MC run?
you could hand a job (starting position) to each
thread and have the thread manager update a shared
memory segment that they all can read from (but not
write to).
or are you talking about networked threads?
s.
______________________________________________________________________
______________
Have a burning question?
Go to www.Answers.yahoo.com and get answers from real people who know.
_______________________________________________
computer-go mailing list
[email protected]
http://www.computer-go.org/mailman/listinfo/computer-go/
_______________________________________________
computer-go mailing list
[email protected]
http://www.computer-go.org/mailman/listinfo/computer-go/