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

All Superinterfaces:
AgentProgram<K,P>

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

A simple problem-solving agent.

This agent program first formulates a goal and a problem, searches for a sequence of actions that would solve the problem, and then executes the actions one at a time.

Note that this agent program ignores its percepts.

Version:
0.1

User: aaron Date: Sep 11, 2006 Time: 4:42:19 PM

Author:
aaron@cs
See Also:
"Russell & Norvig p61"

Method Summary
 java.util.Set<S> formulateGoal(S initialState)
          Given an initial state (and knowledge of the environment), formulates a set of goal states.
 SearchProblem<K,S> formulateProblem(S initialState, java.util.Set<S> goalStates)
          Formulates a formal problem description given an initial state and a set of goals.
 java.util.List<K> getActionSequence()
          Gets the sequence of actions to perform.
 java.util.Set<S> getGoal()
          Returns the set of final states in which the goal condition is satisfied.
 SearchProblem<K,S> getProblem()
          Returns the problem formulated by the agent.
 S getState()
          Gets the current world state (as known to the agent)
 java.util.List<K> search(SearchProblem<K,S> theSearchProblem)
          Given a formal problem description, finds a sequence of actions that will reach a goal state.
 S updateState(S previousState, java.util.Set<P> thePercepts)
          Updates the current state given a percept.
 
Methods inherited from interface edu.columbia.cs.coms4701.agent.AgentProgram
getAuthor, getDescription, nextAction
 

Method Detail

updateState

S updateState(S previousState,
              java.util.Set<P> thePercepts)
Updates the current state given a percept.

Parameters:
previousState -
thePercepts -
Returns:
the new state

formulateGoal

java.util.Set<S> formulateGoal(S initialState)
Given an initial state (and knowledge of the environment), formulates a set of goal states.

Parameters:
initialState -
Returns:
set of states reachable from the initial state that meet the goal condition

formulateProblem

SearchProblem<K,S> formulateProblem(S initialState,
                                    java.util.Set<S> goalStates)
Formulates a formal problem description given an initial state and a set of goals.

Parameters:
initialState -
goalStates -
Returns:
a problem description

search

java.util.List<K> search(SearchProblem<K,S> theSearchProblem)
Given a formal problem description, finds a sequence of actions that will reach a goal state.

This method will often simply use some generic SearchAlgorithm.

Parameters:
theSearchProblem -
Returns:
sequence of actions to perform.

getProblem

SearchProblem<K,S> getProblem()
Returns the problem formulated by the agent.

Returns:
a problem description.

getGoal

java.util.Set<S> getGoal()
Returns the set of final states in which the goal condition is satisfied.

Returns:
goal states

getState

S getState()
Gets the current world state (as known to the agent)

Returns:
current world state

getActionSequence

java.util.List<K> getActionSequence()
Gets the sequence of actions to perform.

Returns:
a list of actions.