[SOLVED] AI-Lab 3 Uninformed Search Strategies

20.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (4 votes)

Uninformed strategies use only the information available in the problem definition. Uninformed Search includes the following algorithms:

  • Breadth First Search (BFS)
  • Depth First Search (DFS)
  • Uniform Cost Search (UCS)
  • Depth Limited Search (DLS)
  • Iterative Deepening Search (IDS)
  • Bidirectional Search (BS)

BFS

  • Expand shallowest unexpanded node.
  • In breadth-first search the frontier is implemented as a FIFO (first-in, first-out) queue. Thus, the path that is selected from the frontier is the one that was added earliest.
  • This approach implies that the paths from the start node are generated in order of the number of arcs in the path. One of the paths with the fewest arcs is selected at each stage.

Pseudocode:

Input: A graph G and a starting vertex v of G

Output: All vertices reachable from v labeled as explored.

A non-recursive implementation of breadth-first search:

 

 

Fig 1.

Exercise 1:

  • Write a program to implement BFS in Fig 1.
  • Show which sequences of paths are explored by BFS.
  • Use queue/stack data structure that you implemented in Experiment 2.
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.