public interface HjExtremaEureka<T> extends HjEureka<T,T,T>
Many problems from artificial intelligence can be defined as combinatorial optimization problems. Subproblems are derived from the originally given problem through the addition of new constraints. The structure of the algorithm requires the ability to terminate individual subtrees of the search tree. An example is where we are interested in finding the lowest index of the goal item if it exists in the array.
The GUB is available in the HjExtremaEureka
instance, eu
, that a speculative task is registered on
and can be retrieved by a call to eu.get()
. Calls to offer()
and check()
pass the current
known bounds or solution, respectively, as the argument. If the argument in the offer()
call is lower than
the GUB, the GUB is updated in the HjExtremaEureka
instance, otherwise the current task is terminated.
Similarly, calls to check()
terminate a task if the argument is larger than the currently known GUB in eu
.
The first argument of used in the comparator is the existing value in the eureka, and the second argument is the new
argument passed inside the call to offer
and check
.
Instances are created using a factory method in the HJlib runtime, e.g., ModuleZ.newExtremaEureka(Object, java.util.Comparator)
check, check, get, offer, offer, onCleanup, onRegistration, resolved, shouldAbortOnOffer
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.