SlideShare a Scribd company logo
1 of 62
Uninformed Search Strategies
CSI 341 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Search >> 8-puzzle
Let’s consider 8-puzzle game.
2
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Initial State Goal State
(Game Over)
how?
Search >> 8-puzzle
Search >> The process of looking for a sequence
of actions that reaches the goal state is called
search.
Search algorithm >> It takes input a problem,
constructs the search tree and returns a solution
in the form of an action sequence.
State space graph >>
- nodes = different states
- edges = different actions
Search tree >>
- root = initial state
- nodes = states of state space graph
- branches = actions
3
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Search >> 8-puzzle
Step cost >> The cost related to action a to go
from state s to state s’
Path cost >> The sum of all step costs of the
individual actions along the path.
Solution >> It is an action sequence(path of
search tree) that leads from the initial state to a
goal state.
Optimal solution >> The solution that has the
lowest path cost among all the solutions.
4
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Search >> 8-puzzle
5
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
How to build up this
search tree?
&
How to find the solution?
TreeSearch( ) =
Search Algorithm >> Tree Search
6
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S
B
D
G B
S
S
D
G S G
Problems
Loopy path: S -> B -> S …
and S -> D -> S …
Redundant path: S -> B -> G
and S -> D -> G
GraphSearch( ) =
Search Algorithm >> Graph Search
7
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S
B
D
G B
S
D
G
Here the search tree contains at
most 1 copy of each state by
tracking the already visited nodes
from explored set.
So minimizes redundant paths.
Performance Measure >> Search Algorithm
The performance of specific search algorithms is evaluated in the following 4 ways:
▸Completeness: Is the algorithm guaranteed to find a solution when there is one?
▸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?
Time and space complexities are expressed in terms of :
▸b = branching factor, maximum no of successors of any node.
▸d = the depth of the shallowest goal node.
▸m = the maximum length of any path in the state space.
Time complexity >> It is often measured in terms of the number of nodes generated during the search.
Space complexity >> It is measured in terms of maximum number of nodes stored in memory.
8
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Search Strategy
Search Strategy >> The process of expanding nodes until either a solution is found or there are no more states to expand.
Uninformed/Blind Search Strategy >>
- This strategy has no additional information about the states beyond in the problem definition.
- All they can do is generate successors and distinguish a goal state from non-goal state.
Informed/Heuristic Search Strategy >>
- This strategy uses problem-specific knowledge beyond the definition of the problem itself.
- It can find solutions more efficiently than can an uninformed strategy.
- This strategy knows whether one non-goal state is more promising than another.
9
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Uninformed Search Strategy
Different types of uninformed search strategies are:
▸Breadth-first search (BFS)
▸Uniform-cost search (UCS)
▸Depth-first search (DFS)
▸Depth-limited search (DLS)
▸Iterative deepening depth-first search (ID DFS)
▸Bidirectional search
10
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
1. Breadth-first search
▸BFS is a simple strategy in which the root node is expanded first,
then all the successors of the root node are expanded next,
then their successors,
and so on.
▸Here the shallowest unexpanded node is chosen for expansion.
▸Frontier >> The set of all nodes(leaf nodes) available for expansion at any given point is called the frontier.
▸BFS uses a FIFO queue for the frontier, thus new nodes go to the back of the queue and old nodes which are shallower
than the new nodes get expanded first.
11
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
1. Breadth-first search >> Algorithm [Graph Search]
12
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
1. Breadth-first search >> How it searches!
13
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
1. Breadth-first search >> Example
14
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
State Space : S = initial state, G =goal state, other nodes = intermediate states and links = legal transitions.
S G
A B
D E
C
F
1. Breadth-first search >> Example
15
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
S
Before :
Frontier = { }
Explored = { }
Process:
Node = initial state = S
Final:
Goal(Node) = False
Frontier = { S }
Explored = { }
1. Breadth-first search >> Example
16
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { S }
Explored = { }
Process:
Node = Pop(Frontier) = S
Child = Expand S = { A, D }
Final:
Goal(Child) = False
Frontier = { A, D }
Explored = { S }
S
A D
1. Breadth-first search >> Example
17
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { A, D }
Explored = { S }
Process:
Node = Pop(Frontier) = A
Child = Expand A = { B, S, D }
Final:
Goal(Child) = False
Frontier = { D, B }
Explored = { S, A }
S
A D
B
1. Breadth-first search >> Example
18
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { D, B }
Explored = { S, A }
Process:
Node = Pop(Frontier) = D
Child = Expand D = { E, S, A }
Final:
Goal(Child) = False
Frontier = { B, E }
Explored = { S, A, D }
S
A D
B E
1. Breadth-first search >> Example
19
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { B, E }
Explored = { S, A, D }
Process:
Node = Pop(Frontier) = B
Child = Expand B = { C, A, E }
Final:
Goal(Child) = False
Frontier = { E, C }
Explored = { S, A, D, B }
S
A D
B E
C
1. Breadth-first search >> Example
20
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { E, C }
Explored = { S, A, D, B }
Process:
Node = Pop(Frontier) = E
Child = Expand E = { F, D, B }
Final:
Goal(Child) = False
Frontier = { C, F }
Explored = { S, A, D, B, E }
S
A D
B E
C
F
1. Breadth-first search >> Example
21
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { C, F }
Explored = { S, A, D, B, E }
Process:
Node = Pop(Frontier) = C
Child = Expand C = { B }
Final:
Goal(Child) = False
Frontier = { F }
Explored = { S, A, D, B, E, C }
S
A D
B E
C
F
1. Breadth-first search >> Example
22
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { F }
Explored = { S, A, D, B, E, C }
Process:
Node = Pop(Frontier) = F
Child = Expand F = { G, E }
Final:
Goal(Child) = True
return
S
A D
B E
C
F
G
1. Breadth-first search >> Performance Measure
23
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Complete >> Yes if the branching factor b is finite.
Optimal >> Yes if step costs are all identical.
Time Complexity >>
- depth 1: nodes generated = b
- depth 2: nodes generated= b * b = b2
- depth 3: nodes generated = b2 * b = b3
… … …
- depth d: nodes generated = bd
So, Total number of nodes generated = b + b2 + b3 + … … … + bd-1 + bd = O(bd)
Space Complexity >> Total = O(bd)
b + b2 + b3 + … … … + bd-1 + bd
Explored set = O(bd-1)
Frontier set = O(bd)
What is time and space complexity
when the goal test is checked during
popping states from the frontier?
2. Uniform-cost search
24
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
▸Similar to BFS but gives optimal solution with any step-cost function.
▸It expands the node with the lowest path cost g(n)
▸It uses priority queue that sorts based on g(n) value
▸Here, goal test is applied to a node when it is selected for expansion rather than when it is first generated.
▸Also an extra checkpoint is added in case a better path is found to a node currently on the frontier.
2. Uniform-cost search >> Algorithm [Graph Search]
25
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
2. Uniform-cost search >> How it searches!
26
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
2. Uniform-cost search >> Example
27
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
State Space : S = initial state, G =goal state, other nodes = intermediate states, links = legal transitions, labels = step cost.
S
C
B
A
G
1 10
5 5
15
5
2. Uniform-cost search >> Example
28
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Before :
Frontier = { }
Explored = { }
Process:
Node = Initial State = S
Final:
Frontier = { (S,0,Nil) }
Explored = { }
S
2. Uniform-cost search >> Example
29
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Before :
Frontier = { (S,0, Nil) }
Explored = { }
Process:
Node = Pop(Frontier) = (S,0, Nil)
Goal(Node) = False
Child={ A, B, C }
Final:
Frontier = { (A,1,S), (B,5,S), (C,15,S) }
Explored = { (S,0,Nil) }
S
A
1
B
5
C
15
2. Uniform-cost search >> Example
30
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Before :
Frontier = { (A,1,S), (B,5,S), (C,15,S) }
Explored = { (S,0,Nil) }
Process:
Node = Pop(Frontier) = (A,1,S)
Goal(Node) = False
Child={ G, S }
Final:
Frontier = { (B,5,S), (G,11,A),(C,15,S) }
Explored = { (S,0,Nil), (A,1,S) }
S
A 1B
5
C
15
11
G
2. Uniform-cost search >> Example
31
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Before :
Frontier = { (B,5,S), (G,11,A), (C,15,S) }
Explored = { (S,0,Nil), (A,1,S) }
Process:
Node = Pop(Frontier) = (B,5,S)
Goal(Node) = False
Child={ G, S }
Final:
Frontier = { (G,10,B), (C,15,S) }
Explored = { (S,0,Nil), (A,1,S), (B,5,S) }
S
A 1B
5
C
15
10
G
2. Uniform-cost search >> Example
32
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Before :
Frontier = { (G,10,B), (C,15,S) }
Explored = { (S,0,Nil), (A,1,S), (B,5,S) }
Process:
Node = Pop(Frontier) = (G,10,B)
Goal(Node) = True
return
S
A 1B
5
C
15
10
G
2. Uniform-cost search >> Performance Measure
33
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Complete >> Yes if branching factor b is finite and step costs is >= some positive constant Ďľ
Optimal >> Yes
Time Complexity >>
-- Here Final depth = 1 + floor(C*/Ďľ) where C* = cost of the optimal solution
-- So Time Complexity = O(bdepth) = O(b1+floor(C*/Ďľ))
Space Complexity >> As we need to save all the nodes either in Explored/Frontier Set, So required space= O(b1+floor(C*/Ďľ))
3. Depth-first Search
34
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
▸Expand deepest unexpanded node.
▸DFS uses LIFO queue as Frontier.
▸LIFO queue means that the most recently generated node is chosen for expansion as this node must be the deepest
unexpanded node cause it is one deeper than its parent.
3. Depth-first Search >> Algorithm [Tree Search]
35
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
function DFS(problem) returns a solution, or failure
node  problem.INITIAL-STATE, PATH-COST = 0
frontier  a LIFO queue with node as the only element
loop do
if Empty?(frontier) then return failure
node  POP(frontier)
if problem.GOAL-STATE(node.STATE) then return SOLUTION(node)
for each action in problem.ACTIONS(node.STATE) do
child  CHILD-NODE(problem, node, action)
if child not in current-path do
frontier  INSERT(child, frontier)
[ Here, frontier works like a LIFO queue ]
3. Depth-first Search >> How it works!
36
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
3. Depth-first Search >> Example
37
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { S }
Process:
Node = Pop(Frontier) = S
Goal(Node) = False
Child = Expand S = { A, D }
Final:
Frontier = { A, D }
S
A D
3. Depth-first Search >> Example
38
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { A, D }
Process:
Node = Pop(Frontier) = A
Goal(Node) = False
Child = Expand A = { B, D, S }
Final:
Frontier = { B, D, D }
S
A D
B D
3. Depth-first Search >> Example
39
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { B, D, D }
Process:
Node = Pop(Frontier) = B
Goal(Node) = False
Child = Expand B = { C, E, A }
Final:
Frontier = { C, E, D, D }
S
A D
B D
EC
3. Depth-first Search >> Example
40
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { C, E, D, D }
Process:
Node = Pop(Frontier) = C
Goal(Node) = False
Child = Expand C = { B }
Final:
Frontier = { E, D, D }
S
A D
B D
EC
3. Depth-first Search >> Example
41
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { E, D, D }
Process:
Node = Pop(Frontier) = E
Goal(Node) = False
Child = Expand E = { D, F, B }
Final:
Frontier = { D, F, D, D }
S
A D
B D
EC
D F
3. Depth-first Search >> Example
42
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { D, F, D, D }
Process:
Node = Pop(Frontier) = D
Goal(Node) = False
Child = Expand D = { S, A, E }
Final:
Frontier = { F, D, D }
S
A D
B D
EC
D F
3. Depth-first Search >> Example
43
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { F, D, D }
Process:
Node = Pop(Frontier) = F
Goal(Node) = False
Child = Expand S = { G }
Final:
Frontier = { G, D, D }
S
A D
B D
EC
D F
G
3. Depth-first Search >> Example
44
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S G
A B
D E
C
F
Before :
Frontier = { G, D, D }
Process:
Node = Pop(Frontier) = G
Goal(Node) = True
S
A D
B D
EC
D F
G
3. Depth-first search >> Performance Measure
45
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Complete >> No
Optimal >> No
Time Complexity >>
- If maximum tree depth = m ; m>=d
- Then DFS will generate maximum O(bm) nodes
assuming 1 goal leaf at the RHS at depth d
Space Complexity >>
- At depth m we have b nodes
- and (b-1) nodes at earlier depths from depth 0 to m-1
- Total = b+(m-1)*(b-1) = O(bm) nodes
4. Depth-limited Search
46
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
▸It solves the infinite-path problem by providing a depth limit = l
▸If l < d then this problem will be incomplete
▸If l >d then this problem solution will be non-optimal
▸Depth-limit can be selected based on problem knowledge, but typically not known ahead of time in practice
▸This search algorithm returns two kinds of failures:
- standard failure indicates no solution
- cutoff indicates no solution within that depth limit
4. Depth-limited Search >> Algorithm [Tree Search]
47
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
function DLS(problem) returns a solution, or failure
node  problem.Initial-state, Path-cost=0
frontier  a LIFO queue with node as the only element
limit= l
loop do
if Empty?(frontier) then return failure
node  Pop(frontier)
if problem.Goal-state(node.State) then return Solution(node)
if depth == l then return cutoff
else expand the chosen node, adding the resulting nodes to the frontier if not in the path.
end loop
[ Here, frontier works like a LIFO queue ]
4. Depth-limited Search >> How it works!
48
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
4. Depth-limited search >> Performance Measure
49
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Complete >> No when depth limit < d
Optimal >> No when depth limit >= d
Time Complexity >>
- If maximum tree depth = l
- Then DLS will generate maximum O(bl) nodes
assuming 1 goal leaf at the RHS at depth d
Space Complexity >>
- At depth l we have b nodes
- and (b-1) nodes at earlier depths
- Total = b+(l-1)*(b-1) = O(bl) nodes
5. Iterative Deepening DFS Search
50
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
▸Run multiple DFS searches with increasing depth-limits
▸It combines the benefits of DFS and BFS
-- Like DFS it’s memory requirements are modest: O(bd)
-- Like BFS, it is complete when the branching factor is finite and optimal when the path cost is a non-decreasing
function of the depth of the node.
5. Iterative Deepening DFS Search >> How it works!
51
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
5. Iterative Deepening DFS Search >> Example
52
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
5. Iterative Deepening DFS Search >> Example
53
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
5. Iterative Deepening DFS Search >> Performance Measure
54
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Complete >> Yes if branching factor b is finite.
Optimal >> Yes if step costs are all identical
No if step costs are different.
Time Complexity >>
- Total no. of nodes=
b + (b+b2) + … … … + (b+b2+ … … + bd) = O(bd)
Space Complexity >>
- O(bd)
5. Iterative Deepening DFS Search >> When to use?
55
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
▸Isn’t IDS wasteful?
- Repeated searches on different iterations
- Compare IDS and BFS:
E.g., b = 10 and d = 5
N(IDS) ~ db + (d-1)b2 +… … + bd = 50+400+3000+20000+100000 = 123,450
N(BFS) = b + b2 +… … + bd = 10+100+1000+10000+100000 =111,110
- Difference is only about 10%
- Most of the time is spent at depth d, which is the same amount of time in both algorithms
▸In practice, IDS is the preferred uninformed search method with a large search space and unknown solution depth
Practice 1
56
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution
paths and path costs.
- BFS
- DFS
- IDS
- UCS
Previous Question
57
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution
paths and path costs.
- BFS
- DFS
- IDS
- UCS
Previous Question
58
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution
paths and path costs.
- BFS
- DFS
- IDS
- UCS
Previous Question
59
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution
paths and path costs.
- BFS
- DFS
- IDS
- UCS
Previous Question
60
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution
paths and path costs.
- BFS
- DFS
- IDS
- UCS
Previous Question
61
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution
paths and path costs.
- BFS
- DFS
- IDS
- UCS
62
THANKS!
Any questions?
You can find me at imam@cse.uiu.ac.bd

