AI3391 ARTIFICAL INTELLIGENCE
(II YEAR (III Sem))
Department of Artificial Intelligence and
Data Science
Session 8
by
Asst.Prof.M.Gokilavani
NIET
11/14/2023 Department of AI & DS 1
TEXTBOOK:
• Artificial Intelligence A modern Approach, Third
Edition, Stuart Russell and Peter Norvig, Pearson
Education.
REFERENCES:
• Artificial Intelligence, 3rd Edn, E. Rich and K.Knight
(TMH).
• Artificial Intelligence, 3rd Edn, Patrick Henny
Winston, Pearson Education.
• Artificial Intelligence, Shivani Goel, Pearson
Education.
• Artificial Intelligence and Expert Systems- Patterson,
Pearson Education.
11/14/2023 Department of CSE (AI/ML) 2
Topics covered in session 8
11/14/2023 Department of AI & DS 3
Unit I: Intelligent Agent
• Introduction to AI
• Agents and Environments
• Concept of Rationality
• Nature of environment
• Structure of Agents
• Problem solving agents
• Search Algorithm
• Uniform search Algorithm
Uniform cost search
• Uniform-cost search is a searching algorithm used for
traversing a weighted tree or graph.
• The primary goal of the uniform-cost search is to find a path
to the goal node which has the lowest cumulative cost.
• Uniform-cost search expands nodes according to their path
costs form the root node.
• It can be used to solve any graph/tree where the optimal
cost is in demand.
• A uniform-cost search algorithm is implemented by the
priority queue.
• It gives maximum priority to the lowest cumulative cost.
• Uniform cost search is equivalent to BFS algorithm if the
path cost of all edges is the same.
11/14/2023 4
Department of CSE (AI/ML)
11/14/2023 Department of CSE (AI/ML) 5
• Advantages:
– Uniform cost search is optimal because at every
state the path with the least cost is chosen.
• Disadvantages:
– It does not care about the number of steps involve
in searching and only concerned about path cost.
Due to which this algorithm may be stuck in an
infinite loop.
11/14/2023 6
Department of CSE (AI/ML)
Iterative Deepening Depth First
Search (IDDFS)
• It is a search algorithm that uses the combined
power of the BFS and DFS Algorithm.
• It is iterative in nature.
• It searches for the best depth in each iteration.
It performs the Algorithm until it reaches the
goal node.
• The algorithm is set to search until a certain
depth and the depth keeps increasing at every
iteration until it reaches the goal state.
11/14/2023 7
Department of CSE (AI/ML)
11/14/2023 Department of CSE (AI/ML) 8
11/14/2023 Department of CSE (AI/ML) 9
• Advantages:
– It combines the benefits of BFS and DFS search
algorithm in terms of fast search and memory
efficiency.
• Disadvantages:
– The main drawback of IDDFS is that it repeats all
the work of the previous phase.
11/14/2023 10
Department of CSE (AI/ML)
Bidirectional Search Algorithm
• Before moving into bidirectional search let’s first
understand a few terms.
• Forward Search: Looking in-front of the end from
start.
• Backward Search: Looking from end to the start back-
wards.
• Bidirectional search replaces one single search graph
with two small sub graphs in which one starts the
search from an initial vertex and other starts from goal
vertex.
• The search stops when these two graphs intersect each
other.
11/14/2023 11
Department of CSE (AI/ML)
11/14/2023 Department of CSE (AI/ML) 12
• This algorithm divides one graph/tree into two
sub-graphs.
• It starts traversing from node 1 in the forward
direction and starts from goal node 16 in the
backward direction.
• The algorithm terminates at node 9 where two
searches meet.
11/14/2023 13
Department of CSE (AI/ML)
Bidirectional search can use search techniques
such as BFS, DFS, DLS, etc.
Advantages:
– Bidirectional search is fast.
– Bidirectional search requires less memory
Disadvantages:
– Implementation of the bidirectional search tree is
difficult.
– In bidirectional search, one should know the goal
state in advance.
11/14/2023 Department of CSE (AI/ML) 14
Topics to be covered in next session 9
• Informed (Heuristic) Search Strategies
11/14/2023 Department of CSE (AI/ML) 15
Thank you!!!

