0% found this document useful (0 votes)
9 views

intro AI - Part A

The document provides an introduction to Artificial Intelligence (AI) and Machine Learning (ML), covering their definitions, history, and the philosophical questions surrounding them. It discusses the evolution of AI from its inception in the 1950s to its current applications, including notable successes and challenges faced during periods of stagnation. Additionally, it explores the relationship between AI, ML, and Data Science, emphasizing the importance of rational agents and search strategies in AI problem-solving.

Uploaded by

vash27221
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

intro AI - Part A

The document provides an introduction to Artificial Intelligence (AI) and Machine Learning (ML), covering their definitions, history, and the philosophical questions surrounding them. It discusses the evolution of AI from its inception in the 1950s to its current applications, including notable successes and challenges faced during periods of stagnation. Additionally, it explores the relationship between AI, ML, and Data Science, emphasizing the importance of rational agents and search strategies in AI problem-solving.

Uploaded by

vash27221
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

1

Introduction to
AI and ML

 Instructors:
 Dr. Nishant Gupta & Dr. Manoj Kumar
Introduction 2

 A brief intro to the philosophy of AI


 General Computer Scientists
 General tools to aid in attacking a new problem
 Serious AI enthusiast
 A primer from which to launch advanced study
Introduction 3

 Problem in AI
 Theory
 Modelling
 Algorithms
 Applications
History of AI 4

 1946: ENIAC heralds the dawn of computing


 1950: Turing asks the question:

I propose to consider the question: “Can


machines think?”
--Alan Turing, 1950
Definitions 5

 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

 1956: A new field is born


• We propose that a 2 month, 10 man study of artificial intelligence be carried out during
the summer of 1956 at Dartmouth College in Hanover, New Hampshire.
 – Dartmouth AI Project Proposal; J. McCarthy et al.; Aug. 31, 1955.

 AI born at Dartmouth College Wrkshop


 1964: Eliza – the chatbot psychotherapist
 1966: Shakey– general purpose mobile robot
History of AI - Downfall 7

 1974 – 1980: Winter #1


 Failure of machine translation
 Negative results in Neural nets
 Poor speech understanding
 1987 – 1993: Winter #2
 Decline of LISP
 Decline of specialized hardware for expert systems
 Lasting effects–
 [Economist07] “Artificial Intelligence is associated with systems that have
all too often failed to live up to their promises.”
 [Pittsburgh BT06] “Some believe the word 'robotics' actually carries a
stigma that hurts a company's chances at funding.”
History of AI - Success 8

 1996: EQP proves that Robbin’s Algebras are all Boolean

