沿墙走是一种简单的解迷宫算法,您可能在小时候就学过了。
Wall-following is a simple maze algorithm you might have learned as a child.
在现有的几种解迷宫算法中,有两种常用算法使用固定数量的内存,而与迷宫的大小无关。
Of the several existing maze-solving algorithms, two commonly used ones consume a constant amount of memory regardless of the maze's size.
换句话说,有一个著名的走迷宫算法就是右手法则 - 顺着右手边的墙走,直到出去(包括绕过绝路)。
A well-known algorithm, so to speak, for walking a maze, is the right hand rule -- follow the right hand wall until you are out (including around dead-ends).
应用推荐