|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AgentRule<K extends AgentAction,S extends AgentState>
A rule governing the behavior of reflex-based agents.
Each rule has a single associated action, and can evaluate any given state to determine whether the rule applies.
Remember that rules are usually applied in some predetermined order,
so it may be possible to implement an agent that does not choose to apply
a particular rule for a state, despite the fact that it returns true
for
that state.
Method Summary | |
---|---|
K |
getAction()
Each rule can implement a single action. |
boolean |
matchesState(S theState)
Evaluates a state, and decides whether this rule applies to the state. |
Method Detail |
---|
boolean matchesState(S theState)
Presumably this method should inspect some particular feature of the state, e.g. for the simple vacuum world, whether the current square is dirty or not.
theState
-
K getAction()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |