edu.columbia.cs.coms4701.agent.agentprograms
Interface SimpleReflexAgentProgram<K extends AgentAction,P extends AgentPercept,S extends AgentState>

All Superinterfaces:
AgentProgram<K,P>

public interface SimpleReflexAgentProgram<K extends AgentAction,P extends AgentPercept,S extends AgentState>
extends AgentProgram<K,P>

An agent that selects actions on the basis of the current percept only, ignoring the rest of the percept history.

Version:
0.1

User: aaron Date: Sep 11, 2006 Time: 4:07:06 PM

Author:
aaron@cs
See Also:
"Russell & Norvig pp46,47"

Method Summary
 java.util.List<AgentRule<K,S>> getRules()
          Accessor for the list of rules for this agent.
 S interpretInput(java.util.Set<P> percepts)
          Generates an abstracted description of the current state from the set of percepts.
 K ruleAction(AgentRule<K,S> theRule)
          Selects the action for the chosen rule.
 AgentRule<K,S> ruleMatch(S theState, java.util.List<AgentRule<K,S>> rules)
          Determines which rule to apply, given an abstract description of state, and an ordered list of rules.
 
Methods inherited from interface edu.columbia.cs.coms4701.agent.AgentProgram
getAuthor, getDescription, nextAction
 

Method Detail

interpretInput

S interpretInput(java.util.Set<P> percepts)
Generates an abstracted description of the current state from the set of percepts.

Parameters:
percepts -
Returns:
an abstract representation of the current state
See Also:
"Russell & Norvig, p47"

ruleMatch

AgentRule<K,S> ruleMatch(S theState,
                         java.util.List<AgentRule<K,S>> rules)
Determines which rule to apply, given an abstract description of state, and an ordered list of rules.

The implementation of this function should be trivial.

Parameters:
theState -
rules -
Returns:
the first rule for which the rule's condition matches the given state.

ruleAction

K ruleAction(AgentRule<K,S> theRule)
Selects the action for the chosen rule.

Since each rule supplies exactly one action, this is a trivial method.

Parameters:
theRule -
Returns:
the action determined by the rule.

getRules

java.util.List<AgentRule<K,S>> getRules()
Accessor for the list of rules for this agent.

Returns:
list of rules