Class AUpdatingPolicy<N,A>
- java.lang.Object
-
- ai.libs.jaicore.search.algorithms.mdp.mcts.uct.AUpdatingPolicy<N,A>
-
- All Implemented Interfaces:
IPathUpdatablePolicy<N,A,java.lang.Double>
,IPolicy<N,A>
,org.api4.java.common.control.ILoggingCustomizable
- Direct Known Subclasses:
UCBPolicy
public abstract class AUpdatingPolicy<N,A> extends java.lang.Object implements IPathUpdatablePolicy<N,A,java.lang.Double>, org.api4.java.common.control.ILoggingCustomizable
-
-
Constructor Summary
Constructors Constructor Description AUpdatingPolicy(double gamma, boolean maximize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description A
getAction(N node, java.util.Collection<A> possibleActions)
abstract A
getActionBasedOnScores(java.util.Map<A,java.lang.Double> scores)
EBehaviorForNotFullyExploredStates
getBehaviorWhenActionForNotFullyExploredStateIsRequested()
double
getGamma()
NodeLabel<A>
getLabelOfNode(N node)
java.lang.String
getLoggerName()
abstract double
getScore(N node, A action)
boolean
isMaximize()
void
setBehaviorWhenActionForNotFullyExploredStateIsRequested(EBehaviorForNotFullyExploredStates behaviorWhenActionForNotFullyExploredStateIsRequested)
void
setLoggerName(java.lang.String name)
void
updatePath(org.api4.java.datastructure.graph.ILabeledPath<N,A> path, java.util.List<java.lang.Double> scores)
Note that this is a transposition-based and hence, only partially path-dependent, update.
-
-
-
Method Detail
-
getActionBasedOnScores
public abstract A getActionBasedOnScores(java.util.Map<A,java.lang.Double> scores)
-
updatePath
public void updatePath(org.api4.java.datastructure.graph.ILabeledPath<N,A> path, java.util.List<java.lang.Double> scores)
Note that this is a transposition-based and hence, only partially path-dependent, update. The labels are associated to nodes of the original MDP (states) and not to nodes in the MCTS search tree (paths)! This means that, in fact, several paths are (partially) updated simultanously. However, on all other paths crossing the nodes on the updated paths, only those situations are updated and not the situations in higher nodes of the search tree.- Specified by:
updatePath
in interfaceIPathUpdatablePolicy<N,A,java.lang.Double>
-
isMaximize
public boolean isMaximize()
-
getLoggerName
public java.lang.String getLoggerName()
- Specified by:
getLoggerName
in interfaceorg.api4.java.common.control.ILoggingCustomizable
-
setLoggerName
public void setLoggerName(java.lang.String name)
- Specified by:
setLoggerName
in interfaceorg.api4.java.common.control.ILoggingCustomizable
-
getGamma
public double getGamma()
-
getBehaviorWhenActionForNotFullyExploredStateIsRequested
public EBehaviorForNotFullyExploredStates getBehaviorWhenActionForNotFullyExploredStateIsRequested()
-
setBehaviorWhenActionForNotFullyExploredStateIsRequested
public void setBehaviorWhenActionForNotFullyExploredStateIsRequested(EBehaviorForNotFullyExploredStates behaviorWhenActionForNotFullyExploredStateIsRequested)
-
-