Professional Documents
Culture Documents
AI Lecture 4
AI Lecture 4
AI Lecture 4
Definitions
History
Three Phases (initial, Learning, Discovery)
Searching
Robotics
Problem Solving
Historically people viewed the phenomena of
intelligence as strongly related to problem
solving
Classical Approach
Simple
hit and trial method
Examples of Classical Approach
Consider maze searching problem
Consider that a toddler is to switch on the
to problem.
Categories of Problem
Structured ( Straight Forward, Farmer goose
problem, Maximum Number Finding)
ILL Structured ( Not Straight Forward, Limited
Characteristics,
Approaches to Solve Problem
Solution Focused
Problem Focused
Satisfying terminology
Graphical Representation of Problem
Initial State
Goal State
Intermediate State ( Should Be Linked)
Combination of all solution space
Previous Lecture
We saw generate and test example
We generate some solution without any
planning
Problem space /solution space
Two – One Problem
Start Goal
11 ? 2 2 22 ? 1 1
Legal Moves:
Rules: • Slide
• 1s’ move right
• 2s’ move left
• Only one move at a • Hop
time
• No backing up
Two – One Problem
Trials to solve the problem
11 ? 2 2 11 ? 2 2
11 2 ? 2 1? 1 2 2
1? 2 1 2 ?1 1 2 2
12 ? 1 2 Stuck!!!
12 2 1 ?
12 2 ? 1
Stuck!!!
Two – One Problem
Five States
Two – One Problem
Solution Space
H H
?1 1 2 2 1 1?2 2 1122 ?
S S
1 ?1 2 2 1 1 2? 2
S H H S
1212 ? 1 2 ?1 2 ?1 2 1 2
H
H H H
1 2?2 1 ?2 1 1 2 1 2 2 1? 2 1?1 2
S H S S H S
1 2 2? 1 ?2 1 2 1 2 ?1 1 2 1 2 2 ?1 2112 ? 2 ?1 1 2
S
S
2 ?1 2 1 212 ?1
H H
2 2 1? 1 2 ?2 1 1
S S
2 2?1 1
Informed way for problem solving
Systematic approach (initial state, goal state,
S H H S
?1122 121 ? 2 1 ?212 1122 ?
Q1 Q2
S S S S
1212 ? 12 ? 12 ?1 2 1 2
H H H H
12 ?21 ?2 1 1 2 1221 ? 21 ? 12 Q4
Q3
Q5
S H S S H S
122 ? 1 ?2 1 2 1 2 ?1 1 2 122 ? 1 2112 ? 2 ?112
S S Hotel
2 ?121 212 ? 1
Farmer
H H
Grain Goose 221 ? 1 2 ?211
Grain
S S
22 ? 11
Farmer
Fox Fox
Goose
Farmer
Farmer
Fox Fox Farmer
Fox Goose
Goose Grain Goose
Grain
Grain
Farmer
Farmer
Farmer Fox Fox
Goose Fox
Goose Grain Goose
Grain
Grain
Farmer
Fox Fox
Goose
Farmer
Goose Grain
Grain
Tree and Graph Terminology
B C
D E F G H
3 3
A B C
2
4
S G
4
3 2
D E F
1 3
Tree Search
Graph search is really tree search
3 3
A B C A D
2
B D A E
4
S
G C E E B B F
3 2 D F B F C E A C G
D E F
1 3
G C G F
G
The 8-puzzle as a production system
Production System: Knight Tour
connect(i1,i2,b1) connect(i2,i1,b1)
connect(rb1,i1,b2) connect(i1,rb1,b2)
onnect(rb1,i1,b3) onnect(i1,rb1,b3)
connect(rb1,i2,b4) connect(i2,rb1,b4)
connect(rb2,i1,b5) connect(i1,rb2,b5)
connect(rb2,i1,b6) connect(i1,rb2,b6)
connect(rb2,i2,b7) connect(i2,rb2,b7)
Institute of Computing
Block World
on(c,a).
on(b,d).
ontable(a).
ontable(d).
clear(b).
clear(c).
hand_empty.
Institute of Computing
Types of search
Blind or uninformed search (no knowledge
about place)
Base on guess
Another name brute