More Related Content

What's hot

AI 8 | Probability Basics, Bayes' Rule, Probability Distribution
AI 8 | Probability Basics, Bayes' Rule, Probability DistributionAI 8 | Probability Basics, Bayes' Rule, Probability Distribution
AI 8 | Probability Basics, Bayes' Rule, Probability DistributionMohammad Imam Hossain
 
5 csp
5 csp5 csp
5 cspMhd Sb
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAsst.prof M.Gokilavani
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp) Archana432045
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmvikas dhakane
 
Lecture 26 local beam search
Lecture 26 local beam searchLecture 26 local beam search
Lecture 26 local beam searchHema Kashyap
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of AlgorithmsSwapnil Agrawal
 
NP Complete Problems
NP Complete ProblemsNP Complete Problems
NP Complete ProblemsNikhil Joshi
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceSahil Kumar
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problemsJyotsna Suryadevara
 
A star algorithms
A star algorithmsA star algorithms
A star algorithmssandeep54552
 
implementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity pptimplementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity pptAntaraBhattacharya12
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesDr. C.V. Suresh Babu
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligencegrinu
 
search strategies in artificial intelligence
search strategies in artificial intelligencesearch strategies in artificial intelligence
search strategies in artificial intelligenceHanif Ullah (Gold Medalist)
 
