Class MCTSPathSearch<I extends org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,​A,​V>,​N,​A,​V extends java.lang.Comparable<V>>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void enforcePrefixPathOnAllRollouts​(org.api4.java.datastructure.graph.ILabeledPath<N,​A> path)  
      A getAction​(N node, java.util.Map<A,​N> actionsWithSuccessors)  
      IPolicy<N,​A,​V> getDefaultPolicy()  
      java.lang.String getLoggerName()  
      int getNumberOfNodesInMemory()  
      int getNumberOfPlayouts()  
      org.api4.java.datastructure.graph.ILabeledPath<N,​A> getSubPathUpToDeepestRegisteredNode​(org.api4.java.datastructure.graph.ILabeledPath<N,​A> path)  
      IPathUpdatablePolicy<N,​A,​V> getTreePolicy()  
      boolean hasTreePolicyReachedLeafs()  
      org.api4.java.algorithm.events.IAlgorithmEvent nextWithException()  
      void setLoggerName​(java.lang.String name)  
      • Methods inherited from class ai.libs.jaicore.basic.algorithm.AOptimizer

        call, getBestSeenSolution, nextSolutionCandidate, setBestSeenSolution, updateBestSeenSolution
      • Methods inherited from class ai.libs.jaicore.basic.algorithm.ASolutionCandidateIterator

        collectAllSolutions
      • Methods inherited from class ai.libs.jaicore.basic.algorithm.AAlgorithm

        activate, announceTimeoutDetected, avoidReinterruptionOnShutdownOnCurrentThread, cancel, checkAndConductTermination, checkTermination, computeTimeoutAware, getActivationTime, getConfig, getId, getInput, getNumCPUs, getRemainingTimeToDeadline, getState, getTimeout, getTimeoutPrecautionOffset, hasNext, hasThreadBeenInterruptedDuringShutdown, interruptThreadAsPartOfShutdown, isCanceled, isShutdownInitialized, isStopCriterionSatisfied, isTimeouted, iterator, next, post, registerActiveThread, registerListener, resolveShutdownInterruptOnCurrentThread, setConfig, setDeadline, setMaxNumThreads, setNumCPUs, setState, setTimeout, setTimeout, setTimeoutPrecautionOffset, shutdown, terminate, unregisterActiveThread, unregisterThreadAndShutdown
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.api4.java.algorithm.IAlgorithm

        call, getConfig, getId, getInput, getNumCPUs, getTimeout, registerListener, setMaxNumThreads, setNumCPUs, setTimeout, setTimeout
      • Methods inherited from interface org.api4.java.common.control.ICancelable

        cancel
      • Methods inherited from interface org.api4.java.algorithm.ISolutionCandidateIterator

        nextSolutionCandidate
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove
    • Field Detail

      • graphGenerator

        protected final org.api4.java.datastructure.graph.implicit.IGraphGenerator<N,​A> graphGenerator
      • rootGenerator

        protected final org.api4.java.datastructure.graph.implicit.IRootGenerator<N> rootGenerator
      • successorGenerator

        protected final org.api4.java.datastructure.graph.implicit.ISuccessorGenerator<N,​A> successorGenerator
      • goalTester

        protected final org.api4.java.ai.graphsearch.problem.implicit.graphgenerator.IPathGoalTester<N,​A> goalTester
      • useLazySuccessorGeneration

        protected final boolean useLazySuccessorGeneration
      • lazySuccessorGenerators

        protected final java.util.Map<N,​org.api4.java.datastructure.graph.implicit.ILazySuccessorGenerator<N,​A>> lazySuccessorGenerators
      • defaultPolicy

        protected final IPolicy<N,​A,​V extends java.lang.Comparable<V>> defaultPolicy
      • playoutSimulator

        protected final org.api4.java.common.attributedobjects.IObjectEvaluator<org.api4.java.datastructure.graph.ILabeledPath<N,​A>,​V extends java.lang.Comparable<V>> playoutSimulator
      • exploredGraph

        protected final ai.libs.jaicore.graph.LabeledGraph<N,​A> exploredGraph
    • Method Detail

      • nextWithException

        public org.api4.java.algorithm.events.IAlgorithmEvent nextWithException()
                                                                         throws java.lang.InterruptedException,
                                                                                org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException,
                                                                                org.api4.java.algorithm.exceptions.AlgorithmException,
                                                                                org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
        Specified by:
        nextWithException in interface org.api4.java.algorithm.IAlgorithm<I extends org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,​A,​V>,​N>
        Throws:
        java.lang.InterruptedException
        org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException
        org.api4.java.algorithm.exceptions.AlgorithmException
        org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
      • getSubPathUpToDeepestRegisteredNode

        public org.api4.java.datastructure.graph.ILabeledPath<N,​A> getSubPathUpToDeepestRegisteredNode​(org.api4.java.datastructure.graph.ILabeledPath<N,​A> path)
      • getLoggerName

        public java.lang.String getLoggerName()
        Specified by:
        getLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        getLoggerName in class AOptimalPathInORGraphSearch<I extends org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,​A,​V>,​N,​A,​V extends java.lang.Comparable<V>>
      • setLoggerName

        public void setLoggerName​(java.lang.String name)
        Specified by:
        setLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        setLoggerName in class AOptimalPathInORGraphSearch<I extends org.api4.java.ai.graphsearch.problem.IPathSearchWithPathEvaluationsInput<N,​A,​V>,​N,​A,​V extends java.lang.Comparable<V>>
      • getNumberOfPlayouts

        public int getNumberOfPlayouts()
      • getDefaultPolicy

        public IPolicy<N,​A,​V> getDefaultPolicy()
      • enforcePrefixPathOnAllRollouts

        public void enforcePrefixPathOnAllRollouts​(org.api4.java.datastructure.graph.ILabeledPath<N,​A> path)
      • getNumberOfNodesInMemory

        public int getNumberOfNodesInMemory()
      • hasTreePolicyReachedLeafs

        public boolean hasTreePolicyReachedLeafs()