Monte Carlo Tree Search

forked from @b/mcts

This is a simulation of two agents, using Monte Carlo Tree Search, competing in a game of Tic-Tac-Toe. One agent, with the mcts.py behavior, searches the game tree to find the optimal move to make that will win. If both agents use the behavior, the game will almost certainly result in a tie.

Globals: "rollouts": number of iterations training the model to search the game tree. The larger the iterations, the more likely the agent will find the optimal strategy.

The model is an adaptation of a public domain implementation of MCTS by Luke Harold Miles.