Monte Carlo Tree Search
**Example:** Consider a game of Tic-Tac-Toe. The player can move in any empty space on the board. The player receives a reward of +1 for winning and -1 for losing.
**Constraints:** The game is played on a 3x3 board, the player starts with a random move, and the opponent starts with a random move. The player can only move in an empty space.
Implement the Monte Carlo Tree Search algorithm to find the optimal policy for this game.
Test Cases
Test Case 1
Input:
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]Expected:
1Test Case 2
Input:
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]Expected:
1+ 3 hidden test cases