Skip to content

Sample MCTS Controller (2 Player)

Raluca D. Gaina edited this page Feb 12, 2018 · 2 revisions

The 2 player sample MCTS controller is programmed in three different classes:

  1. Agent.java: Main class of the agent, that extends class AbstractMultiPlayer. Implements a constructor and the act function. Catches the player's ID, the number of players in the game, the opponent's ID and the actions available to all the players (saved in a static array).
  2. SingleMCTSPlayer.java: Implements MCTS and holds a reference to the root node, object of class SingleTreeNode.
  3. SingleTreeNode.java: Each MCTS node, implementing the typical MCTS operations (uct, expand, rollout, backpropagation, etc.).

To note, the actions assumed for the opponent are always random.

Analogously, Sample OLMCTS also implements a Monte Carlo Tree Search controller, but in an open loop fashion. This means that the states are not stored in the tree, which behaves better in non-deterministic scenarios. The classes are analogous to those from the Sample MCTS controller.

Important: both MCTS implementations use static variables. This means that they will not be able to play against themselves (MCTS vs MCTS or OLMCTS vs OLMCTS). This does not affect the competition as controllers will never play against themselves, but imposes care when testing the framework.

Table of Contents:

Clone this wiki locally