intro AI - Part A
intro AI - Part A
Introduction to
AI and ML
Instructors:
Dr. Nishant Gupta & Dr. Manoj Kumar
Introduction 2
Problem in AI
Theory
Modelling
Algorithms
Applications
History of AI 4
What is intelligence?
What is thinking?
What is a machine?
Is the compute a machine?
Can a machine think?
If yes, are we machines?
History of AI 6
[An Argonne lab program] has come up with a major mathematical proof
that would have been called creative if a human had thought of it.-New
York Times, December, 1996
vs.
History of AI - Success 9
I could feel human-level intelligence across the room
-Gary Kasparov, World Chess Champion (human)
In a few years, even a single victory
in a long series of games would be the triumph of human genius.
Physics:
Where did the physical universe come from?
And what laws guide its dynamics?
Biology:
How did biological life evolve?
And how do living organism function?
AI: What is the nature of intelligent thought?
What is intelligence? 13
Data Economy
Refers to how much data has grown over the past few years and how
much more it can grow in the coming year
Data economy 18
Definition of AI 19
AI in Practice 20
AI in Practice 21
Think
Think humanly
Rationally
Acting Acting
humanly Rationally
Rationality
Doing the right thing given what it knows.
A rationalist approach involves a combination of mathematics and engineering
What is artificial intelligence? 29
Abstract A concrete
mathematical implementation,
description running within
some physical
system
Example – Vacuum Cleaner 34
What is the right way to fill a table? Agent Good or Bad? Intelligent or stupid?
Good behavior: the concept of rationality 35
“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.”
Good behavior: the concept of rationality 37
Task environments
For vaccum cleaner example, we have to specify
Nature of environment 39
Task environments
For vaccum cleaner example, we have to specify
Deterministic vs Stochastic
Episodic vs Sequential
Static vs Dynamic
Discrete vs Continuous
Known vs Unknown
Agent Program 42
Takes the current percept as input from the sensors and return an action to the
actuators
Types of Agent Programs
Simple Reflex agents
Model-based agents
Goal-based agents
Utility-based agents
Learning Agents
Learning agents 43
What is a State? 44
Input:
– Set of states
– Operators [and costs]
– Start state
– Goal state [test
Output:
• Path: start ⟹ a state satisfying goal test
• [May require shortest path]
Why is search interesting? 48
Examples:
• Path planning
• Games
• Natural Language Processing
• Machine learning
• ….
Example: The 8-puzzle 49
• states?
• actions?
• goal test?
• path cost?
Example: The 8-puzzle 50
• Input:
– Set of states
– Operators [and costs]
– Start state
– Goal state (test)
• Output
Implementation: states vs. nodes 55
The Expand function creates new nodes, filling in the various fields and using
the SuccessorFn of the problem to create the corresponding states.
Search Criterion 56
Root node is expanded first and then successors of the root node are expanded
next and so on
All nodes are expanded on a given depth and then next successors are expanded
Breadth-First Search (BFS) 59
Completeness?
Optimal?
Time Complexity?
Space Complexity?
Breadth-First Search (BFS) 60
Completeness - YES
Optimal – Not necessarily, but yes if the cost of the action is same
Time Complexity – O(b^d)
Space Complexity – O(b^d)
Depth-First Search (BFS) 61
Always expands the deepest node in the current frontier of the search tree
Depth-First Search (BFS) 62
Completeness?
Optimal?
Time Complexity?
Space Complexity?
Depth-First Search (BFS) 63
Completeness - NO
Optimal - NO 156 kilobytes
Time Complexity – O(b^m)
Space Complexity – O(bm)
Uniform Cost Search 64
Completeness?
Optimal?
Time Complexity?
Space Complexity?
Uniform Cost Search 65
Completeness – Yes or No
Optimal - Yes
Time Complexity
Space Complexity
Uninformed Search - Comparison 66
Uninformed Search 67
Uninformed Search 68
Not efficient
Not satisfying
Not guided towards the goal
Informed Search
Informed Search
Informed Search 69
Additional information?
Heuristic function?
Informed Search 72
Guess of the cost from the node n to the closest goal (how far is
h(n) the goal from us)
Greedy best-first
If my search algorithm uses f(n) = h(n)
search
Greedy Best-First Search 73
74
Greedy Best-First Search 75
Completeness –
Optimality –
Time Complexity -
Space Complexity -
Greedy Best-First Search 76
Completeness – No
Optimality – No
Time Complexity – O(b^m)
Space Complexity - O(b^m)
A* Search 77
Admissible heuristics: A heuristic function is admissible if for every node n, h(n) <=
h*(n), where h*(n) is the true cost to reach the goal state from n
An admissible heuristic is optimistic
Theorem: If h(n) is admissible, A* using tree search is optimal
A* Search 82
Completeness : Yes
Time? Exponential (worst case all nodes are added)
Space? Keeps all nodes in memory
Optimal? Yes