Question: Problem Description: In this assignment you are going to help my dog find a path from where he is to where his favourite snack

Problem Description: In this assignment you are going to help my dog

Problem Description: In this assignment you are going to help my dog find a path from where he is to where his favourite snack (i.e. peanut butter) is. I've made a maze for this purpose, which fits one of my rooms. There is no way that he can get to peanut butter unless he passes through the maze. The maze that I have designed has an entrance, exit and at least one path that gets my dog to the peanut butter. The idea is that each time I'm busy teaching you and I don't want him to disturb me, I set a new form of maze for him to engage him. I'm going to give you the layout of the maze and you are going to give me a path from where my dog is to where the peanut butter is placed. I'm going to mark the path that you identify with another favourite of his (yogurt). He sniffs the path and follow the yogurts until he gets to the peanut butter. al To implement the maze, I used a two-dimensional array, where the element of the array shows which side of the maze is open. The element of the array is a string of length four and contains only zero and one. Zero means the side is open and 1 means it is blocked. The first, second, third and fourth digits shows the state of the top, left, bottom and right side of one cell respectively. Please see the following example that shows how the maze is created. The left picture shows the maze, while the right shows the content of the array that represent the maze. Row/Col 0 1 2 3 4 5 1110 1010 1010 1000 1010 1011 1010 1000 1001 0101 1100 1001 0 1 2 1100 0011 0101 0110 0011 0101 3 0101 1101 0110 1001 1110 0000 4 0110 0011 1110 0010 1010 0011

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!