chapter 2 agents & environments. © d. weld, d. fox 2 outline agents and environments...

20
Chapter 2 Agents & Environments

Upload: myron-shepherd

Post on 02-Jan-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

Chapter 2Agents & Environments

Page 2: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox 2

Outline

• Agents and environments• Rationality• PEAS specification• Environment types• Agent types

Page 3: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox 3

Agents

• An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators

•• Human agent:

  eyes, ears, and other organs for sensors  hands,legs, mouth, and other body parts for actuators

• Robotic agent:   cameras and laser range finders for sensors  various motors for actuators  

Page 4: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Types of Agents: Immobots

  Intelligent buildings  Autonomous spacecraft

• Softbots  Jango.excite.com  Askjeeves.com  Expert Systems

• Cardiologist

Page 5: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Intelligent Agents• Have sensors, effectors• Implement mapping from percept

sequence to actions

Environment Agent

percepts

actions

• Performance Measure

Page 6: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox 6

Rational agents

• An agent should strive to do the right thing, based on what it can perceive and the actions it can perform. The right action is the one that will cause the agent to be most successful

• Performance measure: An objective criterion for success of an agent's behavior

• E.g., performance measure of a vacuum-cleaner agent could be amount of dirt cleaned up, amount of time taken, amount of electricity consumed, amount of noise generated, etc.

•••

Page 7: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Ideal rational agent

• Rationality vs omniscience?• Acting in order to obtain valuable information

“For each possible percept sequence, does

whatever action is expected to maximize its

performance measure on the basis of evidence

perceived so far and built-in knowledge.''

Page 8: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Autonomy

An agent is autonomous to the extent that its behavior is determined by its own experience (with ability to learn and adapt)

Why is this important?

Page 9: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox 9

PEAS: Specifying Task Environments

• PEAS: Performance measure, Environment, Actuators, Sensors

• Must first specify the setting for intelligent agent design

• Consider, e.g., the task of designing an automated taxi driver:  Performance measure  Environment  Actuators  Sensors  

••

Page 10: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox 10

PEAS

• Agent: Automated taxi driver

• Performance measure:   Safe, fast, legal, comfortable trip, maximize profits

• Environment:   Roads, other traffic, pedestrians, customers

• Actuators:   Steering wheel, accelerator, brake, signal, horn

• Sensors:   Cameras, sonar, speedometer, GPS, odometer,

engine sensors, keyboard

   

Page 11: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox 11

PEAS• Agent: Medical diagnosis system

• Performance measure:   Healthy patient, minimize costs, lawsuits

• Environment:   Patient, hospital, staff

• Actuators:   Screen display (questions, tests, diagnoses,

treatments, referrals)• Sensors:

  Keyboard (entry of symptoms, findings, patient's answers)

 

Page 12: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Properties of Environments

• Observability: full vs. partial vs. non

• Deterministic vs. stochastic• Episodic vs. nonepisodic• Static vs. … vs. dynamic• Discrete vs. continuous

• Travel agent

• WWW shopping agent

• Coffee delivery mobile robot

Page 13: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox 13

Agent functions and programs

• An agent is completely specified by the agent function mapping percept sequences to actions

• One agent function (or a small equivalence class) is rational

• Aim: find a way to implement the rational agent function concisely

••

Page 14: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Implementing ideal rational agent

• Table lookup agents• Agent program

  Simple reflex agents  Agents with memory

•Reflex agent with internal state•Goal-based agents•Utility-based agents

Page 15: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Simple reflex agentsE

NV

IRO

NM

EN

T

AGENT

Effectors

Sensors

what world islike now

Condition/Action ruleswhat action should I do now?

Page 16: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Reflex agent with internal state

EN

VIR

ON

ME

NT

AGENT Effectors

Sensors

what world islike now

Condition/Action ruleswhat action should I do now?

What world was like

How world evolves

Page 17: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Goal-based agentsE

NV

IRO

NM

EN

T

AGENT Effectors

Sensors

what world islike now

Goalswhat action should I do now?

What world was like

How world evolves

what it’ll be likeif I do acts A1-An

What my actions do

Page 18: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Utility-based agentsE

NV

IRO

NM

EN

T

AGENT Effectors

Sensors

what world islike now

Utility functionwhat action should I do now?

What world was like

How world evolves

What my actions do

How happy would I be?

what it’ll be likeif I do acts A1-An

Page 19: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

Learning agentsE

NV

IRO

NM

EN

T

AGENT Effectors

Sensors

Performanceelement

Problemgenerator

Learningelement

Critic

feedback

learninggoals

changes

knowledge

Performance standard

Page 20: Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types

© D. Weld, D. Fox

While driving, what’s the best policy?

• Always put blinker on before turning• Never use your blinker• Look in mirror, and use blinker only if

you observe a car that can observe you

• What kind of reasoning?– logical, goal-based, utility-based?

• What kind of agent is necessary?– reflex, goal-based, utility-based?