|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SearchProblem<K extends AgentAction,S extends AgentState>
A formal definition of a problem.
Method Summary | |
---|---|
S |
getInitialState()
The initial state that the agent starts in. |
boolean |
goalTest(S theState)
Determines whether a given state is a goal state. |
double |
pathCost(java.util.List<S> thePath)
Assigns a numeric cost to each path, where a path is an ordered list of states. |
double |
stepCost(S firstState,
K theAction,
S resultingState)
Determines the cost of taking the given action to go from the first to the second state. |
java.util.Map<K,S> |
successorFunction(S theState)
Given a particular state x, returns a set of (action, successor) ordered pairs, where each action is one of the legal actions in state x and each successor is a state that can be reached from x by applying the action. |
Method Detail |
---|
S getInitialState()
java.util.Map<K,S> successorFunction(S theState)
theState
-
boolean goalTest(S theState)
theState
-
double pathCost(java.util.List<S> thePath)
In chapter 3, we assume path cost is simple the sum of step costs.
thePath
-
double stepCost(S firstState, K theAction, S resultingState)
Step costs are assumed to be nonnegative.
firstState
- theAction
- resultingState
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |