Intro to agents

advertisement
9/1/2015
From Today’s New York Times
• Google Says It’s Not the Self-Driving Car’s
Fault. It’s Other Drivers’.
• “The real problem is that the car is too safe,” said Donald
Norman, director of the Design Lab at the University of
California, San Diego, who studies autonomous vehicles.
“They have to learn to be aggressive in the right amount,
and the right amount depends on the culture.”
A Snippet from Turing’s “Computating
Machinery and Intelligence”
•
Q: Please write me a sonnet on the subject of the Forth Bridge.
•
A : Count me out on this one. I never could write poetry.
•
Q: Add 34957 to 70764.
•
A: (Pause about 30 seconds and then give as answer) 105621.
•
Q: Do you play chess?
•
A: Yes.
•
Q: I have K at my K1, and no other pieces. You have only K at K6 and R at R1. It is
your move. What do you play?
•
A: (After a pause of 15 seconds) R-R8 mate.
1
9/1/2015
Intelligent Agents
Chapter 2
What is an Agent?
2
9/1/2015
Outline
• Agents and environments
• Rationality
• Task Environment types (PEAS:
Performance measure, Environment,
Actuators, Sensors)
• Agent types
Many definitions/categorizations. Why are they
useful?
Agents
• An agent is anything that can be viewed as
perceiving its environment through sensors and
acting upon that environment through actuators
• Examples: Human or robot
– Human agent:
• Sensors: eyes, ears, and other organs
• Actuators: hands, legs, mouth, and other body parts
– Robotic agent:
• Sensors: cameras and infrared range finders
• Actuators: Various motors
3
9/1/2015
Agents and environments
• The agent function maps from percept histories to
actions: [f: P*  A]
• The agent program runs on the physical architecture to
produce f (cf. Ford and Hayes’ “formal system drop
test”)
• agent = architecture + program
Vacuum-cleaner world
• Percepts: location and contents, e.g.,
[A,Dirty]
• Actions: Left, Right, Suck, NoOp
4
9/1/2015
Rational agents
• Agent strives to "do the right thing", based on
perceptions and the actions it can perform.
What’s the “right thing”?
• The right action: The one expected to make the
agent most successful
• Performance measure: An objective criterion for
success of an agent's behavior
Vacuum Performance Measure
• Amount of of dirt cleaned up, amount of time
taken, amount of electricity consumed, amount
of noise generated, etc.
• What are the pitfalls/tradeoffs?
5
9/1/2015
Rational agents
• Rational Agent: For each possible percept
sequence, a rational agent should
– select an action that is expected to maximize
its performance measure,
– given the evidence provided by its percept
sequence and any built-in knowledge it has.
Rational agents
• Does rationality require omniscience? (Allknowing with infinite knowledge)
• If agent has no knowledge, is any action
rational, since it knows nothing to guide it?
• Agents can act to modify future percepts
and obtain useful information (information
gathering, exploration)
6
9/1/2015
What is an Autonomous Agent?
• R+N definition: An agent is autonomous
to the extent its behavior is determined by
its own experience (with ability to learn
and adapt)
• Do you agree?
PEAS
• PEAS: Performance measure, Environment,
Actuators, Sensors
• Used to specify the setting for intelligent agent
design
7
9/1/2015
PEAS
• Agent: Part-picking robot
• Performance measure:
• Percentage of parts in correct
bins
• Environment:
• Conveyor belt with parts, bins
• Actuators:
• Jointed arm and hand
• Sensors:
• Camera, joint angle sensors
PEAS for Self-Driving Car/Taxi
• 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, mic
8
9/1/2015
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)
PEAS
•
•
•
•
•
•
•
•
•
Agent: Interactive English tutoring system
Performance measure:
Maximize student's score on test (?)
Environment:
Set of students
Actuators:
Screen display (exercises, suggestions, corrections)
Sensors:
Keyboard
9
9/1/2015
For Small Groups
• Join with 4-5 neighbors
• Pick a task for which you think AI would be
feasible and useful (other than those
we’ve already discussed)
• Write a PEAS description
• What are the tasks and environments?
• How do the environments differ?
• How do these differences affect the
requirements for systems for different task
environments?
• Can environmental differences be
described along a small set of
dimensions?
10
9/1/2015
Environment types
• Fully observable (vs. partially observable): An agent's
sensors give it snapshots of the complete state of the
environment.
• Deterministic (vs. stochastic): The next state of the
environment is completely determined by the current
state and the agent’s action. (Deterministic except for the
actions of other agents = strategic)
• Episodic (vs. sequential):
– Agent’s experience is divided into atomic "episodes" (each
episode consists of the agent perceiving and then performing a
single action), and
– The choice of action in each episode depends only on the
episode, and affects only the current episode
Environment types
• Static (vs. dynamic): The environment is
unchanged while an agent is deliberating.
(Semidynamic if the environment itself does not
change with time but the agent's performance
score does)
• Discrete (vs. continuous): A limited number of
distinct, clearly defined percepts and actions.
• Single agent (vs. multiagent): An agent
operating by itself in an environment.
11
9/1/2015
Sample Environment Types
Chess with
a clock
Chess without Taxi driving
a clock
Fully observable
Deterministic
Episodic
Static
Discrete
Single agent
Sample Environment Types
Fully observable
Deterministic
Episodic
Static
Discrete
Single agent
Chess with
a clock
Yes
Strategic
No
Semi
Yes
No
Chess without
a clock
Yes
Strategic
No
Yes
Yes
No
Taxi driving
No
No
No
No
No
No
• The environment type largely determines the agent design
• The real world is (of course) partially observable, stochastic,
sequential, dynamic, continuous, multi-agent
12
9/1/2015
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
• How can we implement it?
Table-lookup agent
• Drawbacks:
– Huge table
– Take a long time to build the table
– No autonomy
– Even with learning, need a long time to learn
the table entries
13
9/1/2015
Agent types
• R&N make proposals for implementing the
agent function. In order of increasing
sophistication:
– Simple reflex agents
– Model-based reflex agents
– Goal-based agents
– Utility-based agents
Simple reflex agents
14
9/1/2015
Model-based reflex agents
Goal-based agents
15
9/1/2015
Utility-based agents
What’s Missing?
• Hint:
– Implementing them is a lot of work
– Getting them right is hard
– What’s right now may be wrong tomorrow
• What’s the solution?
16
9/1/2015
Learning Agents
• What components must they have?
Learning agents
17
Download