AI3391 ARTIFICIAL INTELLIGENCE Session 8 Iterative deepening DFS and Bidirectional search.pptx

  • 1.
    AI3391 ARTIFICAL INTELLIGENCE (IIYEAR (III Sem)) Department of Artificial Intelligence and Data Science Session 8 by Asst.Prof.M.Gokilavani NIET 11/14/2023 Department of AI & DS 1
  • 2.
    TEXTBOOK: • Artificial IntelligenceA modern Approach, Third Edition, Stuart Russell and Peter Norvig, Pearson Education. REFERENCES: • Artificial Intelligence, 3rd Edn, E. Rich and K.Knight (TMH). • Artificial Intelligence, 3rd Edn, Patrick Henny Winston, Pearson Education. • Artificial Intelligence, Shivani Goel, Pearson Education. • Artificial Intelligence and Expert Systems- Patterson, Pearson Education. 11/14/2023 Department of CSE (AI/ML) 2
  • 3.
    Topics covered insession 8 11/14/2023 Department of AI & DS 3 Unit I: Intelligent Agent • Introduction to AI • Agents and Environments • Concept of Rationality • Nature of environment • Structure of Agents • Problem solving agents • Search Algorithm • Uniform search Algorithm
  • 4.
    Uniform cost search •Uniform-cost search is a searching algorithm used for traversing a weighted tree or graph. • The primary goal of the uniform-cost search is to find a path to the goal node which has the lowest cumulative cost. • Uniform-cost search expands nodes according to their path costs form the root node. • It can be used to solve any graph/tree where the optimal cost is in demand. • A uniform-cost search algorithm is implemented by the priority queue. • It gives maximum priority to the lowest cumulative cost. • Uniform cost search is equivalent to BFS algorithm if the path cost of all edges is the same. 11/14/2023 4 Department of CSE (AI/ML)
  • 5.
  • 6.
    • Advantages: – Uniformcost search is optimal because at every state the path with the least cost is chosen. • Disadvantages: – It does not care about the number of steps involve in searching and only concerned about path cost. Due to which this algorithm may be stuck in an infinite loop. 11/14/2023 6 Department of CSE (AI/ML)
  • 7.
    Iterative Deepening DepthFirst Search (IDDFS) • It is a search algorithm that uses the combined power of the BFS and DFS Algorithm. • It is iterative in nature. • It searches for the best depth in each iteration. It performs the Algorithm until it reaches the goal node. • The algorithm is set to search until a certain depth and the depth keeps increasing at every iteration until it reaches the goal state. 11/14/2023 7 Department of CSE (AI/ML)
  • 8.
  • 9.
  • 10.
    • Advantages: – Itcombines the benefits of BFS and DFS search algorithm in terms of fast search and memory efficiency. • Disadvantages: – The main drawback of IDDFS is that it repeats all the work of the previous phase. 11/14/2023 10 Department of CSE (AI/ML)
  • 11.
    Bidirectional Search Algorithm •Before moving into bidirectional search let’s first understand a few terms. • Forward Search: Looking in-front of the end from start. • Backward Search: Looking from end to the start back- wards. • Bidirectional search replaces one single search graph with two small sub graphs in which one starts the search from an initial vertex and other starts from goal vertex. • The search stops when these two graphs intersect each other. 11/14/2023 11 Department of CSE (AI/ML)
  • 12.
  • 13.
    • This algorithmdivides one graph/tree into two sub-graphs. • It starts traversing from node 1 in the forward direction and starts from goal node 16 in the backward direction. • The algorithm terminates at node 9 where two searches meet. 11/14/2023 13 Department of CSE (AI/ML)
  • 14.
    Bidirectional search canuse search techniques such as BFS, DFS, DLS, etc. Advantages: – Bidirectional search is fast. – Bidirectional search requires less memory Disadvantages: – Implementation of the bidirectional search tree is difficult. – In bidirectional search, one should know the goal state in advance. 11/14/2023 Department of CSE (AI/ML) 14
  • 15.
    Topics to becovered in next session 9 • Informed (Heuristic) Search Strategies 11/14/2023 Department of CSE (AI/ML) 15 Thank you!!!