Skip to content
Monte carlo tree search in python
Branch: master
Clone or download
Latest commit 0a89413 Oct 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
games fundamental refactoring / simplifications / tests do not work now Feb 17, 2018
mcts fundamental refactoring / simplifications / tests do not work now Feb 17, 2018
tests test fix Mar 23, 2018
.gitignore
LICENSE
README.md readme Mar 23, 2018

README.md

Implementation of basic Monte Carlo Tree Search algorithm for Tic Tac Toe

This is supplementary code for Monte Carlo Tree Search tutorial blog post here

to run try:

import numpy as np
from mcts.nodes import *
from mcts.search import MonteCarloTreeSearch
from games.tictactoe import TicTacToeGameState

state = np.zeros((3,3))
initial_board_state = TicTacToeGameState(state = state, next_to_move = 1)

root = TwoPlayersGameMonteCarloTreeSearchNode(state = initial_board_state, parent = None)
mcts = MonteCarloTreeSearch(root)
best_node = mcts.best_action(1000)
You can’t perform that action at this time.