Pumping lemma for regular set h1
Pumping lemma for regular set h1Pumping lemma for regular set h1
Pumping lemma for regular set h1Rajendran
 

What's hot (20)

AI 8 | Probability Basics, Bayes' Rule, Probability Distribution
AI 8 | Probability Basics, Bayes' Rule, Probability DistributionAI 8 | Probability Basics, Bayes' Rule, Probability Distribution
AI 8 | Probability Basics, Bayes' Rule, Probability Distribution
 
5 csp
5 csp5 csp
5 csp
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptx
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)
 
Adversarial search
Adversarial search Adversarial search
Adversarial search
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
 
Lecture 26 local beam search
Lecture 26 local beam searchLecture 26 local beam search
Lecture 26 local beam search
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
NP Complete Problems
NP Complete ProblemsNP Complete Problems
NP Complete Problems
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problems
 
A star algorithms
A star algorithmsA star algorithms
A star algorithms
 
implementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity pptimplementation of travelling salesman problem with complexity ppt
implementation of travelling salesman problem with complexity ppt
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 
A* algorithm
A* algorithmA* algorithm
A* algorithm
 
search strategies in artificial intelligence
search strategies in artificial intelligencesearch strategies in artificial intelligence
search strategies in artificial intelligence
 
Pumping lemma for regular set h1
Pumping lemma for regular set h1Pumping lemma for regular set h1
Pumping lemma for regular set h1
 

