UNIT 1
ARTIFICIAL Introduction
INTELLIGENCE
DISCLAIMER
Some contents in this presentation are retrieved from the
following original sources:
1. Washington State University: Artificial Intelligence
Course
2. Introduction to Articial Intelligence by Prof. Bojana
Dalbelo Basic and Assoc. Prof. Jan Snajder, University of
Zagreb, Faculty of Electrical Engineering and Computing
3. [Link]
4. [Link]
an-introduction/
HIGHLIGHTS OF AI
BEEWISE BEEHOME
USES AI
TECHNOLOGY AND
ADVANCED ROBOTICS
TO REDESIGN THE
BEEHIVE AND MAKE
IT SUSTAINABLE FOR
BEES
Beewise Beehome
uses AI technology and
advanced robotics to redesign
the beehive and make it
sustainable for bees
Embodied Moxie
AI-powered robot
for kids during
pandemic
BrainBox AI
BrainBox AI uses cloud-based
computing and real-time data from
weather forecasts, sun-cloud
positioning, heat, humidity, etc. to
predict the building’s future and
thermal conditions.
Wint
Wint is a vital innovation that is
based on Artificial Intelligence
that stops leaks and alerts
water leakage.
WHY STUDY AI?
AI makes computers more useful
Intelligent computer would have huge
impact on civilization
AI cited as “field I would most like to be
in” by scientists in all fields
Computer is a good metaphor for talking
and thinking about intelligence
WHY STUDY AI?
Turning theory into working programs forces us to work out the details
AI yields good results for Computer Science
AI yields good results for other fields
Computers make good experimental subjects
Personal motivation: mystery
WHAT IS THE DEFINITION OF AI?
What do you think?
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Bellman, 1978
“[The automation of] activities that we associate with human thinking,
activities such as decision making, problem solving, learning”
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Charniak & McDermott, 1985
“The study of mental faculties through the use of computational models”
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Dean et al., 1995
“The design and study of computer programs that behave intelligently.
These programs are constructed to perform as would a human or an
animal whose behavior we consider intelligent”
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Haugeland, 1985
“The exciting new effort to make computers think machines with minds, in
the full and literal sense”
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Kurzweil, 1990
“The art of creating machines that perform functions that require
intelligence when performed by people”
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Luger & Stubblefield, 1993
“The branch of computer science that is concerned with the automation of
intelligent behavior”
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Nilsson, 1998
“Many human mental activities such as writing computer programs, doing
mathematics, engaging in common sense reasoning, understanding
language, and even driving an automobile, are said to demand
intelligence. We might say that [these systems] exhibit artificial
intelligence”
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Rich & Knight, 1991
“The study of how to make computers do things at which, at the moment,
people are better”
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Schalkoff, 1990
“A field of study that seeks to explain and emulate intelligent behavior
in terms of computational processes”
WHAT IS THE DEFINITION OF AI?
Systems that think like Systems that think rationally
humans
Systems that act like humans Systems that act rationally
Winston, 1992
“The study of the computations that make it possible to perceive, reason,
and act”
APPROACH 1:
ACTING HUMANLY
Turing test: ultimate test for acting humanly
Computer and human both interrogated
by judge
Computer passes test if judge can’t tell
the difference
• Natural Language Processing: The
machine needs this to communicate with the
interrogator.
• Knowledge Representation: The machine
needs to store the information provided
before the interrogation.
• Reasoning: It’s important for the machine
to understand how to interpret the
information that gets stored..
• Machine Learning: This is needed so that
the machine can adapt to new conditions in
real time.
Source: [Link]
5efb8989db09
APPROACH 2: THINKING HUMANLY
Requires knowledge of brain function
What level of abstraction?
How can we validate this
This is the focus of Cognitive Science
APPROACH 3: THINKING RATIONALLY
Aristotle attempted this
What are correct arguments or thought processes?
Provided foundation of much of AI
Not all intelligent behavior controlled by logic
What is our goal? What is the purpose of thinking?
APPROACH 4: ACTING RATIONALLY
Act to achieve goals, given set of beliefs
Rational behavior is doing the “right thing”
Thing which expects to maximize goal achievement
This is approach adopted by Russell & Norvig
FOUNDATIONS OF AI
Philosophy
450 BC, Socrates asked for algorithm to distinguish pious from non-pious individuals
Aristotle developed laws for reasoning
Mathematics
1847, Boole introduced formal language for making logical inference
Economics
1776, Smith views economies as consisting of agents maximizing their own well being (payoff)
Neuroscience
1861, Study how brains process information
Psychology
1879, Cognitive psychology initiated
Linguistics
1957, Skinner studied behaviorist approach to language learning
HISTORY OF AI
Image source: [Link]
AI QUESTIONS
Can we make something that is as intelligent as a human?
Can we make something that is as intelligent as a bee?
Can we make something that is evolutionary, self
improving, autonomous, and flexible?
Can we save this plant $20M/year by pattern
recognition?
Can we save this bank $50M/year by automatic fraud
detection?
Can we start a new industry of handwriting recognition
agents?
COMPONENTS OF AN AI SYSTEM
An agent perceives its environment
through sensors and acts on the
environment through actuators.
Human: sensors are eyes, ears,
actuators (effectors) are hands,
legs, mouth.
Robot: sensors are cameras, sonar,
lasers, ladar, bump, effectors are
grippers, manipulators, motors
The agent’s behavior is described by its
function that maps percept to action.
Agent = Architecture + Agent Program
RATIONALITY
A rational agent does the
right thing (what is
this?)
A fixed performance measure
evaluates the sequence of
observed action effects on the
environment
Source: [Link]
PEAS
Use PEAS to describe task environment
Performance measure
Environment
Actuators
Sensors
Example: Autonomous driving
Performance measure: safe, fast, comfortable
(maximize profits)
Environment: roads, other traffic, pedestrians,
customers
Actuators: steering, accelerator, brake, signal, horn
Sensors: cameras, sonar, speedometer, GPS,
odometer, accelerometer, engine sensors
Fully observable vs. partially
observable
Deterministic vs. stochastic /
strategic
Episodic vs. sequential
ENVIRONMENT
PROPERTIES Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Source: [Link]
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock
Chess without a clock
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Poker
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
Taxi driving Partial Stochasti Sequential Dyna Continuo Multi
c mic us
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
Backgammon Fully Stochasti Sequential Static Discrete Multi
c
Taxi driving Partial Stochasti Sequential Dyna Continuo Multi
c mic us
Medical diagnosis
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
Backgammon Fully Stochasti Sequential Static Discrete Multi
c
Taxi driving Partial Stochasti Sequential Dyna Continuo Multi
c mic us
Medical diagnosis Partial Stochasti Episodic Static Continuo Single
c us
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
Backgammon Fully Stochasti Sequential Static Discrete Multi
c
Taxi driving Partial Stochasti Sequential Dyna Continuo Multi
c mic us
Medical diagnosis Partial Stochasti Episodic Static Continuo Single
c us
Image analysis
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
Backgammon Fully Stochasti Sequential Static Discrete Multi
c
Taxi driving Partial Stochasti Sequential Dyna Continuo Multi
c mic us
Medical diagnosis Partial Stochasti Episodic Static Continuo Single
c us
Image analysis Fully Determin Episodic Semi Discrete Single
istic
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
Backgammon Fully Stochasti Sequential Static Discrete Multi
c
Taxi driving Partial Stochasti Sequential Dyna Continuo Multi
c mic us
Medical diagnosis Partial Stochasti Episodic Static Continuo Single
c us
Image analysis Fully Determin Episodic Semi Discrete Single
istic
Robot part picking
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
Backgammon Fully Stochasti Sequential Static Discrete Multi
c
Taxi driving Partial Stochasti Sequential Dyna Continuo Multi
c mic us
Medical diagnosis Partial Stochasti Episodic Static Continuo Single
c us
Image analysis Fully Determin Episodic Semi Discrete Single
istic
Robot part picking Fully Determin Episodic Semi Discrete Single
istic
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
Backgammon Fully Stochasti Sequential Static Discrete Multi
c
Taxi driving Partial Stochasti Sequential Dyna Continuo Multi
c mic us
Medical diagnosis Partial Stochasti Episodic Static Continuo Single
c us
Image analysis Fully Determin Episodic Semi Discrete Single
istic
Robot part picking Fully Determin Episodic Semi Discrete Single
istic
Interactive English tutor
ENVIRONMENT EXAMPLES
Environment Obser Determi Episodic Static Discrete Agents
vable nistic
Chess with a clock Fully Strategic Sequential Semi Discrete Multi
Chess without a clock Fully Strategic Sequential Static Discrete Multi
Poker Partial Strategic Sequential Static Discrete Multi
Backgammon Fully Stochasti Sequential Static Discrete Multi
c
Taxi driving Partial Stochasti Sequential Dyna Continuo Multi
c mic us
Medical diagnosis Partial Stochasti Episodic Static Continuo Single
c us
Image analysis Fully Determin Episodic Semi Discrete Single
istic
Robot part picking Fully Determin Episodic Semi Discrete Single
istic
Interactive English tutor Partial Stochasti Sequential Dyna Discrete Multi
c mic
AGENT TYPES
Types of agents (increasing in generality
and ability to handle complex
environments)
Simple reflex agents
Reflex agents with state
Goal-based agents
Utility-based agents
Learning agent
Source:
[Link]
ml
SIMPLE REFLEX AGENT
Use simple “if then” rules
Can be short sighted
No explicit goal: the
agent just maps from last
percept to next action ,
any implicit goal is
reached eventually
SimpleReflexAgent(percept)
state = InterpretInput(percept)
rule = RuleMatch(state, rules)
action = RuleAction(rule)
Return action
Image source: [Link]
Performance?
1 point for each square cleaned in time T?
#clean squares per time step - #moves per time step?
Environment: vacuum, dirt, multiple areas defined by square regions
Actions: left, right, suck, idle
Sensors: location and contents
[A, dirty]
EXAMPLE:
VACUUM If status=Dirty then return Suck
else if location=A then return Right
AGENT else if location=B then right Left
Rational is not omniscient
Environment may be partially observable
Thus Rational is not always successful
REFLEX AGENT WITH STATE
Still no goal, still no
planning ahead; but a
more complete view of
Store previously- the “ e.g., now ”
observed information
Can reason about
unobserved aspects of
current state
ReflexAgentWithState(percept)
state = UpdateDate(state,action,percept)
rule = RuleMatch(state, rules)
action = RuleAction(rule)
Return action
If status=Dirty then Suck
else if have not visited other square in >3 time units, go there
Image source: [Link]
Goal reflects desires of agents
May project actions to see if consistent with goals
Takes time, world may change during reasoning
Their every action is intended to reduce its distance
from the goal. This allows the agent a way to choose
among multiple possibilities, selecting the one which
reaches a goal state.
GOAL-BASED
AGENTS
Explicit goal guides
finding congruent
sequence of steps ;
agent can simulate how
to get there e.g.,
search , planning
Image source: [Link]
The agents which are developed having their end
uses as building blocks are called utility-based
agents. When there are multiple possible
alternatives, then to decide which one is best,
utility-based agents are used. They choose actions
based on a preference (utility) for each state.
UTILITY-
BASED
AGENTS
Not just reach the goal;
reach it in the fastest /
cheapest /etc. way
possible
Image source: [Link]
A learning agent in AI is the type of agent that can
learn from its past experiences or it has learning
capabilities. It starts to act with basic knowledge
and then is able to act and adapt automatically
through learning
At least a performance
measure (e.g., error,
recall/precision); ideally
an active learning
LEARNING component (most often
the ML engineer himself)
AGENTS The machine
learning algorithm
per se
Balancing The trained model (of
exploration a certain
exploitation representation ) in
tradeoff action (“testing”)
Image source: [Link]
OTHER EXAMPLE AI SYSTEMS
Natural language processing
Uncertainty reasoning
Knowledge Search
Representation Computer Vision
Robotics
Problem Planning
solving
Machine
learning
Gym Retro allows turning classic video games
into Reinforcement learning environments. It
comes with 1000+ games and supports
adding various emulators which make adding
ACTIVITY: new games as an environment fairly easy.
As of now, Gym Retro supports the following
HANDS- emulators.
•Sega
ON WITH •Nintendo
OPENAI – •NEC
GYM •Atari
RETRO However, it doesn’t come with preloaded
ROM(game files) and we need to download
the ROMs.
For more details on Gym Retro, kindly
refer OpenAI – Gym Retro