0% found this document useful (0 votes)
26 views42 pages

AI 4th Problem Solving Complete

Uploaded by

testingpoint259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views42 pages

AI 4th Problem Solving Complete

Uploaded by

testingpoint259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 42

• The development of full artificial intelligence

could spell the end of the human race…. It


would take off on its own, and re-design
itself at an ever increasing rate. Humans, who
are limited by slow biological evolution,
couldn’t compete, and would be superseded.
• — Stephen Hawking told the BBC
Previous Lecture
• 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
light in a dark room.
• combinational lock of a briefcase.
Common Thing
• similar approach to solve the problem at hand.
• Technically called this hit and trial approach
the “Generate and Test” approach.
Generate and Test
• Technical name
• different combinations to solve problem
• correct solution and incorrect solutions.
Generate and Test
Problem Representation
• Trivial in nature
• Natural representation
Example
Components of Problem Solving
• Problem Statement
• Goal State
• Solution Space
• Operators.
Problem Statement
• essential component
• “infinite amount of time
Problem Solution
• ultimate aim.
• output of our procedure
• Goal State
Solution space
• The set of the start state, the goal state and all
the intermediate states constitutes something
which is called a solution space.
Traveling in the solution space
• The traveling inside a solution space requires
something called as “operators”.
• sequence of operators is actually the solution
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
• “Robots are not going to replace humans,
they are going to make their jobs much more
humane. Difficult, demeaning, demanding ,
dangerous, dull – these are the jobs robots
will be taking.
– Sabine hauert Co-founder of Robohub.org
Previous Lecture
• We saw generate and test example
• We generate some solution without any
planning
• Problem space /solution space
Two – One Problem
Start Goal
1 1?22 2 2?11

Legal Moves:
Rules: • Slide
• 1s’ move right
• 2s’ move left
• Only one move at a time • Hop
• No backing up
Two – One Problem
Trials to solve the problem

Trial One Trial Two

1 1?22 1 1?22

1 12?2 1 ?122

1 ?212 ? 1122

1 2?12 Stuck!!!

1 221?

1 22?1

Stuck!!!
Two – One Problem
Five States
Two – One Problem
Solution Space
H H
? 1122 11 ? 22 1122 ?
S S

1?122 112 ? 2
S H H S

?1122 121 ?2 1 ? 212 1122 ?


S S S S

1212 ? 12 ? 12 ? 1212
H
H H H

12 ? 21 ? 2112 1221 ? 21 ? 12
S H S S H S

122 ? 1 ? 2121 2 ?112 1 2 2 ?1 2112 ? 2? 112


S
S

2? 121 212 ? 1
H H

221 ? 1 2? 211
S S

22 ? 11
• Informed way for problem solving
• Systematic approach (initial state, goal state,
intermediate states , dead ends, limitations,
Representation of problem
• Graph,
• Tree
• Powerful representation
• Roadmap example
Searching
• Huge component of AI.
• We check all possibilities of problem
• Tree and graph terminology
• Root node
• Ancestor
• Descendent
• Nodes represent different states
• Edges represent the operator
• Without exploring child node that node will be
open node.
• Closed node
• Directed graph
• Undirected graph
• Blocks example
• Map example
• Tree conversion
Solution to Problem Solving : Searching
H H
? 1122 11 ? 22 1122 ?
S S
Airport
1 ? 122 112 ? 2

S H H S
?1122 121 ? 2 1 ? 212 1122 ?
Q1 Q2
S S S S
1212 ? 12 ? 12 ? 1212
H H H H
12 ? 21 ? 2112 1221 ? 21 ? 12 Q4
Q3
Q5
S H S S H S
122 ? 1 ? 2121 2 ? 112 122 ? 1 2112 ? 2 ? 112

S S Hotel

2 ? 121 212 ? 1

Farmer
H H
Grain Goose 221 ? 1 2 ? 211
Grain

S S
Farmer
Fox Fox 22 ? 11
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

•“A” is the “root node”


I J
•“A, B, C …. J” are “nodes”
•“B” is a “child” of “A”
•“A” is ancestor of “D”
•“D” is a descendant of “A”
•“D, E, F, G, I, J” are “leaf nodes”
•Arrows represent “edges” or “links”
Examples of Graphs
Problem Formulation using
Graphs
• The search methods we’ll be dealing with are
defined on trees and graphs

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

Institute of Computing, Bahauddin Zakariya


University, Multan.
Production rules for the 3 x 3 knight problem
Bridges of KÖnigsberg Problem

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

You might also like