Similar to Uninformed Search Strategies for Solving Puzzles

RPT_AI_03_PartB_UNINFORMED_FINAL.pptx
RPT_AI_03_PartB_UNINFORMED_FINAL.pptxRPT_AI_03_PartB_UNINFORMED_FINAL.pptx
RPT_AI_03_PartB_UNINFORMED_FINAL.pptxRahulkumarTivarekar1
 
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.pptmmpnair0
 
uniformed (also called blind search algo)
uniformed (also called blind search algo)uniformed (also called blind search algo)
uniformed (also called blind search algo)ssuser2a76b5
 
AI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxAI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxYousef Aburawi
 
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxPPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxRaviKiranVarma4
 
Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Hema Kashyap
 
ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)SURBHI SAROHA
 
CptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial IntelligenceCptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial Intelligencebutest
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxAndrewKuziwakwasheMu
 

Similar to Uninformed Search Strategies for Solving Puzzles (13)

Search 1
Search 1Search 1
Search 1
 
RPT_AI_03_PartB_UNINFORMED_FINAL.pptx
RPT_AI_03_PartB_UNINFORMED_FINAL.pptxRPT_AI_03_PartB_UNINFORMED_FINAL.pptx
RPT_AI_03_PartB_UNINFORMED_FINAL.pptx
 
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
 
uniformed (also called blind search algo)
uniformed (also called blind search algo)uniformed (also called blind search algo)
uniformed (also called blind search algo)
 
Uninformed search
Uninformed searchUninformed search
Uninformed search
 
AI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxAI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptx
 
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxPPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
 
Searching
SearchingSearching
Searching
 
Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..
 
c4.pptx
c4.pptxc4.pptx
c4.pptx
 
ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)
 
CptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial IntelligenceCptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial Intelligence
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
 

More from Mohammad Imam Hossain

DS & Algo 6 - Offline Assignment 6
DS & Algo 6 - Offline Assignment 6DS & Algo 6 - Offline Assignment 6
DS & Algo 6 - Offline Assignment 6Mohammad Imam Hossain
 
DS & Algo 6 - Dynamic Programming
DS & Algo 6 - Dynamic ProgrammingDS & Algo 6 - Dynamic Programming
DS & Algo 6 - Dynamic ProgrammingMohammad Imam Hossain
 
DS & Algo 5 - Disjoint Set and MST
DS & Algo 5 - Disjoint Set and MSTDS & Algo 5 - Disjoint Set and MST
DS & Algo 5 - Disjoint Set and MSTMohammad Imam Hossain
 
DS & Algo 4 - Graph and Shortest Path Search
DS & Algo 4 - Graph and Shortest Path SearchDS & Algo 4 - Graph and Shortest Path Search
DS & Algo 4 - Graph and Shortest Path SearchMohammad Imam Hossain
 
DS & Algo 3 - Offline Assignment 3
DS & Algo 3 - Offline Assignment 3DS & Algo 3 - Offline Assignment 3
DS & Algo 3 - Offline Assignment 3Mohammad Imam Hossain
 
DS & Algo 3 - Divide and Conquer
DS & Algo 3 - Divide and ConquerDS & Algo 3 - Divide and Conquer
DS & Algo 3 - Divide and ConquerMohammad Imam Hossain
 
DS & Algo 2 - Offline Assignment 2
DS & Algo 2 - Offline Assignment 2DS & Algo 2 - Offline Assignment 2
DS & Algo 2 - Offline Assignment 2Mohammad Imam Hossain
 
