Professional Documents
Culture Documents
Lec 2
Lec 2
Principles of Artificial
Intelligence
Course Code CS321
Faculty of Computing and Information Technology
Computer Science Department
Jan, 2022
These slides are based on lecture notes of the book’s author(Artificial
Intelligence: A Modern Approach,)
&
King Saud University course materials
&
Grokking Artificial Intelligence Algorithms
Lecturer:Wedad Al-Sorori
Intelligent Agents 2022 1/46
CS321: Principles of Artificial Intelligence
Intelligent Agents
Chapter Objectives
• At the end of this chapter, the student should be able to:
• Understand what an agent is and how an agent interacts with the
environment in a rational way.
• Identify the percepts available to the agent and the actions that the agent can
execute in a given problem situation.
• Understand the performance measures used to evaluate an agent
• Analyze a problem situation and identify the characteristics of the
environment.
• Discuss the different agent architectures and recommend the suitable
architecture of the desired agent.
Introduction
Human agent:
Sensors: eyes, ears, ...
Robotic agent:
Sensors: cameras and infrared range finders
A software agent
receives file contents, network packets, and human input (keyboard/mouse/touchscreen/voice) as sensory inputs
and acts on the environment by writing files, sending network packets, and displaying information or generating sounds.
●
The agent function is an abstract mathematical description
The agent program is a concrete implementation, running within some physical system( physical
architecture to produce f).
●
General assumption: every agent can perceive its own actions, but possibly not its effects
• Example:
• A vacuum-cleaner agent
• Percepts: location and contents, e.g., [A,Dirty]
• Actions: Left, Right, Suck, NoOp
Intelligent Agents 2022 7/48
CS321: Principles of Artificial Intelligence
Rationality
• Definition
• The term rational should be used in a very specific technical way:
• Rational: maximally achieving pre-defined goals.
• Rationality only concerns what decisions are made (not the thought process
behind them).
• Goals are expressed in terms of the utility of outcomes.
• Being rational means maximizing your expected utility.
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.
Rational Agent
• PAGE(Percepts, Actions, Goals, Environment)
• Must first specify the settings for intelligent agent design
• Without lose of generality “goals” specified by performance measure defining a
numerical value for any environment history
Rational Agent
• Rationality is distinct from omniscience (all-knowing with infinite
knowledge).
• Rationality is not omniscience
• Rationality is not clairvoyance
• Rationality is not (necessarily) successful!
• Performance measure:
• Healthy patient, minimize costs, lawsuits
• Environment:
• Patient, hospital, staff
• Actuators:
• Screen display (form including: questions, tests, diagnoses, treatments,
referrals)
• Sensors:
• Keyboard (entry of symptoms, findings, patient's answers)
Intelligent Agents 2022 19/48
CS321: Principles of Artificial Intelligence
• Performance measure:
• Maximize student's score on test
• Environment:
• Set of students
• Actuators:
• Screen display (exercises, suggestions, corrections)
• Sensors:
• Keyboard
• Fully observable (vs. partially observable): An agent's sensors give it access to the
complete state of the environment at each point in time.
• Episodic (vs. sequential): The agent's experience is divided into atomic "episodes"
during which the agent perceives and then performs a single action, and the choice of
action in each episode depends only on the episode itself.
Intelligent Agents 2022 22/48
CS321: Principles of Artificial Intelligence
??Deterministic
??Episodic
??Static
??Discrete
??Single-agent
AI 1
Intelligent Agents
24 2022 24/48
CS321: Principles of Artificial Intelligence
??Deterministic
??Episodic
??Static
??Discrete
??Single-agent
AI 1
Intelligent
10 december 20 Agents
25 2022 25/48
22
CS321: Principles of Artificial Intelligence
??Deterministic
??Episodic
??Static
??Discrete
??Single-agent
AI 1
Intelligent
10 december 20 Agents
26 2022 26/48
22
CS321: Principles of Artificial Intelligence
??Deterministic
??Episodic
??Static
??Discrete
??Single-agent
AI 1
Intelligent
10 december 20 Agents
27 2022 27/48
22
CS321: Principles of Artificial Intelligence
??Episodic
??Static
??Discrete
??Single-agent
AI 1
Intelligent
10 december 20 Agents
28 2022 28/48
22
CS321: Principles of Artificial Intelligence
??Episodic
??Static
??Discrete
??Single-agent
AI 1
Intelligent
10 december 20 Agents
29 2022 29/48
22
CS321: Principles of Artificial Intelligence
??Episodic NO NO NO NO
??Static
??Discrete
??Single-agent
AI 1
Intelligent
10 december 20 Agents
30 2022 30/48
22
CS321: Principles of Artificial Intelligence
Static vs. dynamic: If the environment can change while the agent is choosing
an action, the environment is dynamic. Semi-dynamic if the agent’s performance
changes even when the environment remains the same.
??Episodic NO NO NO NO
??Static
??Discrete
??Single-agent
AI 1
Intelligent
10 december 20 Agents
31 2022 31/48
22
CS321: Principles of Artificial Intelligence
Static vs. dynamic: If the environment can change while the agent is choosing
an action, the environment is dynamic. Semi-dynamic if the agent’s performance
changes even when the environment remains the same.
??Episodic NO NO NO NO
??Discrete
??Single-agent
AI 1
Intelligent
10 december 20 Agents
32 2022 32/48
22
CS321: Principles of Artificial Intelligence
Discrete vs. continuous: This distinction can be applied to the state of the
environment, the way time is handled and to the percepts/actions of the agent.
??Episodic NO NO NO NO
??Discrete
??Single-agent
AI 1
Intelligent
10 december 20 Agents
33 2022 33/48
22
CS321: Principles of Artificial Intelligence
Discrete vs. continuous: This distinction can be applied to the state of the
environment, the way time is handled and to the percepts/actions of the agent.
??Episodic NO NO NO NO
??Single-agent
AI 1
Intelligent
10 december 20 Agents
34 2022 34/48
22
CS321: Principles of Artificial Intelligence
Single vs. multi-agent: Does the environment contain other agents who
are also maximizing some performance measure that depends on the
current agent’s actions?
??Episodic NO NO NO NO
??Single-agent
AI 1
Intelligent
10 december 20 Agents
35 2022 35/48
22
CS321: Principles of Artificial Intelligence
Single vs. multi-agent: Does the environment contain other agents who
are also maximizing some performance measure that depends on the
current agent’s actions?
??Episodic NO NO NO NO
??Single-agent YES NO NO NO
AI 1
Intelligent Agents 2022 36/48
CS321: Principles of Artificial Intelligence
Goal-based agents
Characteristics
Action depends on the goal . (consideration of future)
e.g. path finding
fundamentally different from the condition-action rule.
Search and Planning
New
Solving “car-braking” problem?
yes, possible, … but not likely natural.
appears less efficient.
architecture
Learning agents
architecture
Any other
agent!
AIMA Code
https://github.com/aimacode
Summary
• To conclude:
THANKS