Monte Carlo algorithm for Tic Tac Toe