ai.search
Interface DoubleCostAction

All Known Subinterfaces:
DoubleCostReversibleAction

public interface DoubleCostAction

Instances implementing this interface represent a possible action that can be used to transform one search state into another. Together with an appropriate implementation of the class SearchStateForDoubleCostFn, actions define a search problem.

The functionality to compute states that result from the application of actions is provided with the class SearchStateForDoubleCostFn. All an action knows is the cost of applying the action (itself) in a given search state, which will be a double for this class.

Author:
Gerhard Wickler
See Also:
DoubleCostReversibleAction, SearchStateForDoubleCostFn

Method Summary
 double getCost(SearchStateForDoubleCostFn state)
           This function returns the cost of applying this action in the given search state.
 java.lang.Class<? extends SearchStateForDoubleCostFn> getStateClass()
           This function can be used to retrieve the state class which, together with this action class, defines a search problem.
 

Method Detail

getStateClass

java.lang.Class<? extends SearchStateForDoubleCostFn> getStateClass()

This function can be used to retrieve the state class which, together with this action class, defines a search problem.

Returns:
Class a class extending SearchStateForIntCostFn

getCost

double getCost(SearchStateForDoubleCostFn state)

This function returns the cost of applying this action in the given search state. Implementations of this function will often ignore the given state, meaning that the cost of the action does not depend on the context in which it is applied.

Parameters:
state - the SearchStateForDoubleCostFn in which this action is applied; the origin of the state transition
Returns:
the cost of applying this action in the given state