how to realize a* or best first search in 2d matrix?
2 次查看(过去 30 天)
显示 更早的评论
Hello, i have a random n*n matrix and i need to find path from one point to another using a* or BFS. You can move only up/down and left/right
For example [ 6 9 6 8;
8 6 3 9;
9 2 6 1 ]
We start from (1;1) to (3;4) and the way is gonna be like 6 - 8 - 6 - 2 - 6 - 1 and the distance will be 6+8+6+2+6+1=29
0 个评论
采纳的回答
Shubham Rawat
2021-1-28
Hi Vlad,
You may use this link for the BFS using Adjacency matrix:
Hope this Helps!
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Construction 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!