Homework#1: Implementing Uniform Cost Search and A* Search Algorithms Due date: 03/21/2022 23:59 PM Overview The goal of this homework assignment is to implement two popular search algorithms, namely Uniform Cost Search and A* Search, using the existing codebase provided in https://github.com/jostbr/pymaze. The implementation should be in Python and the resulting code should be submitted along with a detailed report that explains the implementation, demonstrates the algorithms' performance, and provides insights into the strengths and weaknesses of each algorithm. Task The specific tasks that you need to accomplish for this homework assignment are as follows: 1. Implement the Uniform Cost Search algorithm by adding a new function to the existing codebase. The function should be named uniform_cost_search and should take as input a maze object and return the optimal path from the starting position to the goal position, along with its cost. 2. Implement the A* Search algorithm by adding another new function to the existing codebase. The function should be named a_star_search and should take as input a maze object and a heuristic function, and return the optimal path from the starting position to the goal position, along with its cost. Please use a Euclidian distance for its heuristic function. 3. Visualize the solutions obtained by both algorithms on 10 randomly generated 20x20 mazes. You should use the visualization functions already provided in the codebase to create a visual representation of each maze and the found paths. 4. Write a detailed report that explains your implementation of the two algorithms, including any modifications or enhancements you made to the existing codebase. Your report should also include a discussion of the strengths and weaknesses of each algorithm and their performance (e.g., the number of steps) on the mazes you used for testing.
Homework#1: Implementing Uniform Cost Search and A*Search Algorithms
最新推荐文章于 2024-08-29 18:44:48 发布