[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

 1997: Deep Blue ends Human Supremacy in Chess

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.

Does Deep Blue use AI?


Saying Deep Blue doesn’t really
think about chess is like saying an
airplane doesn’t really fly because
it doesn’t flap its wings.
“If it works, its not AI!”
– Drew McDermott
History of AI - Success 10

 For two days in May, 1999, an AI Program called Remote Agent


autonomously ran Deep Space 1 (some 60,000,000 miles from earth)
 2005: Car drives themselves
 Stanley and three other cars drive themselves over a 132 mile mountain
road
 2011: IBM’s Watson – beats Ken Jennings
 2016: Alpha Go
Growth of AI 11
Science of AI 12

 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

 Dictionary.com: capacity for learning, reasoning, understanding,


and similar forms of mental activity
 Ability to perceive and act in the world
 Reasoning: proving theorems, medical diagnosis
 Planning: take decisions
 Learning and Adaptation: recommend movies, learn traffic patterns
 Understanding: text, speech, visual scene
Intelligence vs humans 14

 Are humans intelligent?


 replicating human behavior early hallmark of
intelligence
 Are humans always intelligent?
 Can non-human behavior be intelligent
 In the long run intelligence is more than what just
humans do

 Mixed- initiative system


What is artificial intelligence? 15

 A brief intro to the philosophy of AI


 General Computer Scientists
What is artificial intelligence? 16
What has changed? 17

 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

 A brief intro to the philosophy of AI


 General Computer Scientists
AI in Practice 22
AI in Practice 23
AI in Practice 24
Relationship between AI, ML & DS 25

 AI replicates human intelligence and ability to act rationally


 ML enables machine to learn and improve them from experiences without being
reprogrammed
 DS – data analyst, data mining
Relationship between AI, ML & DS 26
Definition of Artificial Intelligence? 27

 A brief intro to the philosophy of AI


 General Computer Scientists
What is artificial intelligence? 28
Ideal performance
measure

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

 For a machine to be intelligent (acting humanly), the machine need to possess


the following capabilities
 Natural language processing
 Knowledge representation
 Automated reasoning
 Machine Learning

 Thinking rationally is the “laws of thought” approach - Logic


Acting Rationally: The rational agent approach
30

 Agent is something that acts and are expected to do


 Operate autonomously
 Perceive the environment
 Adapt to change
 Create and pursue goals
 A rational agent is the one that acts, so as to achieve the “best outcome”
Acting Rationally: The rational agent approach
31

 Two main advantages


 It is more general than the “laws of thought” approach because correct
inference is just one of several possible mechanism for achieving
rationality
 It is more amendable to scientific developments than are approaches
based on human behavior or human thought

General principles of Rational agents and on


components for constructing them
Agent 32

 Human Agent, A robotic agent, software agent


 Percept and Percept sequence
 Mathematically, an agent’s behavior is described by the agent function that maps any
given percepts sequence to an action
Agent 33

 Agent function for an artificial agent will be implemented by agent program

Agent function Agent Program

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

 A rational agent is the one that does the right thing


 What it means to do the right thing?

 If the sequence is desirable than the agent has performed well


 The notion of desirability is captured by a performance measure that evaluates any
given sequence of environment states

 Example of Performance Measure - Reward


Good behavior: the concept of rationality 36

 What is rational at any given instant 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

Definition of 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.”
Good behavior: the concept of rationality 37

 Key features of rational agent


 Learning
 Information gathering
 Autonomy
Nature of environment 38

 Task environments
 For vaccum cleaner example, we have to specify
Nature of environment 39

 Task environments
 For vaccum cleaner example, we have to specify

 Automated Taxi driver


Task Environments 40

 Fully observable vs Partially Observable

Use of sensors, no need for


Parts of the states are simply
internal state to keep track of
missing from the sensors data
the environment

 Deterministic vs Stochastic

If the state of the environment is completely


determined by the current state
Task Environments 41

 Episodic vs Sequential

Agent performs a certain action and the next


action does not depends on the previous

 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

 • All information about the environment

 • All information necessary to make a decision for the task at hand.


Agent’s Knowledge Representation 45
Illustration with Vacuum World 46
Atomic Agent 47

 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

 Many (all?) AI problems can be formulated as


search problems!

 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

• states? locations of tiles


• actions? move blank left, right, up, down
• goal test? = goal state (given)
• path cost? 1 per move

• [Note: optimal solution of n-Puzzle family is NP-hard]


Search Tree Example: Fragment of 51

8-Puzzle Problem Space


Example: robotic assembly 52

• states? : real-valued coordinates of robot joint angles parts of the object to be


assembled
• actions? : continuous motions of robot joints
• goal test? : complete assembly
• path cost? : time to execute
Example: Romania 53
• On holiday in Romania; currently in Arad.
• Flight leaves tomorrow from Bucharest

• Formulate goal:
➢ be in Bucharest

• Formulate problem:
➢ states: various cities

➢ actions: drive between cities



• Find solution:
➢ – sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest

Example: N Queens 54

• Input:
 – Set of states
 – Operators [and costs]
 – Start state
 – Goal state (test)

• Output
Implementation: states vs. nodes 55

 A state is a (representation of) a physical configuration


 A node is a data structure constituting part of a search tree includes state,
parent node, action, path cost g(x), depth

 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

 We can evaluate an algorithm’s performance in four ways


 Completeness: Is an algorithm guarantee to find a solution where the solution exists?
 Optimality: Does the strategy find the optimal solution?
 Time Complexity: How long does it take to find a solution?
 Space Complexity: How much memory is needed to perform the search?
 In AI, the complexity is expressed in terms of
 b – branching factor of the search tree or maximum number of successors of each node
 d – depth of the shallowest goal node
 m – maximum length of any path in a state space
Uninformed Searches 57

 Use only the information available in the problem


definitions
 Breadth-first search (BFS)

 Depth-first search (DFS)

 Uniform Cost Search


Breadth-First Search (BFS) 58

 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

 Expand the cheapest node first


 Optimal with any step cost

 Completeness?
 Optimal?
 Time Complexity?
 Space Complexity?
Uniform Cost Search 65

 Expand the cheapest node first


 Optimal with any step cost

 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

 Add some Intuitions


 Heuristic Searches – Intuition-based searches
 What is different from the Uninformed search?
 Information - Evaluation function
Informed Search 70

 General approach is Best first search


 A node is selected for expansion based on the evaluation function f(n) – A
node with the lowest evaluation is expanded first
 Always chooses the node from frontier that has lowest f value
 Idea: Use f(n) for each node
 Estimate of “desirability”
 Expand most desirable unexpanded node
Informed Search 71

 Additional information?
 Heuristic function?
Informed Search 72

 Additional information - how far is my city from the goal?


 Heuristic function – my straight-line distance to the Bucharest

Evaluation function that best first search uses which node to


f(n) expand (best node over all cumulatively)

g(n) Cost from the start state to the node n

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

 Minimizing the total estimated solution cost


 Idea: Avoid expanding path that are already too expensive

 A* is both complete and optimal


 Implementation of A* algorithm is identical to Uniform cost search except that A*
uses g + h instead of g
78
79
80
A* Search 81

 Condition for Optimality:


 Admissibility – Tree Search Version
 Consistency (called monotonicity) – Graph Search Version

 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

 Consistency: A heuristic is consistent if


 For every node n
 For every successor n’ that has some action a
 h(n) <= c(n,a,n’) + h(n’)

 Every consistent heuristic is also admissible


 Theorem: If h(n) is consistent, A* using Graph search is optimal
A* Search 83

 Completeness : Yes
 Time? Exponential (worst case all nodes are added)
 Space? Keeps all nodes in memory
 Optimal? Yes

You might also like