2018.10.5
Function SIMPLE-PROBLEM-SOLVING-AGENT(p) returns an action
inputs: p \\a percept
static: s \\an action ssequence, intially empty
state \\some description of the current world state
g \\a goal
problem\\a problem formulation
state <--- UPDATE-STATE(state,p)
if s is empty then
g <--- FORMULATE-GOAL(state)
problem <--- FORMULATE-PROBLEM(state, g)
s <--- SEARCH(problem)
action <--- FIRST(s)
s <--- REST(s)
return action