public class RandomCompletionBasedNodeEvaluator<T,A,V extends java.lang.Comparable<V>> extends TimeAwareNodeEvaluator<T,V> implements IPotentiallyGraphDependentNodeEvaluator<T,V>, IPotentiallySolutionReportingNodeEvaluator<T,V>, ICancelableNodeEvaluator, IPotentiallyUncertaintyAnnotatingNodeEvaluator<T,V>, ai.libs.jaicore.basic.ILoggingCustomizable
| Modifier and Type | Field and Description |
|---|---|
protected int |
desiredNumberOfSuccesfulSamples |
protected SolutionEventBus<T> |
eventBus |
protected java.util.Map<Node<T,?>,V> |
fValues |
protected GraphGenerator<T,?> |
generator |
protected int |
maxSamples |
protected java.util.Map<java.lang.String,java.lang.Integer> |
plFails |
protected java.util.Map<java.lang.String,java.lang.Integer> |
plSuccesses |
protected java.util.Set<java.util.List<T>> |
postedSolutions |
protected java.util.Map<java.lang.String,java.lang.Integer> |
ppFails |
protected java.util.Random |
random |
protected java.util.Map<java.util.List<T>,V> |
scoresOfSolutionPaths |
protected ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> |
solutionEvaluator |
protected long |
timestampOfFirstEvaluation |
protected java.util.Map<java.util.List<T>,java.lang.Integer> |
timesToComputeEvaluations |
protected IUncertaintySource<T,V> |
uncertaintySource |
protected java.util.Set<java.util.List<T>> |
unsuccessfulPaths |
| Constructor and Description |
|---|
RandomCompletionBasedNodeEvaluator(java.util.Random random,
int desiredNumberOfSuccessfulSamples,
int maxSamples,
ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> solutionEvaluator) |
RandomCompletionBasedNodeEvaluator(java.util.Random random,
int desiredNumberOfSuccessfulSamples,
int maxSamples,
ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> solutionEvaluator,
int timeoutForSingleCompletionEvaluationInMS,
int timeoutForNodeEvaluationInMS) |
RandomCompletionBasedNodeEvaluator(java.util.Random random,
int desiredNumberOfSuccessfulSamples,
int maxSamples,
ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> solutionEvaluator,
int timeoutForSingleCompletionEvaluationInMS,
int timeoutForNodeEvaluationInMS,
java.util.function.Predicate<T> priorityPredicateForRDFS) |
RandomCompletionBasedNodeEvaluator(java.util.Random random,
int samples,
ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> solutionEvaluator) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
annotatesUncertainty() |
void |
cancelActiveTasks() |
protected V |
fTimeouted(Node<T,?> n,
int timeout) |
protected V |
getFValueOfSolutionPath(java.util.List<T> path) |
java.lang.String |
getLoggerName() |
java.util.List<T> |
getNextRandomPathCompletionForNode(Node<T,?> n) |
ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> |
getSolutionEvaluator() |
boolean |
isVisualizeSubSearch() |
protected void |
postSolution(java.util.List<T> solution) |
void |
receiveCompleterEvent(NodeExpansionCompletedEvent<Node<T,java.lang.Double>> event) |
void |
registerSolutionListener(java.lang.Object listener) |
boolean |
reportsSolutions() |
boolean |
requiresGraphGenerator() |
void |
setGenerator(GraphGenerator<T,?> generator) |
void |
setLoggerName(java.lang.String name) |
void |
setUncertaintySource(IUncertaintySource<T,V> uncertaintySource) |
void |
setVisualizeSubSearch(boolean visualizeSubSearch) |
java.lang.String |
toString() |
checkInterruption, f, getFallbackNodeEvaluator, getTimeoutForNodeEvaluationInMS, getTotalDeadline, setTotalDeadlineclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfprotected java.util.Set<java.util.List<T>> unsuccessfulPaths
protected java.util.Set<java.util.List<T>> postedSolutions
protected java.util.Map<java.util.List<T>,java.lang.Integer> timesToComputeEvaluations
protected java.util.Map<java.util.List<T>,V extends java.lang.Comparable<V>> scoresOfSolutionPaths
protected java.util.Map<java.lang.String,java.lang.Integer> ppFails
protected java.util.Map<java.lang.String,java.lang.Integer> plFails
protected java.util.Map<java.lang.String,java.lang.Integer> plSuccesses
protected GraphGenerator<T,?> generator
protected long timestampOfFirstEvaluation
protected final java.util.Random random
protected final int desiredNumberOfSuccesfulSamples
protected final int maxSamples
protected final ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V extends java.lang.Comparable<V>> solutionEvaluator
protected IUncertaintySource<T,V extends java.lang.Comparable<V>> uncertaintySource
protected SolutionEventBus<T> eventBus
public RandomCompletionBasedNodeEvaluator(java.util.Random random,
int samples,
ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> solutionEvaluator)
public RandomCompletionBasedNodeEvaluator(java.util.Random random,
int desiredNumberOfSuccessfulSamples,
int maxSamples,
ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> solutionEvaluator)
public RandomCompletionBasedNodeEvaluator(java.util.Random random,
int desiredNumberOfSuccessfulSamples,
int maxSamples,
ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> solutionEvaluator,
int timeoutForSingleCompletionEvaluationInMS,
int timeoutForNodeEvaluationInMS)
public RandomCompletionBasedNodeEvaluator(java.util.Random random,
int desiredNumberOfSuccessfulSamples,
int maxSamples,
ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> solutionEvaluator,
int timeoutForSingleCompletionEvaluationInMS,
int timeoutForNodeEvaluationInMS,
java.util.function.Predicate<T> priorityPredicateForRDFS)
protected V fTimeouted(Node<T,?> n, int timeout) throws java.lang.InterruptedException, NodeEvaluationException
fTimeouted in class TimeAwareNodeEvaluator<T,V extends java.lang.Comparable<V>>java.lang.InterruptedExceptionNodeEvaluationExceptionpublic java.util.List<T> getNextRandomPathCompletionForNode(Node<T,?> n) throws java.lang.InterruptedException, RCNEPathCompletionFailedException
java.lang.InterruptedExceptionRCNEPathCompletionFailedExceptionprotected V getFValueOfSolutionPath(java.util.List<T> path) throws java.lang.InterruptedException, NodeEvaluationException
java.lang.InterruptedExceptionNodeEvaluationExceptionprotected void postSolution(java.util.List<T> solution)
public void setGenerator(GraphGenerator<T,?> generator)
setGenerator in interface IPotentiallyGraphDependentNodeEvaluator<T,V extends java.lang.Comparable<V>>public void receiveCompleterEvent(NodeExpansionCompletedEvent<Node<T,java.lang.Double>> event)
public void registerSolutionListener(java.lang.Object listener)
registerSolutionListener in interface IPotentiallySolutionReportingNodeEvaluator<T,V extends java.lang.Comparable<V>>public void cancelActiveTasks()
cancelActiveTasks in interface ICancelableNodeEvaluatorpublic void setUncertaintySource(IUncertaintySource<T,V> uncertaintySource)
setUncertaintySource in interface IPotentiallyUncertaintyAnnotatingNodeEvaluator<T,V extends java.lang.Comparable<V>>public ai.libs.jaicore.basic.IObjectEvaluator<SearchGraphPath<T,A>,V> getSolutionEvaluator()
public boolean isVisualizeSubSearch()
public void setVisualizeSubSearch(boolean visualizeSubSearch)
public void setLoggerName(java.lang.String name)
setLoggerName in interface ai.libs.jaicore.basic.ILoggingCustomizablesetLoggerName in class TimeAwareNodeEvaluator<T,V extends java.lang.Comparable<V>>public java.lang.String getLoggerName()
getLoggerName in interface ai.libs.jaicore.basic.ILoggingCustomizablegetLoggerName in class TimeAwareNodeEvaluator<T,V extends java.lang.Comparable<V>>public java.lang.String toString()
toString in class java.lang.Objectpublic boolean requiresGraphGenerator()
requiresGraphGenerator in interface IPotentiallyGraphDependentNodeEvaluator<T,V extends java.lang.Comparable<V>>public boolean reportsSolutions()
reportsSolutions in interface IPotentiallySolutionReportingNodeEvaluator<T,V extends java.lang.Comparable<V>>public boolean annotatesUncertainty()
annotatesUncertainty in interface IPotentiallyUncertaintyAnnotatingNodeEvaluator<T,V extends java.lang.Comparable<V>>