public class MCTSPredictor extends MCTS
Modifier and Type | Field and Description |
---|---|
protected int |
agentID |
protected Agent[] |
agents |
DEFAULT_ITERATIONS, DEFAULT_ROLLOUT_DEPTH, DEFAULT_TREE_DEPTH_MUL, logger, NO_LIMIT, random, rolloutDepth, roundLength, treeDepthMul
Constructor and Description |
---|
MCTSPredictor(Agent[] others) |
MCTSPredictor(Agent[] agents,
int roundLength) |
MCTSPredictor(Agent[] agents,
int roundLength,
int rolloutDepth,
int treeDepthMul) |
Modifier and Type | Method and Description |
---|---|
static MCTSPredictor |
buildPMCTSND(Agent[] agents) |
Action |
doMove(int agentID,
GameState state)
Standardised interface for game playing agents.
|
protected Action |
doSuperMove(int agentID,
GameState state) |
static Agent[] |
parseAgents(String agentsStr) |
protected MCTSNode |
select(MCTSNode root,
GameState state,
IterationObject iterationObject) |
protected Action |
selectActionForExpand(GameState state,
MCTSNode node,
int agentID)
Select a new action for the expansion node.
|
protected Action |
selectActionForRollout(GameState state,
int agentID) |
String |
toString() |
buildMCTSND, calculateTreeDepthLimit, expand, rollout
protected Agent[] agents
protected int agentID
public MCTSPredictor(Agent[] others)
public MCTSPredictor(Agent[] agents, int roundLength)
public MCTSPredictor(Agent[] agents, int roundLength, int rolloutDepth, int treeDepthMul)
public static MCTSPredictor buildPMCTSND(Agent[] agents)
public Action doMove(int agentID, GameState state)
Agent
The agent gets a copy of the game state and it's agent ID and should return a move.
protected MCTSNode select(MCTSNode root, GameState state, IterationObject iterationObject)
protected Action selectActionForExpand(GameState state, MCTSNode node, int agentID)
selectActionForExpand
in class MCTS
state
- the game state to travel fromagentID
- the AgentID to use for action selectionnode
- the Node to use for expansionprotected Action selectActionForRollout(GameState state, int agentID)
selectActionForRollout
in class MCTS
Copyright © 2017 FOSS Galaxy. All rights reserved.