【发布时间】:2015-11-04 06:15:59
【问题描述】:
Red Dot - Represents the initial location
Black Dot - Already occupied
Green - Free to occupy
Destination - Boundry of the matrix [which means either x = 0 or y = 0 or x = 8 or y = 8]
red dot 一次只能移动一次,并且可以在与其相连的六个绿色圆圈之一中移动。
在这种迷宫中计算最短路径的最快方法是什么。
【问题讨论】:
-
什么是“路径”?你能举一些例子吗?为包含漂亮图片的问题投票。
-
这到底是什么意思?目标 - 矩阵的边界 [表示 x = 0 或 y = 0 或 x = 9 或 y = 9] 9 次成功移动?
-
见编辑中的例子。红点必须到达迷宫的边界。
-
开始总是在中间还是可以无处不在?
-
@MarkusHütter 是的。它可以在迷宫中的任何地方
标签: algorithm path shortest-path breadth-first-search shortest