Uploaded by Maqsood Ali

AI Introduction

Artificial Intelligence
Dr. Anabia Sohail
Instructor Information
• Faculty Office 2, last room
• https://www.researchgate.net/profile/Anabia-Sohail-2
Class Information
• GCR Class Code: qr6cyeu
• https://classroom.google.com/c/NDU4NzM4OTQzOTA0
• https://meet.google.com/pvy-yqvw-eso
• Classes: Monday, Tuesday, Friday
• Lab: Wednesday
Marks Distribution
Class Activity, Participation, Behaviour
What is AI
• Artificial Intelligence (AI) is the study and creation of machines that perform tasks normally
associated with intelligence.
• “The art of creating machines that perform functions that require intelligence when
performed by people.” (Kurzweil)
• “The study of how to make computers do things at which, at the moment, people are
better.” (Rich and Knight)
• The focus of AI is to deal with the development of algorithms and machines that can
perceive, reason and act like humans. Thus, AI find solutions to complex problems in a
more human-like fashion.
• AI learns by creating machine learning models based on provided inputs and desired
Applications of AI
• Web Search Engine
• Google
• Recommender Systems
• Netflix, YouTube, Amazon
• Voice Assistant System
• Face Tagging
• Biometric Identification
Applications of AI
• Medicine:
• Image guided surgery
• Image analysis and enhancement
Applications of AI
• Autonomous Planning & Scheduling:
• Autonomous rovers
• Autonomous vehicles
Applications of AI
• Games:
• Robotic toys, Deep Blue, Alpha Go
What is Artificial Intelligence ?
• making computers that think?
• the automation of activities we associate with human thinking, like decision
making, learning ... ?
• the art of creating machines that perform functions that require intelligence
when performed by people ?
• the study of mental faculties through the use of computational models ?
What is Artificial Intelligence ?
• the study of computations that make it possible to perceive, reason and act ?
• a field of study that seeks to explain and emulate intelligent behaviour in terms of
computational processes ?
• a branch of computer science that is concerned with the automation of intelligent
behaviour ?
• anything in Computing Science that we don't yet know how to do properly ? (!)
AI – Augmented Intelligence
• Current view of AI is augmented AI
• IBM Research defines Artificial Intelligence (AI) as Augmented Intelligence,
helping experts scale their capabilities as machines do the time-consuming
• AI can be understand as augmented intelligence
• The objective of AI should not be to replace human experts, but rather
extend human capabilities and accomplish tasks that neither humans nor
machines could do on their own.
AI – Augmented Intelligence
• Augmented Intelligence is a subsection of AI machine learning that is developed to
• Enhance human intelligence
• Not to operate independently or to replace the humans
• It is designed to do so by improving human decision-making and, by extension, actions taken in response to
improved decisions.
• In this way, augmented intelligence applications combine human and machine intelligence. It is important
in systems where the risk of failure is too great or the AI is not evolved enough to take humans completely
out of the equation.
• Traditional view of AI is development of autonomous system, operating without the need for human
• Augmented Intelligence uses machine learning and deep learning to provide humans with actionable data
Pillars of Artificial Intelligence
• Human Like
• Rational
Major Methods to Define ‘Intelligence’
• What is an Intelligent Being ?
Criteria 1
• Humans
• Rationale
• Thought process ?
Criteria 2
• Right Answer ?
• Right Action ?
• Thought Process
• Action
What is Artificial Intelligence ?
Systems that
like humans
Systems that act
like humans
Systems that
Systems that act
Acting humanly: The Turing Test approach
• The Turing Test was designed to provide a operational definition of intelligence. Turing
defined intelligent behavior as the ability to achieve human-level performance in all
cognitive tasks.
• Test is that the computer should be interrogated by a human, and passes the test if the
interrogator cannot tell if there is a computer or a human at the other end.
• The computer would need to possess the following capabilities:
• Natural language processing to enable it to communicate successfully
• knowledge representation to store information provided before or during the
• automated reasoning to use the stored information to answer questions and to draw
new conclusions
• machine learning to adapt to new circumstances and to detect and extrapolate patterns.
Acting humanly: The Turing Test
Thinking humanly: The cognitive modelling
• If say that a given program thinks like a
human, need to determine how humans
• We need to get inside the actual workings
of human minds.
• There are two ways to do this:
• through introspection
• through psychological experiments
Thinking rationally: The laws of thought
• Aristotle’s syllogisms provided patterns for argument
structures that always provide correct premises.
• A famous example, “Socrates is a man; all men are mortal;
therefore, Socrates is mortal.”
• Another example – All TVs use energy; Energy always
generates heat; therefore, all TVs generate heat.”
• These arguments initiated the field called logic. Notations for
statements for all kinds of objects were developed and
interrelated between them to show logic.
Acting rationally: The rational agent
• Acting rationally means acting so as to achieve one's goals, given
one's beliefs. An agent is just something that perceives and acts.
Artificial Intelligence
“The branch of computer science that is concerned with the automation of intelligent behavior”
~ Luger and Stublefield
“The art of creating machines that perform functions that require intelligence when performed by people”
~ Kurzweil
Main Constituents:
• Perceive
• Process/Reason (Rationale)
• Actions
2019-2023: 31% (7.22 Billion Dollar)
Agents and environments
• Artificial Intelligence (AI) is the study and creation of machines that
perform tasks normally associated with intelligence.
• An AI system is composed of an agent and its environment. The
agents act in their environment. The environment may contain other
Agents and environments
• An agent perceives its environment through sensors and acts upon it through
actuators (or effectors, depending on whom you ask)
• The agent function maps percept sequences to actions
• It is generated by an agent program running on a machine
Agent Terminology
• Percept − It is agent’s perceptual inputs at a given instance.
• Percept Sequence − the complete history of everything the agent has perceived.
• Behavior of Agent − It is the action that agent performs after any given sequence of percepts.
• Agent Function − It is a map from the precept sequence to an action.
• Agent program: The agent program runs on the physical architecture to produce f
• Performance Measure of Agent − It is the criteria, which determines how successful an agent is.
AI as Designing Rational Agents
An agent is an entity that perceives and acts.
A rational agent selects actions that maximize its expected utility.
Characteristics of the sensors, actuators, and environment dictate techniques for
selecting rational actions
This course is about:
• General AI techniques for many problem types
• Learning to choose and apply the technique appropriate for each problem
Rational Agent
Vaccum Cleaner Agent
Vaccum Cleaner Agent Example
• An environment in artificial intelligence is the surrounding of the agent.
The agent takes input from the environment through sensors and delivers
the output to the environment through actuators.
• There are several types of environments:
Fully Observable vs Partially Observable
Deterministic vs Stochastic
Competitive vs Collaborative
Single-agent vs Multi-agent
Static vs Dynamic
Discrete vs Continuous
Environment Types
• Fully Observable vs Partially Observable
• Agent sensor is capable to sense or access the complete state of an agent at
each point in time, it is said to be a fully observable environment else it is
partially observable.
• An environment is called unobservable when the agent has no sensors
in all environments.
• Example:
• Chess – the board is fully observable, so are the opponent’s moves
• Driving – the environment is partially observable because what’s around the
corner is not know.
Environment Types
• Deterministic vs Stochastic
• Agent’s current state completely determines the next state of the agent, the
environment is said to be deterministic.
• The stochastic environment is random in nature which is not unique
and cannot be completely determined by the agent.
• Example:
Chess – there would be only a few possible moves for a coin at the
current state and these moves can be determined
Self Driving Cars – the actions of a self-driving car are not unique, it
varies time to time
Environment Types
• Competitive vs Collaborative
• An agent is said to be in a competitive environment when it competes
against another agent to optimize the output.
• The game of chess is competitive as the agents compete with each other to
win the game which is the output.
• An agent is said to be in a collaborative environment when multiple
agents cooperate to produce the desired output.
• When multiple self-driving cars are found on the roads, they cooperate with
each other to avoid collisions and reach their destination which is the output
Environment Types
• Single-agent vs Multi-agent
• An environment consisting of only one agent is said to be a singleagent environment.
• A person left alone in a maze is an example of the single-agent
• An environment involving more than one agent is a multi-agent
• The game of football is multi-agent as it involves 11 players in each
Environment Types
• Dynamic vs Static
• An environment that keeps constantly changing itself when the agent
is up with some action is said to be dynamic.
• A roller coaster ride is dynamic as it is set in motion and the
environment keeps changing every instant.
• An idle environment with no change in its state is called a static
• An empty house is static as there’s no change in the surroundings
when an agent enters.
Environment Types
• Discrete vs Continuous
• If an environment consists of a finite number of actions that can be
deliberated in the environment to obtain the output, it is said to be a
discrete environment.
• The game of chess is discrete as it has only a finite number of moves. The
number of moves might vary with every game, but still, it’s finite.
• The environment in which the actions performed cannot be
numbered ie. is not discrete, is said to be continuous.
• Self-driving cars are an example of continuous environments as their
actions are driving, parking, etc. which cannot be numbered.
The task environment - PEAS
• Performance measure
• -1 per step; + 10 food; +500 win; -500 die;
+200 hit scared ghost
• Environment
• Pacman dynamics (incl ghost behavior)
• Actuators
• Left Right Up Down or NSEW
• Sensors
• Entire state is visible (except power pellet duration)
PEAS: Automated taxi
• Performance measure
• Environment
• Actuators
• Sensors
Image: http://nypost.com/2014/06/21/how-googlemight-put-taxi-drivers-out-of-business/
PEAS: Medical diagnosis system
• Performance measure
• Environment
• Actuators
• Sensors
Agent Types
Simple reflex agents
What the world
is like now
Condition-action rules
What action I
should do now
Reflex agents with state
How the world evolves
What my actions do
Condition-action rules
What action I
should do now
What the world
is like now
Goal-based agents
What my actions do
What it will be like
if I do action A
What action I
should do now
How the world evolves
What the world
is like now
Utility-based agent
Environment types
Fully or partially observable
Single-agent or multiagent
Deterministic or stochastic
Static or dynamic
Discrete or continuous
Known physics?
Known perf. measure?
Agent design
• The environment type largely determines the agent design
Partially observable => agent requires memory (internal state)
Stochastic => agent may have to prepare for contingencies
Multi-agent => agent may need to behave randomly
Static => agent has time to compute a rational decision
Continuous time => continuously operating controller
Unknown physics => need for exploration
Unknown perf. measure => observe/interact with human principal