extended
Interface HillClimbingStrategy<T>

Type Parameters:
T - the specific type of all elements in the search domain.
All Known Implementing Classes:
BestChoiceStrategy, FirstChoiceStrategy

public interface HillClimbingStrategy<T>

This is the base of all strategies for the hill climbing search. If you want to make your hill climbing more efficient you can implement your own strategy by implementing this interface.

The only thing you must implement is the select method, which chooses the best state from a list of successor states according to the comparator. The state returned must obey the following rules:

Every implementation of this interface should rely solely on the comparison method shipped with the HillClimbing class, to allow proper minimum and maximum searches with this strategy.
Note: For further information on how to create a HillClimbing search which uses a custom HillClimbingStrategy see the description of the HillClimbing class. .

Author:
eden06

Method Summary
 T select(HillClimbing<T> hillclimbing, java.util.List<T> extension, T current)
          This method selects the best state from the given list of successors according to the current state and a comparator.
 

Method Detail

select

T select(HillClimbing<T> hillclimbing,
         java.util.List<T> extension,
         T current)
This method selects the best state from the given list of successors according to the current state and a comparator.
This method will only be called with non null and non empty arguments and should obey the following constraints: Hint: This method is the template for all hill climbing strategies.

Parameters:
hillclimbing - the hill climbing search itself (which must be used as a comparator)
extension - the list of successors of the current state
current - the current state of the hill climbing search
Returns:
the selected best state if any exists or a random successor.