go-atari-montecarlo, v1.2
Posted on

The library that implements an Atari Go engine based on the Monte Carlo tree search algorithm.
Remove redundant features.
Change Log
- remove:
- separate representation of a game result;
- node scoring by node win rate;
- resetting of iteration terminators;
- move searchers:
- searcher that reuses a built tree;
- fallback searcher that uses an additional searcher when the primary one returns an error;
- improve:
- move selectors:
- simplify:
- constructing of node group;
- architecture of move selectors;
- optimize node scoring by the Upper Confidence Bound algorithm;
- simplify:
- add a universal utility for parallel processing.
- move selectors:
Features
- move searching via the Monte Carlo tree search algorithm:
- move selectors:
- random selecting;
- selecting by a maximal node score:
- scoring by the Upper Confidence Bound algorithm;
- game simulating by simple random rollout;
- tree building:
- by a single pass;
- by iterative passes:
- iteration terminating:
- by a pass;
- by a time;
- iteration terminating:
- move searchers:
- searcher that doesn't reuse a built tree;
- move selectors:
- optimization via parallel move searching:
- parallel game simulating:
- of a single node child;
- of all node children;
- parallel tree building;
- parallel game simulating:
- easily extensible and composable architecture:
- of move selectors:
- of node scorers;
- of game simulators;
- of tree builders:
- of iteration terminators;
- of move searchers.
- of move selectors:
Benchmarks
Without parallelism:
BenchmarkSearch_with5Passes-8 300 4742169 ns/op
BenchmarkSearch_with10Passes-8 200 9232705 ns/op
BenchmarkSearch_with15Passes-8 100 13969380 ns/op
BenchmarkSearch_with20Passes-8 100 18659831 ns/op
With parallel game simulating of a single node child:
BenchmarkSearch_withParallelSimulatorAnd5Passes-8 100 12154846 ns/op
BenchmarkSearch_withParallelSimulatorAnd10Passes-8 50 24416774 ns/op
BenchmarkSearch_withParallelSimulatorAnd15Passes-8 30 37238231 ns/op
BenchmarkSearch_withParallelSimulatorAnd20Passes-8 30 49606338 ns/op
With parallel game simulating of all node children:
BenchmarkSearch_withParallelBulkySimulatorAnd5Passes-8 50 27779097 ns/op
BenchmarkSearch_withParallelBulkySimulatorAnd10Passes-8 20 61114056 ns/op
BenchmarkSearch_withParallelBulkySimulatorAnd15Passes-8 20 110363599 ns/op
BenchmarkSearch_withParallelBulkySimulatorAnd20Passes-8 10 183186149 ns/op
With parallel tree building:
BenchmarkSearch_withParallelBuilderAnd5Passes-8 100 17207899 ns/op
BenchmarkSearch_withParallelBuilderAnd10Passes-8 30 34048898 ns/op
BenchmarkSearch_withParallelBuilderAnd15Passes-8 30 51624139 ns/op
BenchmarkSearch_withParallelBuilderAnd20Passes-8 20 68313262 ns/op
Repository
Link: https://github.com/thewizardplusplus/go-atari-montecarlo/tree/v1.2.
Content: code.
License: MIT.
Screenshots
Comparing benchmarks of v1.1 and v1.2
