Skip to content

Consists of MCTS implementation on Tic Tac Toe (chess engine analog of tic tac toe)

Notifications You must be signed in to change notification settings

N-dimensions/board-game-engines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe-engine

Consists of MCTS implementation on Tic-Tac-Toe
the engine has various commands which allows you to
play against it from given position, analyse different positions and also specify details. (Preffered Compiler - MSVC)
It uses MCTS (Monte Carlo Tree Search) where it conducts random playouts in a systematic manner.
commands work as follows
help() -> will give list of all commands (only 7 including help()...)
play_start().ON -> to play against the engine from start (toggle to OFF if you don't want engine analysis)
play_from().ON -> to play against the engine from specified position (same thing for toggling)
after passing the command you have to specify the position.

how to give position?
position has to be a 9 character long string, first 3 characters represent
the top row, next 3 represent the middle row, last 3 represent the last row
char "X" denotes X at the position, char "O" denotes O at the position,
char "_" denotes unoccupied position.

how to play against the engine?
just type the position of the char in the position string (which starts from 0)
example, input of 0 at _________ will make it X________.

analyse() -> to get engine analysis for a particular position, after passing the command you have to specify the position.
set playouts_primary -> setting primary playouts (see analyse function's working) default 10 (specify after passing command)
set playouts_secondary -> setting secondary playouts (see analyse function's working) default 10 (specify after passing command)
terminate() -> exit the main function
(All header files (.h files) and cpp files have been written by the author (i.e. N-dimensions))
tic-tac-toe_output_1 tic-tac-toe_output_2

About

Consists of MCTS implementation on Tic Tac Toe (chess engine analog of tic tac toe)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages