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

  • Type Parameters:
    I -
    N -
    A -
    V -
    NSearch -
    Asearch -
    All Implemented Interfaces:
    java.lang.Iterable<org.api4.java.algorithm.events.IAlgorithmEvent>, java.util.concurrent.Callable<EvaluatedSearchGraphPath<N,​A,​V>>, java.util.Iterator<org.api4.java.algorithm.events.IAlgorithmEvent>, org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearch<I,​EvaluatedSearchGraphPath<N,​A,​V>,​N,​A,​V>, org.api4.java.ai.graphsearch.problem.IPathInORGraphSearch<I,​EvaluatedSearchGraphPath<N,​A,​V>,​N,​A>, org.api4.java.ai.graphsearch.problem.IPathSearch<I,​EvaluatedSearchGraphPath<N,​A,​V>,​N,​A>, org.api4.java.algorithm.IAlgorithm<I,​EvaluatedSearchGraphPath<N,​A,​V>>, org.api4.java.algorithm.IOptimizationAlgorithm<I,​EvaluatedSearchGraphPath<N,​A,​V>,​V>, org.api4.java.algorithm.ISolutionCandidateIterator<I,​EvaluatedSearchGraphPath<N,​A,​V>>, org.api4.java.common.control.ICancelable, org.api4.java.common.control.ILoggingCustomizable
    Direct Known Subclasses:
    AwaStarSearch, BestFirst, BestFirstLimitedDiscrepancySearch, GraphSanityChecker, IteratingGraphSearchOptimizer, LimitedDiscrepancySearch, MCTSPathSearch, RStar

    public abstract class AOptimalPathInORGraphSearch<I extends org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,​A>,​N,​A,​V extends java.lang.Comparable<V>>
    extends ai.libs.jaicore.basic.algorithm.AOptimizer<I,​EvaluatedSearchGraphPath<N,​A,​V>,​V>
    implements org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearch<I,​EvaluatedSearchGraphPath<N,​A,​V>,​N,​A,​V>
    This is a template for algorithms that aim at finding paths from a root to goal nodes in a graph. This template does not assume paths to have a score. The output type of this algorithm is fixed to EvaluatedSearchGraphPath
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.api4.java.ai.graphsearch.problem.implicit.graphgenerator.IPathGoalTester<N,​A> getGoalTester()  
      org.api4.java.datastructure.graph.implicit.IGraphGenerator<N,​A> getGraphGenerator()  
      java.lang.String getLoggerName()  
      EvaluatedSearchSolutionCandidateFoundEvent<N,​A,​V> nextSolutionCandidateEvent()  
      protected EvaluatedSearchSolutionCandidateFoundEvent<N,​A,​V> registerSolution​(EvaluatedSearchGraphPath<N,​A,​V> path)  
      void setLoggerName​(java.lang.String name)  
      • Methods inherited from class ai.libs.jaicore.basic.algorithm.AOptimizer

        call, getBestScoreKnownToExist, getBestSeenSolution, nextSolutionCandidate, setBestSeenSolution, tellAboutBestScoreKnownToExist, 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, getListeners, 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, nextWithException, 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
    • Constructor Detail

      • AOptimalPathInORGraphSearch

        public AOptimalPathInORGraphSearch​(I problem)
      • AOptimalPathInORGraphSearch

        protected AOptimalPathInORGraphSearch​(ai.libs.jaicore.basic.IOwnerBasedAlgorithmConfig config,
                                              I problem)
    • Method Detail

      • nextSolutionCandidateEvent

        public EvaluatedSearchSolutionCandidateFoundEvent<N,​A,​V> nextSolutionCandidateEvent()
                                                                                                 throws java.lang.InterruptedException,
                                                                                                        org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException,
                                                                                                        org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException,
                                                                                                        org.api4.java.algorithm.exceptions.AlgorithmException
        Specified by:
        nextSolutionCandidateEvent in interface org.api4.java.algorithm.ISolutionCandidateIterator<I extends org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,​A>,​N>
        Overrides:
        nextSolutionCandidateEvent in class ai.libs.jaicore.basic.algorithm.AOptimizer<I extends org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,​A>,​EvaluatedSearchGraphPath<N,​A,​V extends java.lang.Comparable<V>>,​V extends java.lang.Comparable<V>>
        Throws:
        java.lang.InterruptedException
        org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException
        org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
        org.api4.java.algorithm.exceptions.AlgorithmException
      • getGraphGenerator

        public org.api4.java.datastructure.graph.implicit.IGraphGenerator<N,​A> getGraphGenerator()
        Specified by:
        getGraphGenerator in interface org.api4.java.ai.graphsearch.problem.IPathSearch<I extends org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,​A>,​N,​A,​V extends java.lang.Comparable<V>>
      • getGoalTester

        public org.api4.java.ai.graphsearch.problem.implicit.graphgenerator.IPathGoalTester<N,​A> getGoalTester()
      • setLoggerName

        public void setLoggerName​(java.lang.String name)
        Specified by:
        setLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        setLoggerName in class ai.libs.jaicore.basic.algorithm.AOptimizer<I extends org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,​A>,​EvaluatedSearchGraphPath<N,​A,​V extends java.lang.Comparable<V>>,​V extends java.lang.Comparable<V>>
      • getLoggerName

        public java.lang.String getLoggerName()
        Specified by:
        getLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        getLoggerName in class ai.libs.jaicore.basic.algorithm.AOptimizer<I extends org.api4.java.ai.graphsearch.problem.IPathSearchInput<N,​A>,​EvaluatedSearchGraphPath<N,​A,​V extends java.lang.Comparable<V>>,​V extends java.lang.Comparable<V>>