DS & Algo 1 - Offline Assignment 1
DS & Algo 1 - Offline Assignment 1DS & Algo 1 - Offline Assignment 1
DS & Algo 1 - Offline Assignment 1Mohammad Imam Hossain
 
DS & Algo 1 - C++ and STL Introduction
DS & Algo 1 - C++ and STL IntroductionDS & Algo 1 - C++ and STL Introduction
DS & Algo 1 - C++ and STL IntroductionMohammad Imam Hossain
 
DBMS 10 | Database Transactions
DBMS 10 | Database TransactionsDBMS 10 | Database Transactions
DBMS 10 | Database TransactionsMohammad Imam Hossain
 
DBMS 3 | ER Diagram to Relational Schema
DBMS 3 | ER Diagram to Relational SchemaDBMS 3 | ER Diagram to Relational Schema
DBMS 3 | ER Diagram to Relational SchemaMohammad Imam Hossain
 
DBMS 2 | Entity Relationship Model
DBMS 2 | Entity Relationship ModelDBMS 2 | Entity Relationship Model
DBMS 2 | Entity Relationship ModelMohammad Imam Hossain
 
DBMS 7 | Relational Query Language
DBMS 7 | Relational Query LanguageDBMS 7 | Relational Query Language
DBMS 7 | Relational Query LanguageMohammad Imam Hossain
 
DBMS 4 | MySQL - DDL & DML Commands
DBMS 4 | MySQL - DDL & DML CommandsDBMS 4 | MySQL - DDL & DML Commands
DBMS 4 | MySQL - DDL & DML CommandsMohammad Imam Hossain
 
DBMS 5 | MySQL Practice List - HR Schema
DBMS 5 | MySQL Practice List - HR SchemaDBMS 5 | MySQL Practice List - HR Schema
DBMS 5 | MySQL Practice List - HR SchemaMohammad Imam Hossain
 
TOC 8 | Derivation, Parse Tree & Ambiguity Check
TOC 8 | Derivation, Parse Tree & Ambiguity CheckTOC 8 | Derivation, Parse Tree & Ambiguity Check
TOC 8 | Derivation, Parse Tree & Ambiguity CheckMohammad Imam Hossain
 

More from Mohammad Imam Hossain (20)

DS & Algo 6 - Offline Assignment 6
DS & Algo 6 - Offline Assignment 6DS & Algo 6 - Offline Assignment 6
DS & Algo 6 - Offline Assignment 6
 
DS & Algo 6 - Dynamic Programming
DS & Algo 6 - Dynamic ProgrammingDS & Algo 6 - Dynamic Programming
DS & Algo 6 - Dynamic Programming
 
DS & Algo 5 - Disjoint Set and MST
DS & Algo 5 - Disjoint Set and MSTDS & Algo 5 - Disjoint Set and MST
DS & Algo 5 - Disjoint Set and MST
 
DS & Algo 4 - Graph and Shortest Path Search
DS & Algo 4 - Graph and Shortest Path SearchDS & Algo 4 - Graph and Shortest Path Search
DS & Algo 4 - Graph and Shortest Path Search
 
DS & Algo 3 - Offline Assignment 3
DS & Algo 3 - Offline Assignment 3DS & Algo 3 - Offline Assignment 3
DS & Algo 3 - Offline Assignment 3
 
DS & Algo 3 - Divide and Conquer
DS & Algo 3 - Divide and ConquerDS & Algo 3 - Divide and Conquer
DS & Algo 3 - Divide and Conquer
 
DS & Algo 2 - Offline Assignment 2
DS & Algo 2 - Offline Assignment 2DS & Algo 2 - Offline Assignment 2
DS & Algo 2 - Offline Assignment 2
 
DS & Algo 2 - Recursion
DS & Algo 2 - RecursionDS & Algo 2 - Recursion
DS & Algo 2 - Recursion
 
DS & Algo 1 - Offline Assignment 1
DS & Algo 1 - Offline Assignment 1DS & Algo 1 - Offline Assignment 1
DS & Algo 1 - Offline Assignment 1
 
DS & Algo 1 - C++ and STL Introduction
DS & Algo 1 - C++ and STL IntroductionDS & Algo 1 - C++ and STL Introduction
DS & Algo 1 - C++ and STL Introduction
 
DBMS 1 | Introduction to DBMS
DBMS 1 | Introduction to DBMSDBMS 1 | Introduction to DBMS
DBMS 1 | Introduction to DBMS
 
DBMS 10 | Database Transactions
DBMS 10 | Database TransactionsDBMS 10 | Database Transactions
DBMS 10 | Database Transactions
 
DBMS 3 | ER Diagram to Relational Schema
DBMS 3 | ER Diagram to Relational SchemaDBMS 3 | ER Diagram to Relational Schema
DBMS 3 | ER Diagram to Relational Schema
 
DBMS 2 | Entity Relationship Model
DBMS 2 | Entity Relationship ModelDBMS 2 | Entity Relationship Model
DBMS 2 | Entity Relationship Model
 
DBMS 7 | Relational Query Language
DBMS 7 | Relational Query LanguageDBMS 7 | Relational Query Language
DBMS 7 | Relational Query Language
 
DBMS 4 | MySQL - DDL & DML Commands
DBMS 4 | MySQL - DDL & DML CommandsDBMS 4 | MySQL - DDL & DML Commands
DBMS 4 | MySQL - DDL & DML Commands
 
DBMS 5 | MySQL Practice List - HR Schema
DBMS 5 | MySQL Practice List - HR SchemaDBMS 5 | MySQL Practice List - HR Schema
DBMS 5 | MySQL Practice List - HR Schema
 
