Homework#1: Implementing Uniform Cost Search and A*Search Algorithms

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值