|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SearchStateForDoubleCostFn
This class represents a state of the world in a search problem.
Together with an appropriate implementation for actions, an implementation of
a SearchStateForDoubleCostFn
defines a search problem, which
consists of four components:
successors()
in
this class isGoalState()
in this
class DoubleCostAction
class
Given a definition of a search problem in terms of these components and
implemented by a class for SearchStateForDoubleCostFn
s and a
class for DoubleCostAction
s, a search engine can be used to
attempt to solve the search problem.
DoubleCostAction
,
SearchEngineForDoubleCostFn
Method Summary | |
---|---|
SearchStateForDoubleCostFn |
apply(DoubleCostAction action)
This function computes a new search state that is the result of performing the given action in this search state. |
java.lang.Class<? extends DoubleCostAction> |
getActionClass()
This function can be used to retrieve the action class which, together with this state class, defines a search problem. |
boolean |
isApplicable(DoubleCostAction action)
This function tests whether the given action is applicable in this search state. |
boolean |
isGoalState()
This function tests whether this search state is a goal state. |
java.util.Iterator<inf.util.Pair<DoubleCostAction,SearchStateForDoubleCostFn>> |
successors()
This function indirectly generates the successors for this state in the context of the search problem defined by this class. |
Method Detail |
---|
java.lang.Class<? extends DoubleCostAction> getActionClass()
This function can be used to retrieve the action class which, together with this state class, defines a search problem.
boolean isGoalState()
This function tests whether this search state is a goal state.
boolean isApplicable(DoubleCostAction action)
This function tests whether the given action is applicable in this search state.
action
- the DoubleCostAction to be tested for applicability
SearchStateForDoubleCostFn apply(DoubleCostAction action)
This function computes a new search state that is the result of performing the given action in this search state. Notice that this function does not test for applicability!
action
- the DoubleCostAction to be performed in this state
java.util.Iterator<inf.util.Pair<DoubleCostAction,SearchStateForDoubleCostFn>> successors()
This function indirectly generates the successors for this state in the context of the search problem defined by this class. The returned Iterator will generate a sequence of Pairs consisting of a DoubleCostAction and a SearchStateForDoubleCostFn, where the action if applied in this state will result in the paired state.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |