26
Intelligent Intelligent Agents Agents Chapter 2 Chapter 2

Intelligent Agents Chapter 2. Outline Agents and environments Agents and environments Rationality Rationality PEAS (Performance measure, Environment,

Embed Size (px)

Citation preview

Intelligent Intelligent AgentsAgents

Chapter 2Chapter 2

OutlineOutline

Agents and environmentsAgents and environments RationalityRationality PEAS (Performance measure, PEAS (Performance measure,

Environment, Actuators, Sensors)Environment, Actuators, Sensors) Environment typesEnvironment types Agent typesAgent types

AgentsAgents An An agentagent is anything that can be viewed is anything that can be viewed

as as perceivingperceiving its its environmentenvironment through through sensorssensors and and actingacting upon that environment upon that environment through through actuatorsactuators

Human agent: eyes, ears, and other Human agent: eyes, ears, and other organs for sensors; hands,organs for sensors; hands,

legs, mouth, and other body parts for legs, mouth, and other body parts for actuatorsactuators

Robotic agent: cameras and infrared Robotic agent: cameras and infrared range finders for sensors;range finders for sensors;

various motors for actuatorsvarious motors for actuators

Agents and environmentsAgents and environments

The The agentagent functionfunction maps from percept maps from percept histories to actions:histories to actions:

[[ff: : P*P* AA]] The The agentagent programprogram runs on the physical runs on the physical

architecturearchitecture to produce to produce ff agent = architecture + programagent = architecture + program

Vacuum-cleaner worldVacuum-cleaner world

Percepts: location and contents, e.g., Percepts: location and contents, e.g., [A,Dirty][A,Dirty]

Actions: Actions: LeftLeft, , RightRight, , SuckSuck, , NoOpNoOp

A vacuum-cleaner agentA vacuum-cleaner agent

Rational agentsRational agents An agent should strive to "do the right thing", An agent should strive to "do the right thing",

based on what it can perceive and the actions based on what it can perceive and the actions it can perform. The right action is the one it can perform. The right action is the one that will cause the agent to be most that will cause the agent to be most successfulsuccessful

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

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

Rational agentsRational agents

RationalRational AgentAgent: For each possible : For each possible percept sequence, a rational agent percept sequence, a rational agent should select an action that is should select an action that is expected to maximize its expected to maximize its performance measure, given the performance measure, given the evidence provided by the percept evidence provided by the percept sequence and whatever built-in sequence and whatever built-in knowledge the agent has.knowledge the agent has.

Rational agentsRational agents

Rationality is distinct from omniscience Rationality is distinct from omniscience (all-knowing with infinite knowledge)(all-knowing with infinite knowledge)

Agents can perform actions in order to Agents can perform actions in order to modify future percepts so as to obtain modify future percepts so as to obtain useful information (information useful information (information gathering, exploration)gathering, exploration)

An agent is An agent is autonomousautonomous if its behavior if its behavior is determined by its own experience is determined by its own experience (with ability to learn and adapt)(with ability to learn and adapt)

PEAS descriptionPEAS description PEAS: Performance measure, PEAS: Performance measure,

Environment, Actuators, SensorsEnvironment, Actuators, Sensors Must first specify the setting for Must first specify the setting for

intelligent agent designintelligent agent design Consider, e.g., the task of designing an Consider, e.g., the task of designing an

automated taxi driver:automated taxi driver: Performance measurePerformance measure EnvironmentEnvironment ActuatorsActuators SensorsSensors

PEAS for TAXI driverPEAS for TAXI driver Must first specify the setting for Must first specify the setting for

intelligent agent designintelligent agent design Consider, e.g., the task of designing an Consider, e.g., the task of designing an

automated taxi driver:automated taxi driver: Performance measure: Safe, fast, legal, Performance measure: Safe, fast, legal,

comfortable trip, maximize profitscomfortable trip, maximize profits Environment: Roads, other traffic, pedestrians, Environment: Roads, other traffic, pedestrians,

customerscustomers Actuators: Steering wheel, accelerator, brake, Actuators: Steering wheel, accelerator, brake,

signal, hornsignal, horn Sensors: Cameras, sonar, speedometer, GPS, Sensors: Cameras, sonar, speedometer, GPS,

odometer, engine sensors, keyboardodometer, engine sensors, keyboard

PEAS for Medical PEAS for Medical DiagnosisDiagnosis

Agent: Medical diagnosis systemAgent: Medical diagnosis system Performance measure: Healthy patient, Performance measure: Healthy patient,

minimize costs, lawsuitsminimize costs, lawsuits Environment: Patient, hospital, staffEnvironment: Patient, hospital, staff Actuators: Screen display (questions, Actuators: Screen display (questions,

tests, diagnoses, treatments, referrals)tests, diagnoses, treatments, referrals) Sensors: Keyboard (entry of symptoms, Sensors: Keyboard (entry of symptoms,

findings, patient's answers)findings, patient's answers)

PEAS for Part-pickingPEAS for Part-picking

Agent: Part-picking robotAgent: Part-picking robot Performance measure: Percentage Performance measure: Percentage

of parts in correct binsof parts in correct bins Environment: Conveyor belt with Environment: Conveyor belt with

parts, binsparts, bins Actuators: Jointed arm and handActuators: Jointed arm and hand Sensors: Camera, joint angle sensorsSensors: Camera, joint angle sensors

PEAS for English TutorPEAS for English Tutor

Agent: Interactive English tutorAgent: Interactive English tutor Performance measure: Maximize Performance measure: Maximize

student's score on teststudent's score on test Environment: Set of studentsEnvironment: Set of students Actuators: Screen display (exercises, Actuators: Screen display (exercises,

suggestions, corrections)suggestions, corrections) Sensors: KeyboardSensors: Keyboard

Environment typesEnvironment types Fully observableFully observable (vs. partially observable): An (vs. partially observable): An

agent's sensors give it access to the complete state agent's sensors give it access to the complete state of the environment at each point in time.of the environment at each point in time.

DeterministicDeterministic (vs. stochastic): The next state of the (vs. stochastic): The next state of the environment is completely determined by the environment is completely determined by the current state and the action executed by the agent. current state and the action executed by the agent. (If the environment is deterministic except for the (If the environment is deterministic except for the actions of other agents, then the environment is actions of other agents, then the environment is strategicstrategic))

Episodic Episodic (vs. sequential): The agent's experience is (vs. sequential): The agent's experience is divided into atomic "episodes" (each episode consists divided into atomic "episodes" (each episode consists of the agent perceiving and then performing a single of the agent perceiving and then performing a single action), and the choice of action in each episode action), and the choice of action in each episode depends only on the episode itself.depends only on the episode itself.

Environment typesEnvironment types

Static Static (vs. dynamic): The environment is (vs. dynamic): The environment is unchanged while an agent is deliberating. unchanged while an agent is deliberating. (The environment is (The environment is semidynamicsemidynamic if the if the environment itself does not change with the environment itself does not change with the passage of time but the agent's performance passage of time but the agent's performance score does)score does)

DiscreteDiscrete (vs. continuous): A limited number (vs. continuous): A limited number of distinct, clearly defined percepts and of distinct, clearly defined percepts and actions.actions.

Single agentSingle agent (vs. multiagent): An agent (vs. multiagent): An agent operating by itself in an environment.operating by itself in an environment.

Environment typesEnvironment typesChess with Chess with Chess without Chess without

Taxi driving Taxi driving a clocka clock a clocka clock

Fully observableFully observable YesYes YesYes No No DeterministicDeterministic StrategicStrategic StrategicStrategic

No No Episodic Episodic NoNo NoNo No No Static Static SemiSemi Yes Yes No No DiscreteDiscrete Yes Yes YesYes NoNoSingle agentSingle agent NoNo NoNo No No

The environment type largely determines the agent designThe environment type largely determines the agent design The real world is (of course) partially observable, The real world is (of course) partially observable,

stochastic, sequential, dynamic, continuous, multi-agentstochastic, sequential, dynamic, continuous, multi-agent

Agent functions and Agent functions and programsprograms

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

One agent function (or a small One agent function (or a small equivalence class) is equivalence class) is rationalrational

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

Table-lookup agentTable-lookup agent

Drawbacks:Drawbacks: Huge tableHuge table Take a long time to build the tableTake a long time to build the table No autonomyNo autonomy Even with learning, need a long time to Even with learning, need a long time to

learn the table entrieslearn the table entries action LOOKUP( percepts, table)action LOOKUP( percepts, table)

Agent program for a Agent program for a vacuum-cleaner agentvacuum-cleaner agent

Agent typesAgent types Four basic types in order of increasing Four basic types in order of increasing

generality:generality:

Simple reflex agentsSimple reflex agentsModel-based reflex agentsModel-based reflex agentsGoal-based agentsGoal-based agentsUtility-based agentsUtility-based agentsLearning agentsLearning agents

Simple reflex agentsSimple reflex agents

Model-based reflex Model-based reflex agentsagents

Goal-based agentsGoal-based agents

Utility-based agentsUtility-based agents

Learning agentsLearning agents