TOC 10 | Turing Machine
TOC 10 | Turing MachineTOC 10 | Turing Machine
TOC 10 | Turing Machine
 
TOC 9 | Pushdown Automata
TOC 9 | Pushdown AutomataTOC 9 | Pushdown Automata
TOC 9 | Pushdown Automata
 
TOC 8 | Derivation, Parse Tree & Ambiguity Check
TOC 8 | Derivation, Parse Tree & Ambiguity CheckTOC 8 | Derivation, Parse Tree & Ambiguity Check
TOC 8 | Derivation, Parse Tree & Ambiguity Check
 

Recently uploaded

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 

Recently uploaded (20)

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 

Uninformed Search Strategies for Solving Puzzles

  • 1. Uninformed Search Strategies CSI 341 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 2. Search >> 8-puzzle Let’s consider 8-puzzle game. 2 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Initial State Goal State (Game Over) how?
  • 3. Search >> 8-puzzle Search >> The process of looking for a sequence of actions that reaches the goal state is called search. Search algorithm >> It takes input a problem, constructs the search tree and returns a solution in the form of an action sequence. State space graph >> - nodes = different states - edges = different actions Search tree >> - root = initial state - nodes = states of state space graph - branches = actions 3 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 4. Search >> 8-puzzle Step cost >> The cost related to action a to go from state s to state s’ Path cost >> The sum of all step costs of the individual actions along the path. Solution >> It is an action sequence(path of search tree) that leads from the initial state to a goal state. Optimal solution >> The solution that has the lowest path cost among all the solutions. 4 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 5. Search >> 8-puzzle 5 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU How to build up this search tree? & How to find the solution?
  • 6. TreeSearch( ) = Search Algorithm >> Tree Search 6 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S B D G B S S D G S G Problems Loopy path: S -> B -> S … and S -> D -> S … Redundant path: S -> B -> G and S -> D -> G
  • 7. GraphSearch( ) = Search Algorithm >> Graph Search 7 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S B D G B S D G Here the search tree contains at most 1 copy of each state by tracking the already visited nodes from explored set. So minimizes redundant paths.
  • 8. Performance Measure >> Search Algorithm The performance of specific search algorithms is evaluated in the following 4 ways: ▸Completeness: Is the algorithm guaranteed to find a solution when there is one? ▸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? Time and space complexities are expressed in terms of : ▸b = branching factor, maximum no of successors of any node. ▸d = the depth of the shallowest goal node. ▸m = the maximum length of any path in the state space. Time complexity >> It is often measured in terms of the number of nodes generated during the search. Space complexity >> It is measured in terms of maximum number of nodes stored in memory. 8 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 9. Search Strategy Search Strategy >> The process of expanding nodes until either a solution is found or there are no more states to expand. Uninformed/Blind Search Strategy >> - This strategy has no additional information about the states beyond in the problem definition. - All they can do is generate successors and distinguish a goal state from non-goal state. Informed/Heuristic Search Strategy >> - This strategy uses problem-specific knowledge beyond the definition of the problem itself. - It can find solutions more efficiently than can an uninformed strategy. - This strategy knows whether one non-goal state is more promising than another. 9 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 10. Uninformed Search Strategy Different types of uninformed search strategies are: ▸Breadth-first search (BFS) ▸Uniform-cost search (UCS) ▸Depth-first search (DFS) ▸Depth-limited search (DLS) ▸Iterative deepening depth-first search (ID DFS) ▸Bidirectional search 10 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 11. 1. Breadth-first search ▸BFS is a simple strategy in which the root node is expanded first, then all the successors of the root node are expanded next, then their successors, and so on. ▸Here the shallowest unexpanded node is chosen for expansion. ▸Frontier >> The set of all nodes(leaf nodes) available for expansion at any given point is called the frontier. ▸BFS uses a FIFO queue for the frontier, thus new nodes go to the back of the queue and old nodes which are shallower than the new nodes get expanded first. 11 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 12. 1. Breadth-first search >> Algorithm [Graph Search] 12 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 13. 1. Breadth-first search >> How it searches! 13 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 14. 1. Breadth-first search >> Example 14 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU State Space : S = initial state, G =goal state, other nodes = intermediate states and links = legal transitions. S G A B D E C F
  • 15. 1. Breadth-first search >> Example 15 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F S Before : Frontier = { } Explored = { } Process: Node = initial state = S Final: Goal(Node) = False Frontier = { S } Explored = { }
  • 16. 1. Breadth-first search >> Example 16 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { S } Explored = { } Process: Node = Pop(Frontier) = S Child = Expand S = { A, D } Final: Goal(Child) = False Frontier = { A, D } Explored = { S } S A D
  • 17. 1. Breadth-first search >> Example 17 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { A, D } Explored = { S } Process: Node = Pop(Frontier) = A Child = Expand A = { B, S, D } Final: Goal(Child) = False Frontier = { D, B } Explored = { S, A } S A D B
  • 18. 1. Breadth-first search >> Example 18 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { D, B } Explored = { S, A } Process: Node = Pop(Frontier) = D Child = Expand D = { E, S, A } Final: Goal(Child) = False Frontier = { B, E } Explored = { S, A, D } S A D B E
  • 19. 1. Breadth-first search >> Example 19 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { B, E } Explored = { S, A, D } Process: Node = Pop(Frontier) = B Child = Expand B = { C, A, E } Final: Goal(Child) = False Frontier = { E, C } Explored = { S, A, D, B } S A D B E C
  • 20. 1. Breadth-first search >> Example 20 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { E, C } Explored = { S, A, D, B } Process: Node = Pop(Frontier) = E Child = Expand E = { F, D, B } Final: Goal(Child) = False Frontier = { C, F } Explored = { S, A, D, B, E } S A D B E C F
  • 21. 1. Breadth-first search >> Example 21 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { C, F } Explored = { S, A, D, B, E } Process: Node = Pop(Frontier) = C Child = Expand C = { B } Final: Goal(Child) = False Frontier = { F } Explored = { S, A, D, B, E, C } S A D B E C F
  • 22. 1. Breadth-first search >> Example 22 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { F } Explored = { S, A, D, B, E, C } Process: Node = Pop(Frontier) = F Child = Expand F = { G, E } Final: Goal(Child) = True return S A D B E C F G
  • 23. 1. Breadth-first search >> Performance Measure 23 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Complete >> Yes if the branching factor b is finite. Optimal >> Yes if step costs are all identical. Time Complexity >> - depth 1: nodes generated = b - depth 2: nodes generated= b * b = b2 - depth 3: nodes generated = b2 * b = b3 … … … - depth d: nodes generated = bd So, Total number of nodes generated = b + b2 + b3 + … … … + bd-1 + bd = O(bd) Space Complexity >> Total = O(bd) b + b2 + b3 + … … … + bd-1 + bd Explored set = O(bd-1) Frontier set = O(bd) What is time and space complexity when the goal test is checked during popping states from the frontier?
  • 24. 2. Uniform-cost search 24 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU ▸Similar to BFS but gives optimal solution with any step-cost function. ▸It expands the node with the lowest path cost g(n) ▸It uses priority queue that sorts based on g(n) value ▸Here, goal test is applied to a node when it is selected for expansion rather than when it is first generated. ▸Also an extra checkpoint is added in case a better path is found to a node currently on the frontier.
  • 25. 2. Uniform-cost search >> Algorithm [Graph Search] 25 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 26. 2. Uniform-cost search >> How it searches! 26 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 27. 2. Uniform-cost search >> Example 27 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU State Space : S = initial state, G =goal state, other nodes = intermediate states, links = legal transitions, labels = step cost. S C B A G 1 10 5 5 15 5
  • 28. 2. Uniform-cost search >> Example 28 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Before : Frontier = { } Explored = { } Process: Node = Initial State = S Final: Frontier = { (S,0,Nil) } Explored = { } S
  • 29. 2. Uniform-cost search >> Example 29 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Before : Frontier = { (S,0, Nil) } Explored = { } Process: Node = Pop(Frontier) = (S,0, Nil) Goal(Node) = False Child={ A, B, C } Final: Frontier = { (A,1,S), (B,5,S), (C,15,S) } Explored = { (S,0,Nil) } S A 1 B 5 C 15
  • 30. 2. Uniform-cost search >> Example 30 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Before : Frontier = { (A,1,S), (B,5,S), (C,15,S) } Explored = { (S,0,Nil) } Process: Node = Pop(Frontier) = (A,1,S) Goal(Node) = False Child={ G, S } Final: Frontier = { (B,5,S), (G,11,A),(C,15,S) } Explored = { (S,0,Nil), (A,1,S) } S A 1B 5 C 15 11 G
  • 31. 2. Uniform-cost search >> Example 31 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Before : Frontier = { (B,5,S), (G,11,A), (C,15,S) } Explored = { (S,0,Nil), (A,1,S) } Process: Node = Pop(Frontier) = (B,5,S) Goal(Node) = False Child={ G, S } Final: Frontier = { (G,10,B), (C,15,S) } Explored = { (S,0,Nil), (A,1,S), (B,5,S) } S A 1B 5 C 15 10 G
  • 32. 2. Uniform-cost search >> Example 32 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Before : Frontier = { (G,10,B), (C,15,S) } Explored = { (S,0,Nil), (A,1,S), (B,5,S) } Process: Node = Pop(Frontier) = (G,10,B) Goal(Node) = True return S A 1B 5 C 15 10 G
  • 33. 2. Uniform-cost search >> Performance Measure 33 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Complete >> Yes if branching factor b is finite and step costs is >= some positive constant Ďľ Optimal >> Yes Time Complexity >> -- Here Final depth = 1 + floor(C*/Ďľ) where C* = cost of the optimal solution -- So Time Complexity = O(bdepth) = O(b1+floor(C*/Ďľ)) Space Complexity >> As we need to save all the nodes either in Explored/Frontier Set, So required space= O(b1+floor(C*/Ďľ))
  • 34. 3. Depth-first Search 34 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU ▸Expand deepest unexpanded node. ▸DFS uses LIFO queue as Frontier. ▸LIFO queue means that the most recently generated node is chosen for expansion as this node must be the deepest unexpanded node cause it is one deeper than its parent.
  • 35. 3. Depth-first Search >> Algorithm [Tree Search] 35 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU function DFS(problem) returns a solution, or failure node  problem.INITIAL-STATE, PATH-COST = 0 frontier  a LIFO queue with node as the only element loop do if Empty?(frontier) then return failure node  POP(frontier) if problem.GOAL-STATE(node.STATE) then return SOLUTION(node) for each action in problem.ACTIONS(node.STATE) do child  CHILD-NODE(problem, node, action) if child not in current-path do frontier  INSERT(child, frontier) [ Here, frontier works like a LIFO queue ]
  • 36. 3. Depth-first Search >> How it works! 36 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 37. 3. Depth-first Search >> Example 37 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { S } Process: Node = Pop(Frontier) = S Goal(Node) = False Child = Expand S = { A, D } Final: Frontier = { A, D } S A D
  • 38. 3. Depth-first Search >> Example 38 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { A, D } Process: Node = Pop(Frontier) = A Goal(Node) = False Child = Expand A = { B, D, S } Final: Frontier = { B, D, D } S A D B D
  • 39. 3. Depth-first Search >> Example 39 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { B, D, D } Process: Node = Pop(Frontier) = B Goal(Node) = False Child = Expand B = { C, E, A } Final: Frontier = { C, E, D, D } S A D B D EC
  • 40. 3. Depth-first Search >> Example 40 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { C, E, D, D } Process: Node = Pop(Frontier) = C Goal(Node) = False Child = Expand C = { B } Final: Frontier = { E, D, D } S A D B D EC
  • 41. 3. Depth-first Search >> Example 41 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { E, D, D } Process: Node = Pop(Frontier) = E Goal(Node) = False Child = Expand E = { D, F, B } Final: Frontier = { D, F, D, D } S A D B D EC D F
  • 42. 3. Depth-first Search >> Example 42 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { D, F, D, D } Process: Node = Pop(Frontier) = D Goal(Node) = False Child = Expand D = { S, A, E } Final: Frontier = { F, D, D } S A D B D EC D F
  • 43. 3. Depth-first Search >> Example 43 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { F, D, D } Process: Node = Pop(Frontier) = F Goal(Node) = False Child = Expand S = { G } Final: Frontier = { G, D, D } S A D B D EC D F G
  • 44. 3. Depth-first Search >> Example 44 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU S G A B D E C F Before : Frontier = { G, D, D } Process: Node = Pop(Frontier) = G Goal(Node) = True S A D B D EC D F G
  • 45. 3. Depth-first search >> Performance Measure 45 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Complete >> No Optimal >> No Time Complexity >> - If maximum tree depth = m ; m>=d - Then DFS will generate maximum O(bm) nodes assuming 1 goal leaf at the RHS at depth d Space Complexity >> - At depth m we have b nodes - and (b-1) nodes at earlier depths from depth 0 to m-1 - Total = b+(m-1)*(b-1) = O(bm) nodes
  • 46. 4. Depth-limited Search 46 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU ▸It solves the infinite-path problem by providing a depth limit = l ▸If l < d then this problem will be incomplete ▸If l >d then this problem solution will be non-optimal ▸Depth-limit can be selected based on problem knowledge, but typically not known ahead of time in practice ▸This search algorithm returns two kinds of failures: - standard failure indicates no solution - cutoff indicates no solution within that depth limit
  • 47. 4. Depth-limited Search >> Algorithm [Tree Search] 47 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU function DLS(problem) returns a solution, or failure node  problem.Initial-state, Path-cost=0 frontier  a LIFO queue with node as the only element limit= l loop do if Empty?(frontier) then return failure node  Pop(frontier) if problem.Goal-state(node.State) then return Solution(node) if depth == l then return cutoff else expand the chosen node, adding the resulting nodes to the frontier if not in the path. end loop [ Here, frontier works like a LIFO queue ]
  • 48. 4. Depth-limited Search >> How it works! 48 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 49. 4. Depth-limited search >> Performance Measure 49 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Complete >> No when depth limit < d Optimal >> No when depth limit >= d Time Complexity >> - If maximum tree depth = l - Then DLS will generate maximum O(bl) nodes assuming 1 goal leaf at the RHS at depth d Space Complexity >> - At depth l we have b nodes - and (b-1) nodes at earlier depths - Total = b+(l-1)*(b-1) = O(bl) nodes
  • 50. 5. Iterative Deepening DFS Search 50 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU ▸Run multiple DFS searches with increasing depth-limits ▸It combines the benefits of DFS and BFS -- Like DFS it’s memory requirements are modest: O(bd) -- Like BFS, it is complete when the branching factor is finite and optimal when the path cost is a non-decreasing function of the depth of the node.
  • 51. 5. Iterative Deepening DFS Search >> How it works! 51 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 52. 5. Iterative Deepening DFS Search >> Example 52 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 53. 5. Iterative Deepening DFS Search >> Example 53 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
  • 54. 5. Iterative Deepening DFS Search >> Performance Measure 54 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Complete >> Yes if branching factor b is finite. Optimal >> Yes if step costs are all identical No if step costs are different. Time Complexity >> - Total no. of nodes= b + (b+b2) + … … … + (b+b2+ … … + bd) = O(bd) Space Complexity >> - O(bd)
  • 55. 5. Iterative Deepening DFS Search >> When to use? 55 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU ▸Isn’t IDS wasteful? - Repeated searches on different iterations - Compare IDS and BFS: E.g., b = 10 and d = 5 N(IDS) ~ db + (d-1)b2 +… … + bd = 50+400+3000+20000+100000 = 123,450 N(BFS) = b + b2 +… … + bd = 10+100+1000+10000+100000 =111,110 - Difference is only about 10% - Most of the time is spent at depth d, which is the same amount of time in both algorithms ▸In practice, IDS is the preferred uninformed search method with a large search space and unknown solution depth
  • 56. Practice 1 56 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution paths and path costs. - BFS - DFS - IDS - UCS
  • 57. Previous Question 57 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution paths and path costs. - BFS - DFS - IDS - UCS
  • 58. Previous Question 58 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution paths and path costs. - BFS - DFS - IDS - UCS
  • 59. Previous Question 59 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution paths and path costs. - BFS - DFS - IDS - UCS
  • 60. Previous Question 60 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution paths and path costs. - BFS - DFS - IDS - UCS
  • 61. Previous Question 61 Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU Apply the following search strategies in the state space graph as shown and show the corresponding search trees, solution paths and path costs. - BFS - DFS - IDS - UCS
  • 62. 62 THANKS! Any questions? You can find me at imam@cse.uiu.ac.bd