public class SingleMCTSPlayer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
id |
int |
iters |
java.util.Random |
m_rnd
Random generator.
|
SingleTreeNode |
m_root
Root of the tree.
|
int |
no_players |
int |
num |
int |
oppID |
Constructor and Description |
---|
SingleMCTSPlayer(java.util.Random a_rnd,
int[] NUM_ACTIONS,
Types.ACTIONS[][] actions,
int id,
int oppID,
int no_players)
Creates the MCTS player with a sampleRandom generator object.
|
Modifier and Type | Method and Description |
---|---|
void |
init(StateObservationMulti 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 iters
public int num
public int id
public int oppID
public int no_players
public SingleMCTSPlayer(java.util.Random a_rnd, int[] NUM_ACTIONS, Types.ACTIONS[][] actions, int id, int oppID, int no_players)
a_rnd
- sampleRandom generator object.public void init(StateObservationMulti a_gameState)
a_gameState
- current state of the game.public int run(ElapsedCpuTimer elapsedTimer)
elapsedTimer
- Timer when the action returned is due.