Skip to content

Repository files navigation

About Ray

Ray is a Go (Weiqi, Baduk) game engine based on Monte-Carlo tree search without Deep Learning.

日本語はこちら.

Installation

  1. 'cd' to the directory which includes 'Makefile'
  2. Type 'make' to compile
  3. Place parameter files to sim_params and uct_params directories (You can download parameter files from here)

How to run

When using a GUI that supports GTP (Go Text Protocol), the following command can be used Ray as a engine.

./ray

Ray's command line options are as follows,

Game settings

OptionDescriptionValueExample of valueDefault valueNote
--sizeSize of go boardInteger more then 1 and less than or equal to PURE_BOARD_SIZE9PURE_BOARD_SIZE ( = 19 )PURE_BOARD_SIZE is defined in include/board/Constant.hpp
--komiKomi valueReal number6.5KOMI ( = 6.5 )KOMI is defined in include/board/Constant.hpp
--superkoPositional super ko---Supporting positional super ko only
--handicapThe number of handicap stonesInteger more than 120This option is for debugging.
--cgosCGOS player mode---Activating capturing all dead stones mode

annotation

The --playout option, the --const-time option, and the --time option are effective when specified last, respectively.

Time management and search settings

OptionDescriptionValueExample of valueDefault valueNote
--playoutThe number of playouts per moveInteger more than 01000-
--const-timeTime to thinking per move (seconds)Real number7.5CONST_TIME ( = 10.0)CONST_TIME is defined in include/mcts/SearchManager.hpp
--timeTotal remaining time for a game (minutes)Real number1800.0-
--threadThe number of search threadInteger more than 0 and less than or equal to THREAD_MAX ( = 64 )161THREAD_MAX is defined in include/mcts/UctSearch.hpp
--reuse-subtreeReusing MCTS sub-tree---
--ponderingPondering on opponent's thinking time---
--tree-sizeMaximum number of MCTS nodesInteger power of 216834UCT_HASH_SIZE ( = 16834 )UCT_HASH_SIZE is defined in include/board/ZobristHash.hpp
--resignResign thresholdRean number more than or equal to 0.0 and less than or equal to 1.00.1RESIGN_THRESHOLD ( = 0.20 )RESIGN_THRESHOLD is defined in include/mcts/MoveSelection.hpp

annotation

When the --pondering option is enabled, the --reuse-pondering option is automatically enabled automatically.

Misc

OptionDescriptionValueExample of valueDefault valueNote
--no-debugNo debug message mode---

Example settings

By default settings, Ray will consume 10 seconds each move on a single CPU and require 800MB of memory.

./ray

Playing with 4 sec/move with 8 threads

./ray --const-time 4 --thread 8

Playing with 1000 playouts/move with 1 threads

./ray --playout 1000

Playing with 16 threads and 65536 uct nodes. Time setting is 30 minutes. Ray thinks during the opponent's turn.

./ray --time 1800 --thread 16 --tree-size 65536 --pondering

License

Ray is distributed under the BSD License. Please see the "COPYING" file.

Contact

rayauthor19x19@gmail.com (Yuki Kobayashi)

About

Computer go engine using Monte-Carlo Tree Search (MCTS)

Topics

Resources

Stars

80 stars

Watchers

10 watching

Forks

Releases

Packages

Contributors

Languages