|
Post by steadyeddie on Dec 18, 2016 6:12:41 GMT -8
It seems there are more ways to skin the cat than I might have thought, so this is not necessarily the best HLD. In fact, it sounds to me like General's "no selection thread" model might be better approach. Anyway, here's what I do: ⦁ Player. Send/receives moves. Counts down time. ⦁ Game Control. - Interacts with the Player to get moves, and send them
- Owns the tree. No other thread can touch the tree.
- Select node, and create work items for rollout, expansion, and confidence workers
- Process results from the rollout, expansion and search workers.
⦁ Node. Information about a MCTS node that is basically the tree. ⦁ RolloutThread, Expansion and Confidence workers. Take work items to perform work, execute it and post the result back to the control thread.
|
|
|
Post by Andrew Rose on Jan 27, 2017 12:33:56 GMT -8
What do you use as your work-passing mechanism? (I think I recall getting good performance improvements by using the Disruptor method, as espoused on the Mechanical Sympathy blog.)
Interestingly, not having a distinct tree thread is one of my reasons for wondering about starting again (see comment on part 2). The tree thread is obviously a scalability issue and, as we mostly move to higher core counts (rather than faster cores), it's going to be an increase handicap. Figuring out how to do appropriate locking on the tree without it becoming a huge overhead might be a hard problem to solve, though.
|
|