Unit 1 AI Chapter1 SAV 2022
Unit 1 AI Chapter1 SAV 2022
Unit 1 AI Chapter1 SAV 2022
1
outline
• What is AI?
• The foundations of AI
• A brief history of AI
• The state of the art
• Introductory problems
2
What is AI?
3
What is AI?
4
Intelligence Vs Artificial Intelligence
1. Natural 1. Programmed by human
2. Increase with experience being
and also hereditary. 2. Nothing called hereditary
3. Highly refined and no but systems do learn from
electricity from outside is experience.
required to generate 3. It is in computer system and
output. Rather knowledge we need electrical energy
is good for intelligence. to get output. knowledge
base is required to generate
4. No one is an expert. we output
can always get better 4. Experts systems are made
solution from another which have the capability of
human being. many individual person’s
5. Intelligence increase by experiences and ideas.
supervised and 5. We can increase AI
unsupervised learning. capabilities by other means
AI-Class
• Strong AI • Weak AI
Machines that act Machines can be made
intelligently have to act as if they were
real, conscious intelligent.
minds. “Helping” is called
“Doing is called strong weak AI
AI” Solve problem in
Thinking level at least limited domain
equal to humans.
What is AI?
7
Acting Humanly: The Turing Test
Human
AI
Interrogator
System
8
Acting Humanly: The Turing Test
9
Thinking Humanly: Cognitive Modelling
10
Thinking Rationally: Laws of Thought
• Obstacles:
Informal knowledge representation.
Computational complexity and resources.
11
Acting Rationally
• Advantages:
More general than the “laws of thought”
approach.
More amenable to scientific development than human-
based approaches.
12
Task Domains of AI
• Mundane Tasks:
– Perception
• Vision
• Speech
– Natural Languages
• Understanding
• Generation
• Translation
– Common sense reasoning
– Robot Control
• Formal Tasks
– Games : chess, checkers etc
– Mathematics: Geometry, logic,Proving properties of programs
• Expert Tasks:
– Engineering ( Design, Fault finding, Manufacturing planning)
– Scientific Analysis
– Medical Diagnosis
– Financial Analysis
13
AI Technique
• Intelligence requires Knowledge
• Knowledge posesses less desirable properties such as:
– Voluminous
– Hard to characterize accurately
– Constantly changing
– Differs from data that can be used
• AI technique is a method that exploits knowledge that
should be represented in such a way that:
– Knowledge captures generalization
– It can be understood by people who provide it
– It can be easily modified to correct errors.
– It can be used in variety of situations
14
The State of the Art
16
Introductory Problem: Tic-Tac-Toe
X X
o
17
Introductory Problem: Tic-Tac-Toe
Program 1:
Data Structures:
• Board: 9 element vector representing the board, with 1-9 for
each square. An element contains the value 0 if it is blank, 1
if it is filled by X, or 2 if it is filled with a O
• Movetable: A large vector of 19,683 elements ( 3^9), each
element is 9-element vector.
Algorithm:
1. View the vector as a ternary number (base 3). Convert it to a
decimal number.
2. Use the computed number as an index into Move-Table and
access the vector stored there.
3. Set the new board to that vector.
18
Introductory Problem: Tic-Tac-Toe
Comments:
This program is very efficient in time.
1 2 3
4 5 6
7 8 9
20
Introductory Problem: Tic-Tac-Toe
Program 2:
Data Structure: A nine element vector representing the board. But
instead of using 0,1 and 2 in each element, we store 2 for blank,
3 for X and 5 for O
Turn: An integer indicating which move of the game is about to be
played; 1 indicates the first move and 9 indicates the last move.
Algorithm: three sub procedures.
Make2: returns 5 if the centre square is blank. Else any non corner
blank sq. (2,4,6,8)
Posswin(p): Returns 0 if the player p cannot win on his next move;
otherwise it returns the number of the square that constitutes a
winning move. If the product is 18 (3x3x2), then X can win. If the
product is 50 ( 5x5x2) then O can win.
Go(n): Makes a move in the square n
Strategy:
Turn = 1 Go(1)
Turn = 2 If Board[5] is blank, Go(5), else Go(1)
Turn = 3 If Board[9] is blank, Go(9), else Go(3)
Turn = 4 If Posswin(X) 0, then Go(Posswin(X)) else Go( Make 2)
Turn =5 If Passwin(O) 0, then Go(Posswin(O)) else If Posswin(X)
0, then Go(Posswin(X)) else Go( Make 2).............
21
Introductory Problem: Tic-Tac-Toe
Comments:
3. Hard to generalize.
22
Introductory Problem: Tic-Tac-
Toe
Program 3:
8 3 4
1 5 9
6 7 2
15 (8 +
5) 23
Introductory Problem: Tic-Tac-Toe
Comments:
24
Introductory Problem: Question
Answering
“Mary went shopping for a new coat. She found a red
one she really liked. When she got it home, she
discovered that it went perfectly with her favourite
dress”.
25
Introductory Problem: Question
Answering
Program 1:
Z = a new coat
26
Introductory Problem: Question
Answering
Program 2:
Structured representation of sentences:
Event2: Thing1:
instance: Finding instance: Coat
tense: Past colour: Red
agent: Mary
object: Thing 1
27
Introductory Problem: Question
Answering
Event2: Thing1:
instance: Liking instance: Coat
tense: Past colour: Red
modifier:Much
object: Thing 1
28
Introductory Problem: Question
Answering
Program 3:
Background world knowledge:
Shopping Script
For example:
M: Coat
M`: Red Coat 29
30
31