public class SingleMCTSPlayer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
iters |
java.util.Random |
m_rnd
Random generator.
|
SingleTreeNode |
m_root
Root of the tree.
|
static int |
num |
Constructor and Description |
---|
SingleMCTSPlayer(java.util.Random a_rnd)
Creates the MCTS player with a sampleRandom generator object.
|
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 static int iters
public static int num
public SingleMCTSPlayer(java.util.Random a_rnd)
a_rnd
- sampleRandom generator object.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.