Just on the top of it, it does sound a bit homework-ish, but it interested me none the less.
You seem to indicate that you can jump multiple steps in the horizontal, but can you also jump multiple steps vertically, or are you limited to vertical stepping by one?
Is there one particular starting and ending point, such as the upper-left and bottom-right corners, or can you start from any point on the upper row as long as you end up on the bottom row? Assuming it is, this problem sounds as if it would almost reduce to a standard maze problem, for which there are numerous solutions available. If the latter, then I see the problem getting much more complex and time-consuming, since you have to consider starting from each location on the top row, at which point I would start looking for a more unusual solution, such as one using a genetic algorithm or finite-state automata. (I once used the latter in solving a maze for a class-quite interesting.)
I can't think of any modules off-handedly that would help (although if you have to get into one of those more unusual solutions I mentioned, perhaps something in the AI section of CPAN or dealing with discrete finite automata might be helpful).
As to thinking-caps, the reason I asked above about multiple vertical steps was because if so, you could rotate a copy of the array around the axis between upper-left and lower-right corners to aid in scanning for vertical jump possibilities.
I don't know if that helps any, but it does sound like an interesting problem, and I do hope you have the opportunity to post more regarding the problem.
Update: I must agree with Abigail-II-can you please clairify the notation you are using for your path? I could not make sense of the path at one point, and was unsure if I was misunderstanding or if there was an error in the path. Thanks.
Update: Appologies to Abigail-II and others for introducing something more complicated than necessary for solving a problem. My reason for suggesting such things was a weakness in the arena of graph problems.
In reply to Re: The Matrix
by atcroft
in thread The Matrix
by nosbod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |