Intelligent Agents: acting rationally AIMA chapter 2 Summary - - PowerPoint PPT Presentation

intelligent agents acting rationally
SMART_READER_LITE
LIVE PREVIEW

Intelligent Agents: acting rationally AIMA chapter 2 Summary - - PowerPoint PPT Presentation

Intelligent Agents: acting rationally Intelligent Agents: acting rationally AIMA chapter 2 Summary Intelligent Agents: acting rationally Agents and environments Rationality PEAS (Performance measure, Environment, Actuators,


slide-1
SLIDE 1

Intelligent Agents: acting rationally

Intelligent Agents: acting rationally

AIMA chapter 2

slide-2
SLIDE 2

Intelligent Agents: acting rationally

Summary

♦ Agents and environments ♦ Rationality ♦ PEAS (Performance measure, Environment, Actuators, Sensors) ♦ Environment types ♦ Agent types

slide-3
SLIDE 3

Intelligent Agents: acting rationally

Agents and environments

Agents include humans, robots, softbots, thermostats, etc. The agent function maps from percept histories to actions: f : P∗ → A The agent program runs on the physical architecture to produce f

slide-4
SLIDE 4

Intelligent Agents: acting rationally

Example: Vacuum-cleaner world

Perceptions: location and contents, e.g., [A, Dirty] Actions: Left, Right, Suck, NoOp

slide-5
SLIDE 5

Intelligent Agents: acting rationally

A vacuum-cleaner agent

Percept sequence Action [A, Clean] Right [A, Dirty] Suck [B, Clean] Left [B, Dirty] Suck [A, Clean], [A, Clean] Right [A, Clean], [A, Dirty] Suck . . . . . . What is the right function? Can it be implemented in a small agent program?

slide-6
SLIDE 6

Intelligent Agents: acting rationally

Agent Programs vs. Agent Functions

Question If an agent has |P| possible perceptions, how many entries will the agent function have after T time steps ?

slide-7
SLIDE 7

Intelligent Agents: acting rationally

Agent Programs vs. Agent Functions

Question If an agent has |P| possible perceptions, how many entries will the agent function have after T time steps ? Sol T

t=1 |P|t

AI goal ⇒ Design small agent programs to represent huge agent functions

slide-8
SLIDE 8

Intelligent Agents: acting rationally

A possible agent program

function Reflex-Vacuum-Agent( [location,status]) returns an action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left

slide-9
SLIDE 9

Intelligent Agents: acting rationally

Rationality

Fixed performance measure evaluates the environment sequence – one point per square cleaned up in time T? – one point per clean square per time step, minus one per move? – penalize for > k dirty squares? A rational agent chooses whichever action maximizes the expected value of the performance measure given the percept sequence to date Rational = omniscient – percepts may not supply all relevant information Rational = clairvoyant – action outcomes may not be as expected Hence, rational = successful Rational = ⇒ exploration, learning, autonomy

slide-10
SLIDE 10

Intelligent Agents: acting rationally

Rationality of the vacuum cleaner agent

Exercise Consider the following hypothesis for the vacuum cleaner world: Performance measure awards 1 point per clean square per time step Map is known a-priori Environment is static (clean squares remain clean, dirty squares remain dirty if not cleaned) Actions and perceptions are correct and accurate Show that the agent function defined above is indeed rational.

slide-11
SLIDE 11

Intelligent Agents: acting rationally

Multi-Robot Patrolling

Exercise Consider the following environment: Three rooms (A,B,C) and two robots (r1,r2) r1 can patrol A and B, r2 can patrol B and C r1 starts from A and r2 starts from C travel time between rooms is zero Performance measure: minimise sum of all rooms’ average Idleness Average idleness = sum of time interval for which the room is not visited by any robot / total time interval What would be a rational behavior for this environment ?

slide-12
SLIDE 12

Intelligent Agents: acting rationally

PEAS

To design a rational agent, we must specify the task environment Consider, e.g., the task of designing an automated taxi: Performance measure?? Environment?? Actuators?? Sensors??

slide-13
SLIDE 13

Intelligent Agents: acting rationally

PEAS

To design a rational agent, we must specify the task environment Consider, e.g., the task of designing an automated taxi: Performance measure?? safety, destination, profits, legality, comfort, . . . Environment?? city streets/freeways, traffic, pedestrians, weather, . . . Actuators?? steering, accelerator, brake, horn, speaker/display, . . . Sensors?? video, accelerometers, gauges, engine sensors, keyboard, GPS, . . .

slide-14
SLIDE 14

Intelligent Agents: acting rationally

Internet shopping agent

Performance measure?? Environment?? Actuators?? Sensors??

slide-15
SLIDE 15

Intelligent Agents: acting rationally

Internet shopping agent

Performance measure?? price, quality, appropriateness, efficiency Environment?? current and future WWW sites, vendors, shippers Actuators?? display to user, follow URL, fill in form Sensors?? HTML pages (text, graphics, scripts)

slide-16
SLIDE 16

Intelligent Agents: acting rationally

Environment types

Crossword Backgammon e-shopping Taxi Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent??

slide-17
SLIDE 17

Intelligent Agents: acting rationally

Environment types

Crossword Backgammon e-shopping Taxi Observable?? Yes Yes No No Deterministic?? Episodic?? Static?? Discrete?? Single-agent??

slide-18
SLIDE 18

Intelligent Agents: acting rationally

Environment types

Crossword Backgammon e-shopping Taxi Observable?? Yes Yes No No Deterministic?? Yes No Partly No Episodic?? Static?? Discrete?? Single-agent??

slide-19
SLIDE 19

Intelligent Agents: acting rationally

Environment types

Crossword Backgammon e-shopping Taxi Observable?? Yes Yes No No Deterministic?? Yes No Partly No Episodic?? No No No No Static?? Discrete?? Single-agent??

slide-20
SLIDE 20

Intelligent Agents: acting rationally

Environment types

Crossword Backgammon e-shopping Taxi Observable?? Yes Yes No No Deterministic?? Yes No Partly No Episodic?? No No No No Static?? Yes Yes Semi No Discrete?? Single-agent??

slide-21
SLIDE 21

Intelligent Agents: acting rationally

Environment types

Crossword Backgammon e-shopping Taxi Observable?? Yes Yes No No Deterministic?? Yes No Partly No Episodic?? No No No No Static?? Yes Yes Semi No Discrete?? Yes Yes Yes No Single-agent??

slide-22
SLIDE 22

Intelligent Agents: acting rationally

Environment types

Crossword Backgammon e-shopping Taxi Observable?? Yes Yes No No Deterministic?? Yes No Partly No Episodic?? No No No No Static?? Yes Yes Semi No Discrete?? Yes Yes Yes No Single-agent?? Yes No Yes* No

* = except auctions The environment type largely determines the agent design The real world is (of course) partially observable, stochastic, sequential, dynamic, continuous, multi-agent

slide-23
SLIDE 23

Intelligent Agents: acting rationally

Agent programs

agent = architecture + program General Skeleton for a program: – input: current perception – output: next action Note: everything else that is important to decide next action must be stored/computed by the agent.

slide-24
SLIDE 24

Intelligent Agents: acting rationally

Agent types

Four basic types in order of increasing generality: – simple reflex agents – reflex agents with state – goal-based agents – utility-based agents All these can be turned into learning agents

slide-25
SLIDE 25

Intelligent Agents: acting rationally

Simple reflex agents

slide-26
SLIDE 26

Intelligent Agents: acting rationally

Example

function Reflex-Vacuum-Agent( [location,status]) returns an action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left

slide-27
SLIDE 27

Intelligent Agents: acting rationally

Reflex agents with state

Usually called model based agents

slide-28
SLIDE 28

Intelligent Agents: acting rationally

Example

function Reflex-Vacuum-Agent( [status]) returns an action static: current-location = initial-location, current-action = none, next-action = current-action, current-location = Update-State(current-location,current- action) if status = Dirty then next-action = Suck else if current-location = A then next-action = Right else if current-location = B then next-action = Left current-action = next-action return current-action

slide-29
SLIDE 29

Intelligent Agents: acting rationally

Goal-based agents

slide-30
SLIDE 30

Intelligent Agents: acting rationally

Utility-based agents

slide-31
SLIDE 31

Intelligent Agents: acting rationally

Learning agents

slide-32
SLIDE 32

Intelligent Agents: acting rationally

Summary

Agents interact with environments through actuators and sensors The agent function describes what the agent does in all circumstances The performance measure evaluates the environment sequence A perfectly rational agent maximizes expected performance Agent programs implement (some) agent functions PEAS descriptions define task environments Environments are categorized along several dimensions:

  • bservable? deterministic? episodic? static? discrete?

single-agent? Several basic agent architectures exist: reflex, reflex with state, goal-based, utility-based