Starting point is at A.
Target point is at S.
Mission is to find a path connect A and S, as short as possible.
I can’t understand how A gets to the lower floor.
if the dungeon, is, for example:
.##
A##
#.#
#.S
how can A get to S? Through the “.” in #.#???
Your example will lead to NO PATH. In order to move up and down, both cells with the same coordinates (excluding the floor) must be accessible.
Can you with another question?
Assume you are now in cell1.
Of course cell1 is an accessible cell (not a wall or a rock).
You want to move from cell1 to an adjacent cell2. Being adjacent, this cell2 can be in the N,E,S,W directions, or on the top of cell1, or under cell1.
Cell2 needs to be an accessible cell too. (You cannot walk into a wall or a rock.)
In your example, people cannot move from cell A down to lower floor because the cell under them is not accessible. People cannot move N and then go downward too because of the same reason.
But…this what we have in the example…I can’t see a path, and the answer is 6.
The only way to do this was if the floors were the other way around.
…#
.##
A##
#.#
#.S
#…
A can go up two steps, go right one step, then move down the floor.
P.S. Please use </> in the formatting toolbar to format monospaced characters.
┌>#
|##
A##
#|#
#└>
#..
I enjoyed this puzzle as an extended version of The Lost Child. I basically just copied the same code that I used there and made a few adjustments for the third dimension. Also found a way to simplify it over the Lost Child version. Thanks!
first->
“A…#”
“####”
“####”
second->
“.###”
“####”
“##.#”
Hello in case 2 named small we have case like under.
I dont know how jump from first level to second. Any ideas ?
I think it is NO PATH case but we have expected 11…
The spot A is standing (which is a space, a hidden dot) has a ladder connecting to the second layer, where there is a dot too.
This game was fun and relatively simple; I liked the 3D aspect which requires slight modification over typical 2D maze pathfinding. One thing I noticed was that my recursive BFS implementations would time out while using a queue was much faster and allowed me to complete it.