|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReflexWithStateAgentProgram<K extends AgentAction,P extends AgentPercept,S extends AgentState>
An agent that keeps track of the parts of the world it can't see now, maintining internal state.
To implement such an agent program, we need two types of information:
Method Summary | |
---|---|
K |
getLastAction()
Gets the most recent action (initially none) |
java.util.List<AgentRule<K,S>> |
getRules()
returns the set of condition-action rules |
S |
getState()
returns a description of the current world state |
K |
ruleAction(AgentRule<K,S> theRule)
Selects an action, given the applied rule. |
AgentRule<K,S> |
ruleMatch(S theState,
java.util.List<AgentRule<K,S>> rules)
Chooses the appropriate rule (i.e. |
S |
updateState(S previousState,
K lastAction,
java.util.Set<P> currentPercepts)
Creates the new internal state description, using information from the current percept, the old internal state, and the last chosen action. |
Methods inherited from interface edu.columbia.cs.coms4701.agent.AgentProgram |
---|
getAuthor, getDescription, nextAction |
Method Detail |
---|
S updateState(S previousState, K lastAction, java.util.Set<P> currentPercepts)
previousState
- lastAction
- currentPercepts
-
AgentRule<K,S> ruleMatch(S theState, java.util.List<AgentRule<K,S>> rules)
theState
- rules
-
K ruleAction(AgentRule<K,S> theRule)
This should be a trivial method.
S getState()
java.util.List<AgentRule<K,S>> getRules()
K getLastAction()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |