public class SingleMCTSPlayer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Types.ACTIONS[] |
actions |
java.util.Random |
m_rnd
Random generator.
|
SingleTreeNode |
m_root
Root of the tree.
|
int |
num_actions |
Constructor and Description |
---|
SingleMCTSPlayer(java.util.Random a_rnd,
int num_actions,
Types.ACTIONS[] actions) |
Modifier and Type | Method and Description |
---|---|
void |
init(StateObservation a_gameState)
Inits the tree with the new observation state in the root.
|
int |
run(ElapsedCpuTimer elapsedTimer)
Runs MCTS to decide the action to take.
|
public SingleTreeNode m_root
public java.util.Random m_rnd
public int num_actions
public Types.ACTIONS[] actions
public SingleMCTSPlayer(java.util.Random a_rnd, int num_actions, Types.ACTIONS[] actions)
public void init(StateObservation a_gameState)
a_gameState
- current state of the game.public int run(ElapsedCpuTimer elapsedTimer)
elapsedTimer
- Timer when the action returned is due.