My realization of Monte-Carlo tree search algorithm.
Explanation available in Wikipedia (https://en.wikipedia.org/wiki/Monte_Carlo_tree_search). My explanation available as article on Habrahabr (https://habrahabr.ru/post/330092/) and here in file Article_Ru.md (both in russian).
This is just example, so don't be surprised by some shitty code and etc.
My tic-tac-toe game uses bot based on MCTS. First of all, bot plays 10 games with another bot, not based on MCTS. Then MCTS-bot plays with player.