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.

Search Labs

Three lab assignments on classic search algorithms. You work directly inside the Jupyter notebooks provided with the lab, implementing the listed functions. Your work is then evaluated automatically in those notebooks, and the score for each lab is normalized to the course scale.

Assignments

AssignmentTopicPointsYou implement
lab1Search on a directed weighted graph of 1000 nodes, given as graph.txt60read_graph_input, bfs, dfs, greedy_best_first_search, ucs, a_star, plus _optimized variants using deque and heapq, plus a written theory question
lab2Search on a 2D grid maze of 51 × 51 cells in maze.txt, with # walls and S, E start and exit100read_maze, manhattan_distance, get_neighbors, maze_bfs, maze_dfs, maze_greedy_best_first, maze_ucs, maze_astar
lab3N-Queens with uninformed/informed strategies60count_conflicts, is_safe, queens_bfs, queens_dfs, queens_ucs, queens_greedy, queens_astar + 2 written questions

All algorithms return the solution as a list of nodes/cells ((row, col) tuples for mazes/queens), or None when the problem is unsolvable.

The exact specification of each function, covering expected inputs, conventions and edge case behavior, is documented in the header comments of the notebook cells. Read them carefully before implementing.