Class MCTS<N,A>
- java.lang.Object
-
- Type Parameters:
N
- Type of states (nodes)A
- Type of actions
- All Implemented Interfaces:
java.lang.Iterable<org.api4.java.algorithm.events.IAlgorithmEvent>
,java.util.concurrent.Callable<IPolicy<N,A>>
,java.util.Iterator<org.api4.java.algorithm.events.IAlgorithmEvent>
,org.api4.java.algorithm.IAlgorithm<IMDP<N,A,java.lang.Double>,IPolicy<N,A>>
,org.api4.java.common.control.ICancelable
,org.api4.java.common.control.ILoggingCustomizable
,org.api4.java.common.event.IEventEmitter<java.lang.Object>
,org.api4.java.common.event.IRelaxedEventEmitter
- Direct Known Subclasses:
BRUE
,DNGMCTS
,EnsembleMCTS
,FixedCommitmentMCTS
,PlackettLuceMCTS
,SPUCT
,TAGMCTS
,UCT
,UUCT
public class MCTS<N,A> extends ai.libs.jaicore.basic.algorithm.AAlgorithm<IMDP<N,A,java.lang.Double>,IPolicy<N,A>>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPolicy<N,A>
call()
void
enforcePrefixPathOnAllRollouts(org.api4.java.datastructure.graph.ILabeledPath<N,A> path)
org.api4.java.datastructure.graph.ILabeledPath<N,A>
getEnforcedPrefixPath()
java.lang.String
getLoggerName()
int
getMsSpentInRollouts()
int
getMsSpentInTreePolicyQueries()
int
getMsSpentInTreePolicyUpdates()
int
getNumberOfNodesInMemory()
int
getNumberOfRealizedPlayouts()
java.util.List<A>
getPotentialActions(org.api4.java.datastructure.graph.ILabeledPath<N,A> path, java.util.Collection<A> applicableActions)
IPathUpdatablePolicy<N,A,java.lang.Double>
getTreePolicy()
boolean
hasTreePolicyReachedLeafs()
boolean
isTabooExhaustedNodes()
org.api4.java.algorithm.events.IAlgorithmEvent
nextWithException()
void
setLoggerName(java.lang.String name)
-
Methods inherited from class ai.libs.jaicore.basic.algorithm.AAlgorithm
activate, announceTimeoutDetected, avoidReinterruptionOnShutdownOnCurrentThread, cancel, checkAndConductTermination, checkTermination, computeTimeoutAware, getActivationTime, getConfig, getDeadline, getId, getInput, getListeners, getNumCPUs, getRemainingTimeToDeadline, getState, getTimeout, getTimeoutPrecautionOffset, hasNext, hasThreadBeenInterruptedDuringShutdown, interruptThreadAsPartOfShutdown, isCanceled, isShutdownInitialized, isStopCriterionSatisfied, isTimeoutDefined, isTimeouted, iterator, next, post, registerActiveThread, registerListener, resolveShutdownInterruptOnCurrentThread, setConfig, setDeadline, setMaxNumThreads, setNumCPUs, setState, setTimeout, setTimeout, setTimeoutPrecautionOffset, shutdown, terminate, unregisterActiveThread, unregisterThreadAndShutdown
-
-
-
-
Method Detail
-
getPotentialActions
public java.util.List<A> getPotentialActions(org.api4.java.datastructure.graph.ILabeledPath<N,A> path, java.util.Collection<A> applicableActions)
-
nextWithException
public org.api4.java.algorithm.events.IAlgorithmEvent nextWithException() throws java.lang.InterruptedException, org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException, org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException, org.api4.java.algorithm.exceptions.AlgorithmException
- Throws:
java.lang.InterruptedException
org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException
org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
org.api4.java.algorithm.exceptions.AlgorithmException
-
getNumberOfRealizedPlayouts
public int getNumberOfRealizedPlayouts()
-
getTreePolicy
public IPathUpdatablePolicy<N,A,java.lang.Double> getTreePolicy()
-
call
public IPolicy<N,A> call() throws java.lang.InterruptedException, org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException, org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException, org.api4.java.algorithm.exceptions.AlgorithmException
- Throws:
java.lang.InterruptedException
org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException
org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
org.api4.java.algorithm.exceptions.AlgorithmException
-
enforcePrefixPathOnAllRollouts
public void enforcePrefixPathOnAllRollouts(org.api4.java.datastructure.graph.ILabeledPath<N,A> path)
-
getEnforcedPrefixPath
public org.api4.java.datastructure.graph.ILabeledPath<N,A> getEnforcedPrefixPath()
-
setLoggerName
public void setLoggerName(java.lang.String name)
-
hasTreePolicyReachedLeafs
public boolean hasTreePolicyReachedLeafs()
-
getLoggerName
public java.lang.String getLoggerName()
-
getNumberOfNodesInMemory
public int getNumberOfNodesInMemory()
-
getMsSpentInRollouts
public int getMsSpentInRollouts()
-
getMsSpentInTreePolicyQueries
public int getMsSpentInTreePolicyQueries()
-
getMsSpentInTreePolicyUpdates
public int getMsSpentInTreePolicyUpdates()
-
isTabooExhaustedNodes
public boolean isTabooExhaustedNodes()
-
-