introduction to artificial intelligence 2nd semester 2015 ... · introduction to artificial...
TRANSCRIPT
![Page 1: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/1.jpg)
Introduction to Artificial Intelligence2nd semester 2016/2017
Chapter 2: Intelligent AgentsMohamed B. Abubaker
Palestine Technical College – Deir El-Balah
1
![Page 2: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/2.jpg)
Agents and Environments
• An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators
• A human agent has:• eyes, ears, and other organs for sensors
• hands, legs, mouth, and other body parts for actuators
• Robotic agent: • cameras and infrared range finders for sensors
• various motors for actuators
• The term percept refers to the agent’s perceptual inputs at any given instance.
2
![Page 3: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/3.jpg)
Agents and Environments (cont..)
• Agent’s behavior is described by the agent function that maps any given percept sequence to an action.
• Agent function for an artificial agent will be implemented by an agent program
3
![Page 4: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/4.jpg)
Agents interact with environment through sensors and actuators
4
![Page 5: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/5.jpg)
Vacuum-cleaner world
5
![Page 6: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/6.jpg)
The Concept of Rationality
• A rational agent is one that does the right thing
• 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.
6
![Page 7: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/7.jpg)
Rationality
• Rational Agent: For each possible percept sequence, a rational agent should selectan action that is expected to maximize its performance measure, given theevidence provided by the percept sequence and whatever built-in knowledge theagent has.
• The answer if a given agent is a rational agent, depends on four things:• The performance measure
• The agent’s prior knowledge of the environment
• The actions that the agent can perform
• The agent’s percepts sequence to date
7
![Page 8: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/8.jpg)
Omniscience, Learning, and Autonomy
• Rationality is distinct from omniscience (all-knowing with infinite knowledge)• Rationality ≠ Perfection
• Rationality maximizes the expected performance
• Information gathering
• Rational agent does not require to gather information only, but also to learn asmuch as possible from what it perceives.• Learning
• The agent’s initial configuration could reflect some prior knowledge of the environment,but as the agent gains experience this may be modified and augmented.
• A rational agent should be autonomous• if its behavior is determined by its own experience
• become effectively independent of its prior knowledge
8
![Page 9: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/9.jpg)
The Nature of Environments
• In designing an agent, the first step must always be to specify the task environment as fully as possible
• Task Environment (PEAS):• Performance Measure
• Environment
• Actuators
• Sensors
9
![Page 10: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/10.jpg)
PEAS description of the task environment for an automated taxi
10
![Page 11: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/11.jpg)
Properties of Task Environment
• Fully observable vs. Partially observable
• Single agent vs. multi-agent
• Deterministic vs. Stochastic
• Episodic vs. Sequential
• Static vs. Dynamic
• Discrete vs. Continuous
• Known vs. Unknown
11
![Page 12: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/12.jpg)
Properties of Task Environment
• Fully observable vs. Partially observable• Fully observable:
• An agent's sensors give it access to the complete state of the environment at each point in time.
• the sensors detect all aspects that are relevant to the choice of action.
• convenient because the agent need not maintain any internal state to keep track of the world
• Partially observable
• because of noisy and inaccurate sensors
• or because parts of the state are simply missing from the sensor data
12
![Page 13: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/13.jpg)
Properties of Task Environment
• Single agent vs. multi-agent• An agent solving a crossword puzzle by itself is a single agent environment
• Multi-agent environment
• Cooperative
• Competitive
• Communication
• Chess, taxi driving, soccer
13
![Page 14: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/14.jpg)
Properties of Task Environment
• Deterministic vs. Stochastic• Deterministic
• The next state of the environment is completely determined by the current state and the action executed by the agent
• Crossword puzzle, chess
• Otherwise, it is a stochastic environment.
• Taxi driving, dice
14
![Page 15: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/15.jpg)
Properties of Task Environment
• Episodic vs. Sequential• Episodic
• The agent's experience is divided into atomic "episodes"
• each episode consists of the agent perceiving and then performing a single action
• the choice of action in each episode depends only on the episode itself
• Assembly line
• Sequential
• The current decision could affect all future decisions
• Chess, taxi driving
15
![Page 16: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/16.jpg)
Properties of Task Environment
• Static vs. Dynamic• Dynamic
• The environment can changed while an agent is deliberating (deciding on an action)
• Otherwise, it is a static environment
• The environment is semidynamic if the environment itself does not change with the passage of time but the agent's performance score does
16
![Page 17: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/17.jpg)
Properties of Task Environment
• Discrete vs. Continuous• applies to the state of the environment, to the way time is handled, and to the percepts
and actions of the agent
• A limited number of distinct states, and discrete set of percepts and actions. Discrete
• Taxi driving is a continuous-state and continuous-time problem
• Known vs. Unknown• refers not to the environment itself but to the agent’s (or designer’s) state of knowledge
about the “laws of physics” of the environment
17
![Page 18: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/18.jpg)
The Structure of Agents
• So far, describe agent by behavior:• the action that is performed after any given sequence of percepts
• The job of AI is to design:• an agent program that implements the agent function
• this program will run on some sort of computing device with physical sensors and actuators
• Agent = architecture + program
• The difference between the agent program and the agent function:• Agent program takes the current percept as input
• Agent function takes the entire percept history
18
![Page 19: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/19.jpg)
Table lookup Agent
19
![Page 20: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/20.jpg)
Agent program for a vacuum-cleaner agent
20
![Page 21: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/21.jpg)
Basic kinds of Agent Programs
• Simple reflex agents
• Model-based reflex agents
• Goal-based agents
• Utility-based agents
• Learning agents
21
![Page 22: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/22.jpg)
Simple reflex agents
• The simplest kind of agent
• These agents select actions on the basis of the current percept, ignoring the rest of the percept history
• Simple reflex agents have the admirable property of being simple, but they turn out to be of limited intelligence
22
![Page 23: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/23.jpg)
Simple reflex agents
23
![Page 24: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/24.jpg)
Simple reflex agents
24
![Page 25: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/25.jpg)
Model-based reflex agents
• The most effective way to handle partial observability is for the agent to keep track of the part of the world it can’t see now.
• The agent should maintain some sort of internal state that depends on the percept history and thereby reflects at least some of the unobserved aspects of the current state
25
![Page 26: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/26.jpg)
Model-based reflex agents
26
![Page 27: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/27.jpg)
Model-based reflex agents
27
![Page 28: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/28.jpg)
Goal-based agents
• Knowing something about the current state of the environment is not always enough to decide what to do
• the agent needs some sort of goal information that describes situations that are desirable
28
![Page 29: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/29.jpg)
Goal-based agents
29
![Page 30: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/30.jpg)
Utility-based agents
• Goals alone are not enough to generate high-quality behavior in most environments
30
![Page 31: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/31.jpg)
Learning agents
31
![Page 32: Introduction to Artificial Intelligence 2nd semester 2015 ... · Introduction to Artificial Intelligence 2nd semester 2016/2017 Chapter 2: Intelligent Agents Mohamed B. Abubaker Palestine](https://reader036.vdocuments.net/reader036/viewer/2022081512/5fc5669f3ce0db79c42f2adc/html5/thumbnails/32.jpg)
END
32