Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chapter 2 Searching Assignment: Search Algorithms

Open In Colab

Lab Overview

This lab provides hands-on experience with:

  1. Uninformed search algorithms (BFS, DFS, UCS)

  2. Informed search algorithms (Greedy, A*)

  3. Heuristic design and evaluation

  4. Constraint Satisfaction Problems

  5. Local search methods

Exercise 1: Romania Pathfinding

Implement BFS, DFS, and A* to find paths between Romanian cities.

Exercise 2: 8-Puzzle Solver

Implement multiple heuristics and compare their effectiveness.

Exercise 3: N-Queens CSP

Solve N-Queens using backtracking with constraint propagation.

Exercise 4: Local Search - Hill Climbing

Implement hill climbing and simulated annealing for optimization.

Exercise 5: Performance Analysis

Compare search algorithms systematically.

Implement bidirectional BFS for improved performance.

Lab Report

Deliverables

  • All algorithms implemented and tested

  • Performance comparison charts

  • Analysis of heuristic effectiveness

  • Discussion of algorithm trade-offs

Discussion Questions

  1. When is BFS preferable to DFS?

  2. How does heuristic quality affect A* performance?

  3. What are the limitations of local search?

  4. How would you handle very large state spaces?