Closed camillac closed 6 years ago
Adding on to the recursive abstraction:
I think you're on the right track in terms of dividing the problem into a smaller problem. But in this case, asking the recursive abstraction to find a path to the treasure of a smaller maze doesn't really make sense to me. I think we shouldn't modify the maze. Also it isn't really clear to me what a maze of size "n-1 hallway" looks like. What does hallway mean? A stepping stone or a whole rank/file?
About the pseudocode:
I suggest converting this English into code format so it will be very easy to code when it is time. Checking if the player is at a "junction" requires a whole lot of code. I assume by junction you mean when all 4 direction of the current spot is a stepping stone. I don't think that is necessary to check though, it is too complicated. I suggest to treat every spot as a "junction" and check all 4 spots in each direction as you have described and let the recursive backtracking do the trick. Hope that makes sense.
We apologize for the late feedback. :(
Please proofread.
recursive abstraction
What do you mean by "solve the maze"? Use the language that you used in "statement of a problem"!
base cases
What if the explorer begins on a wall and there is no hallway?