All you do to solve a maze using this algorithm is keep your left hand on the left wall (or your right hand on the right wall) and just follow it along until you exit the maze.
在用这种算法解迷宫时,只需要把左手一直放在左边的墙上(或者把右手一直放在右边的墙上),然后沿着墙走,直到走出迷宫。
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).
换句话说,有一个著名的走迷宫算法就是右手法则 - 顺着右手边的墙走,直到出去(包括绕过绝路)。
For example, if a maze has no internal loops, you can always escape by keeping your right hand against a wall at all times.
例如,如果一个迷宫没有内部的循环,你可以每次遇到墙壁都右转来走出迷宫。
应用推荐