|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.awh2101.AWHOnlineDFSAgentProgram
public class AWHOnlineDFSAgentProgram
An implementation of Online-DFS-Agent for the Roomba environment.
This implementation is strictly know-nothing; it does not pose the problem to itself such that it has a successor function. For example, after going North from (1,1) to (1,2), this agent has no idea that going South will return it to (1,1). Hence you'll see some pretty silly behavior out of this guy.
This implementation simply uses robot location as its representation of state.
Constructor Summary | |
---|---|
AWHOnlineDFSAgentProgram()
|
Method Summary | |
---|---|
java.util.Set<edu.columbia.awh2101.DFSAgentState> |
formulateGoal(edu.columbia.awh2101.DFSAgentState initialState)
Given an initial state (and knowledge of the environment), formulates a set of goal states. |
OnlineSearchProblem<RobotAction,edu.columbia.awh2101.DFSAgentState> |
formulateProblem(edu.columbia.awh2101.DFSAgentState initialState,
java.util.Set<edu.columbia.awh2101.DFSAgentState> goalStates)
Formulates a formal problem description given an initial state and a set of goals. |
java.util.List<RobotAction> |
getActionSequence()
Gets the sequence of actions to perform. |
java.lang.String |
getAuthor()
Should return the UNI of the author of the program. |
java.lang.String |
getDescription()
Should return a short description of the program, used to distinguish different agent agentprograms by the same author. |
java.util.Set<edu.columbia.awh2101.DFSAgentState> |
getGoal()
Returns the set of final states in which the goal condition is satisfied. |
OnlineSearchProblem<RobotAction,edu.columbia.awh2101.DFSAgentState> |
getProblem()
Returns the problem formulated by the agent. |
edu.columbia.awh2101.DFSAgentState |
getState()
Gets the current world state (as known to the agent) |
RobotAction |
nextAction(java.util.Set<RobotPercept> thePercepts)
The essence of agent AI: Given a set of percepts, chooses an action. |
edu.columbia.awh2101.DFSAgentState |
updateState(edu.columbia.awh2101.DFSAgentState thePreviousState,
java.util.Set<RobotPercept> thePercepts)
Updates the current state given a set of percepts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AWHOnlineDFSAgentProgram()
Method Detail |
---|
public edu.columbia.awh2101.DFSAgentState updateState(edu.columbia.awh2101.DFSAgentState thePreviousState, java.util.Set<RobotPercept> thePercepts)
updateState
in interface OnlineAgentProgram<RobotAction,RobotPercept,edu.columbia.awh2101.DFSAgentState>
thePreviousState
- thePercepts
-
public java.util.Set<edu.columbia.awh2101.DFSAgentState> formulateGoal(edu.columbia.awh2101.DFSAgentState initialState)
formulateGoal
in interface OnlineAgentProgram<RobotAction,RobotPercept,edu.columbia.awh2101.DFSAgentState>
initialState
-
public OnlineSearchProblem<RobotAction,edu.columbia.awh2101.DFSAgentState> formulateProblem(edu.columbia.awh2101.DFSAgentState initialState, java.util.Set<edu.columbia.awh2101.DFSAgentState> goalStates)
formulateProblem
in interface OnlineAgentProgram<RobotAction,RobotPercept,edu.columbia.awh2101.DFSAgentState>
initialState
- goalStates
-
public OnlineSearchProblem<RobotAction,edu.columbia.awh2101.DFSAgentState> getProblem()
getProblem
in interface OnlineAgentProgram<RobotAction,RobotPercept,edu.columbia.awh2101.DFSAgentState>
public java.util.Set<edu.columbia.awh2101.DFSAgentState> getGoal()
getGoal
in interface OnlineAgentProgram<RobotAction,RobotPercept,edu.columbia.awh2101.DFSAgentState>
public edu.columbia.awh2101.DFSAgentState getState()
getState
in interface OnlineAgentProgram<RobotAction,RobotPercept,edu.columbia.awh2101.DFSAgentState>
public java.util.List<RobotAction> getActionSequence()
public RobotAction nextAction(java.util.Set<RobotPercept> thePercepts)
nextAction
in interface AgentProgram<RobotAction,RobotPercept>
thePercepts
- set of percepts from the environment
public java.lang.String getAuthor()
getAuthor
in interface AgentProgram<RobotAction,RobotPercept>
public java.lang.String getDescription()
getDescription
in interface AgentProgram<RobotAction,RobotPercept>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |