Intelligent Agents

Chapter 2

Outline

♢ PAGE (Percepts, Actions, Goals, Environment) ♢ Environment types ♢ Agent functions and programs ♢ Agent types ♢ Vacuum world

PAGE

Must first specify the setting for intelligent agent design Consider, e.g., the task of designing an automated taxi: \underline{\underline{Percepts}}?? \underline{\underline{Actions}}?? \underline{\underline{Goals}}?? \underline{\underline{Environment}}??

AIMA Slides \begin{matrix}c \\ ◯ \end{matrix}Stuart Russell and Peter Norvig, 1998  Chapter 2  3

PAGE

Must first specify the setting for intelligent agent design Consider, e.g., the task of designing an automated taxi: \underline{\underline{Percepts}}?? video, accelerometers, gauges, engine sensors, keyboard, GPS, … \underline{\underline{Actions}}?? steer, accelerate, brake, horn, speak/display, … \underline{\underline{Goals}}?? safety, reach destination, maximize profits, obey laws, passenger comfort, … \underline{\underline{Environment}}?? US urban streets, freeways, traffic, pedestrians, weather, customers, …

AIMA Slides \begin{matrix}c \\ ◯ \end{matrix}Stuart Russell and Peter Norvig, 1998  Chapter 2  4

Internet shopping agent

\underline{\underline{Percepts}}?? \underline{\underline{Actions}}?? \underline{\underline{Goals}}?? \underline{\underline{Environment}}??

Rational agents

Without loss of generality, “goals” specifiable by \underline{performance measure} defining a numerical value for any environment history

\underline{Rational action}: whichever action maximizes the expected value of the performance measure \underline{given the percept sequence to date}

Rational ≠ omniscient Rational ≠ clairvoyant Rational ≠ successful

Environment types

Solitaire Backgammon Internet shopping Taxi

\underline{\underline{Accessible}}?? \underline{\underline{Deterministic}}?? \underline{\underline{Episodic}}?? \underline{\underline{Static}}?? \underline{\underline{Discrete}}??

Environment types

Solitaire Backgammon Internet shopping Taxi
\underline{\underline{Accessible}}??  Yes  Yes  No  No
\underline{\underline{Deterministic}}??  Yes  No  Partly  No
\underline{\underline{Episodic}}??  No  No  No  No
\underline{\underline{Static}}??  Yes  Semi  Semi  No
\underline{\underline{Discrete}}??  Yes  Yes  Yes  No

The environment type largely determines the agent design The real world is (of course) inaccessible, stochastic, sequential, dynamic, continuous

Agent functions and programs

An agent is completely specified by the \underline{agent function} mapping percept sequences to actions (In principle, one can supply each possible sequence to see what it does. Obviously, a lookup table would usually be immense.) One agent function (or a small equivalence class) is \underline{rational} Aim: find a way to implement the rational agent function concisely An \underline{agent program} takes a single percept as input, keeps internal state:

function Skeleton-Agent( percept) returns action

static: memory, the agent’s memory of the world

memory ← Update-Memory(memory, percept)

action ← Choose-Best-Action(memory)

memory ← Update-Memory(memory, action)

return action AIMA Slides \begin{matrix}c \\ ◯ \end{matrix}Stuart Russell and Peter Norvig, 1998  Chapter 2  9

AIMA code

The code for each topic is divided into four directories:

– agents: code defining agent types and programs

– algorithms: code for the methods used by the agent programs

– environments: code defining environment types, simulations

– domains: problem types and instances for input to algorithms (Often run algorithms on domains rather than agents in environments.)

(setq joe (make-agent :name 'joe :body (make-agent-body)
                      :program (make-dumb-agent-program)))
(defun make-dumb-agent-program ()
  (let ((memory nil))
    #'(lambda (percept)
        (push percept memory)
        'no-op)))

Agent types

Four basic types in order of increasing generality:

– simple reflex agents

– reflex agents with state

– goal-based agents

– utility-based agents