if wall is in front turn, else go.
######
#S####
# ####
# ####
# -> Freedom!
# ####
# ####
# ####
######
it isn't that hard to expand it out to the left hand turn rule for mazes: http://en.wikipedia.org/wiki/Maze_solving_algorithm
######
# #
# ## #
# ## -> Freedom!
# ## #
# S #
######
Actually, that defeats the original rule as well.
The wikipedia link mentions that case, and goes into more detail with other algorithms that avoid that issue.
This reminds me of a system I thought about a wall ago, which is an anticipation system.
Imagine a ball rolling towards the cliff of a table. You could anticipate that the ball will fall, if the eventual y position will be negative(or less than the current y position) some time in the near future, if it continues along its current path. Therefore, you might tell it to jump before it falls.
This reminds me of a system I thought about a wall ago, which is an anticipation system.
Imagine a ball rolling towards the cliff of a table. You could anticipate that the ball will fall, if the eventual y position will be negative(or less than the current y position) some time in the near future, if it continues along its current path. Therefore, you might tell it to jump before it falls.
_______X___
|
| //Large enough delta height that the check triggers and the ball jumps from X
|
|________ _________
| |
| |
| |
| |
|/\/\/\/\| //Spikes of doom, gap is such that jump from top platform results in landing here