Module 1
Module 1
Text Book
Title: Artificial Intelligence: A Modern Approach
Author: Stuart Russell and Peter Norvig
Publication: 3rd Edition, Pearson, 2015
2
Syllabus
3
Syllabus
4
Module 1
Introduction to Artificial Intelligence
• What is AI ?
• Foundations of Artificial Intelligence
• History of Artificial Intelligence
• Applications of AI
Intelligent Agents:
• Agents and environment
• Concept of Rationality
• The nature of environment
• The structure of agents.
Introduction to Artificial Intelligence, Definitions,
foundation, History and Applications
6
What is AI???
It studies ways to build intelligent programs that can creatively solve problems,
in a way that mimics human intelligence.
7
Examples of AI in everyday life
• Face recognition
• Smart cars
• Digital assistants
• Entertainment and social apps
• Banking
• Google predictive search algorithm
• E-commerce
8
AI,ML and DL
9
Real time Examples
10
Contd..
11
Introduction to Artificial Intelligence
• Philosophy of AI - “Can a machine think and behave like humans do?”
• Artificial intelligence (AI) is an area of computer science that emphasizes the creation of
intelligent machines that work and react like humans.
• AI is accomplished by studying how human brain thinks, and how humans learn, decide,
and work while trying to solve a problem, and then using the outcomes of this study as a
basis of developing intelligent software and systems.
12
AI???
https://www.youtube.com/watch?v=uMzUB89uSxU
13
What is AI?
Views of AI fall into four categories:
1. Thinking humanly(mimic human thought processes.)-ex ChatGpt
2. Thinking rationally (follows logical rules and mathematical reasoning to make
decisions)-ex Chess AI
3. Acting humanly(behaves like a human in actions and interactions)-ex Siri & Alexa
4. Acting rationally (acts logically and efficiently to achieve the best outcome,
regardless of human-like behavior.“)-ex Search engines , Fraud Detection AI
15
Thinking Humanly Thinking Rationally
“The exciting new effort to make “How computational models can simulate
computers think … machines with minds, human-like thinking, perception, and
in the full and literal sense.” decision-making.”
“Activities that we associate with human “The study of the computations that make
thinking, activities such as decision- it possible to perceive, reason and act.”
making, problem solving, learning…”
“The art of creating machines that “Focuses on building AI systems that make
perform functions that require rational, goal-oriented decisions to achieve
intelligence when performed by the best possible outcome.”
people.”
“AI … is concerned with intelligent
“The study of how to make computers behavior in artifacts.”
do things at which, at the moment,
people are better.”
Acting humanly: Turing Test
• Turing (1950) developed "Computing machinery and
intelligence":
• "Can machines think?" or "Can machines behave
intelligently?"
• Operational test for intelligent behavior: the Imitation Game
If the interrogator cannot reliably distinguish between the human and the AI
system, the AI is said to have passed the Turing Test.
If the interrogator cannot distinguish the AI from a human, the AI has passed
the Turing Test.
19
Yet AI researchers have devoted little effort to passing the Turing test, believing that
it is more important to study the underlying principles of intelligence than to
duplicate an exemplar.
The quest for “artificial flight” succeeded when the Wright brothers and others stopped
imitating birds and learned about aerodynamics.
Aeronautical engineering tests do not define the goal of their field as making “machines
that fly so exactly like pigeons that they can fool even other pigeons.”
The quote argues that AI should not just be about fooling humans into thinking it's human
(Acting Humanly approach)
Instead, AI should focus on solving problems efficiently, even if it does so differently from
humans (Acting Rationally approach).
20
21
Acting humanly: Turing Test
The computer would need to posses the following capabilities:
27
Acting Rationally:
Rational Agent
• An agent is an entity that perceives and acts
• A system is rational if it does the “right thing,” given what it
knows.
• This course is about designing rational agents
• Rational agent is one that acts so as to achieve the best
outcome or, when there is uncertainty, the best expected
outcome.
• Rational behavior: doing the right thing
• The right thing: that which is expected to maximize goal
achievement, given the available information
• We will concentrate on general principles of rational agents and
on components for constructing them.
Behave Rationally……….
• What means “behave rationally” for a person/system:
– Take the right/ best action to achieve the goals, based on his/its knowledge and belief
Example: Assume I don’t like to get wet in rain (my goal), so I bring an umbrella (my action). Do I
behave rationally?
– The answer is dependent on my knowledge and belief
– If I’ve heard the forecast for rain and I believe it, then bringing the umbrella is rational.
– If I’ve not heard the forecast for rain and I do not believe that it is going to rain, then
bringing the umbrella is not rational
30
Rational agents
[f: P* A]
⚫For any given class of environments and tasks, we seek the agent
31
Definition of AI
• Existing definitions advocate everything from replicating human intelligence
to simply solving knowledge-intensive tasks.
Examples:
33
AI can be categorized
into two types:
34
Foundations of Artificial Intelligence
Below are the disciplines that contributed ideas, viewpoints and techniques to
AI:
1. Philosophy
2. Mathematics
3. Economics
4. Neuroscience
5. Psychology
6. Computer Engineering
7. Control theory
8. Linguistics 35
Foundations of Artificial Intelligence
• Philosophy
Can formal rules be used to draw valid conclusions?
How does the mind arise from a physical brain?
Where does knowledge come from?
How does knowledge lead to action?
Aristotle was the first to formulate a precise set of laws governing the
rational part of the mind. He developed an informal system of syllogisms for
proper reasoning, which in principle allowed one to generate conclusions
mechanically, given initial premises.
All dogs are animals; all animals have four legs; therefore all dogs have
four legs
• Neuroscience
How do brains process information?
• Computer engineering
How can we build an efficient computer?
• Control theory
How can artifacts operate under their own control?
• Linguistics
How does the language relate to thought?
Ref : https://www.javatpoint.com/history-of-artificial-intelligence
Applications of AI
Applications:
• Google duplex
• The GPS developed in 1957 by Alan Newell and Hervert
Simon, embodied a grandiose vision
AGENTS
44
Agent Terminology
45
Rationality
Rationality is nothing but status of being reasonable, sensible, and having
good sense of judgment.
Rationality is concerned with expected actions and results depending
upon what the agent has perceived. Performing actions with the aim of
obtaining useful information is an important part of rationality.
What is Ideal Rational Agent?
An ideal rational agent is the one, which is capable of doing expected
actions to maximize its performance measure, on the basis of −
• Its percept sequence
• Its built-in knowledge base
Rationality of an agent depends on the following −
• The performance measures, which determine the degree of success.
• Agent’s Percept Sequence till now.
• The agent’s prior knowledge about the environment.
• The actions that the agent can carry out.
A rational agent always performs right action, where the right action
means the action that causes the agent to be most successful in the given
percept sequence. The problem the agent solves is characterized by 46
Performance Measure, Environment, Actuators, and Sensors (PEAS).
Examples of Agent:-
An agent is anything that can perceive its environment through sensors and acts upon that
environment through effectors.
• A human agent has sensory organs such as eyes, ears, nose, tongue and skin parallel to
the sensors, and other organs such as hands, legs, mouth, for effectors.
• A robotic agent replaces cameras and infrared range finders for the sensors, and various
motors and actuators for effectors.
• A software agent has encoded bit strings as its programs and actions.
47
Intelligent Agents: Agents and environment,
Concept of Rationality, The nature of
environment, The structure of agents
Intelligent Agents:
In the context of artificial intelligence, an intelligent agent is a system that
perceives its environment, processes information and takes actions to achieve
specific goals.
The concept of intelligent agents is fundamental to understanding how AI systems
interact with their surroundings.
48
Let's delve into key
components related to
intelligent agents:
Agents and Environment:
•Agent: An agent is anything that can be viewed as
perceiving its environment through sensors and acting upon
that environment through effectors. In the context of AI,
agents are typically computer programs or systems.
•Environment: The environment is the external context in
which the agent operates. It includes everything outside the
agent that can potentially affect or be affected by the agent's
actions.
49
Intelligent agent
50
51
Rationality
What is rational at any given time depends on four
things:
•The performance measure that defines the criterion of
success.
•The agent's prior knowledge of the environment.
•The actions that the agent can perform.
•The agent's percept sequence to date.
This leads to a definition of a 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
the percept sequence and whatever built-in knowledge
the agent has
52
53
Nature of Environment
Specifying the task environment
PEAS- Performance, Environment, Actuators, Sensors.
54
55
Properties of Task
Environment
56
Agents in Artificial
Intelligence
Artificial intelligence is defined as a study of rational agents. A rational
agent could be anything which makes decisions, as a person, firm,
machine, or software. It carries out an action with the best outcome after
considering past and current percepts(agent’s perceptual inputs at a given
instance).
An AI system is composed of an agent and its environment. The agents act
in their environment. The environment may contain other agents. An
agent is anything that can be viewed as :
• perceiving its environment through sensors and
• acting upon that environment through actuators
57
The Structure of Intelligent Agents
58
Agent Program
59
The Structure of Intelligent Agents
To understand the structure of Intelligent Agents, we should
be familiar with Architecture and Agent Program.
60
Types of Agents
61
Simplex Agent
• The Simple reflex agents are the simplest agents. These agents take
decisions on the basis of the current percepts and ignore the rest of
the percept history.
• These agents only succeed in the fully observable environment.
• The Simple reflex agent does not consider any part of percepts history
during their decision and action process.
• The Simple reflex agent works on Condition-action rule, which means it
maps the current state to action. Such as a Room Cleaner agent, it
works only if there is dirt in the room.
• Problems for the simple reflex agent design approach:
• They have very limited intelligence
• They do not have knowledge of non-perceptual parts of the
current state
• Mostly too big to generate and to store.
• Not adaptive to changes in the environment.
62
Simplex Agent
63
Example
64
Model-based reflex agent
The Model-based agent can work in a partially observable
environment, and track the situation.
A model-based agent has two important factors:
• Model: It is knowledge about "how things happen in
the world," so it is called a Model-based agent.
• Internal State: It is a representation of the current state
based on percept history.
These agents have the model, "which is knowledge of the
world" and based on the model they perform actions.
Updating the agent state requires information about:
• How the world evolves
• How the agent's action affects the world.
65
Model-based reflex agent
66
67
For the braking problem, the internal state is
not too extensive— just the previous frame
from the camera, allowing the agent to detect
when two red lights at the edge of the vehicle
go on or off simultaneously.
70
Goal-based agents
72
Sometimes goal-based action selection is
straightforward
for example when goal satisfaction results immediately
from a single action.
Sometimes it will be trickier
for example, when the agent has to consider long
sequences of twists and turns to find a way to achieve
the goal.
Search and planning are the subfields of AI devoted to
finding action sequences that achieve the agent’s goals.
73
Reflex Agent Goal Based
For the reflex agent, on the other The goal-based agent appears less
hand, we would have to rewrite efficient, it is more flexible because the
many condition–action rules. knowledge that supports its decisions is
represented explicitly and can be
modified. If it starts to rain, the agent can
update its knowledge of how effectively
its brakes will operate; this will
automatically cause all of the relevant
Reflex agent Vs behaviors to be altered to suit the new
conditions
Goal based agent
The reflex agent’s rules for when The goal-based agent’s behavior can
to turn and when to go straight easily be changed to go to a different
will work only for a single destination, simply by specifying that
destination; they must all be destination as the goal.
replaced to go somewhere new.
Example: Example:
The reflex agent brakes when it A goal-based agent, in principle, could
sees brake lights reason that if the car in front has its brake
lights on, it will slow down.
74
Utility-based agents
75
Utility-based agents
76
Learning Agents
• A learning agent in AI is the type of agent which can learn from its past
experiences, or it has learning capabilities.
• It starts to act with basic knowledge and then able to act and adapt
automatically through learning.
• A learning agent has mainly four conceptual components, which are:
• Learning element: It is responsible for making improvements by learning
from environment
• Critic: Learning element takes feedback from critic which describes that
how well the agent is doing with respect to a fixed performance standard.
• Performance element: It is responsible for selecting external action
• Problem generator: This component is responsible for suggesting actions
that will lead to new and informative experiences.
• Hence, learning agents are able to learn, analyze performance, and look for new
ways to improve the performance.
77
Learning Agents
78
• A learning agent can be divided into four conceptual
components, as shown in Fig.
• The most important distinction is between the learning
element, which is responsible for making improvements,
• the performance element, which is responsible for
PERFORMANCE ELEMENT selecting external actions.
• The performance element is what we have previously
considered to be the entire agent: it takes in percepts and
decides on actions.
• The learning element uses CRITIC feedback from the
critic on how the agent is doing and determines how the
performance element should be modified to do better in
the future
• The last component of the learning agent is the problem
generator. It is responsible for suggesting actions that will
lead to new and informative experiences.
79
How the components of
agent programs work
80
Factored Representation
81
• Many important areas of AI are based on
factored representations, including
• Constraint satisfaction algorithms
• Propositional logic
• planning
• Bayesian networks
• machine learning algorithms
82
Thank you!