Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 1.11 KB

Simple-Problem-Solving-Agent.md

File metadata and controls

21 lines (18 loc) · 1.11 KB

SIMPLE-PROBLEM-SOLVING-AGENT

AIMA3e

function SIMPLE-PROBLEM-SOLVING-AGENT(percept) returns an action
persistent: seq, an action sequence, initially empty
      state, some description of the current world state
      goal, a goal, initially null
      problem, a problem formulation

state ← UPDATE-STATE(state, percept)
if seq is empty then
   goal ← FORMULATE-GOAL(state)
   problem ← FORMULATE-PROBLEM(state, goal)
   seq ← SEARCH(problem)
   if seq = failure then return a null action
action ← FIRST(seq)
seq ← REST(seq)
return action


Figure ?? A simple problem-solving agent. It 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. When this is complete, it formulates another goal and starts over.