Maze Runner Function - Implementation of this function is done in a1_partd.py We describe a maze as having row x col cells. For example if row was 3, and col was 4, then we would have a grid of cells as follows. We describe a wall by the two cell numbers the wall separates. If every single wall existed, there would be (row-1)(col) + (col-1) (row) walls. 0 | 1 | 2 | 3 4 | 5 | 6 | 7 8 | 9 | 10 11 A Maze class (which you do not need to implement) describes a maze as mentioned above. This class is defined in maze.py. It has methods that you can use to travel through the maze (i.e. figure out where you are, find a neighbour cell etc.) use a recursive maze runner function: def find_path(maze, from_cell, to_cell); The find_path function will find a path from cell number from_cell to cell number to_cell and will return it as a list containing all the cell numbers along the path, from the from_cell to the to_cell. You are allowed to use this function as a wrapper to a recursive function that does the work, allowing for other arguments to your function prototype or additional processing. However, the function that does the work to find the path must be recursive. For example, suppose the from_cell was 0 and the to_cell was 3, using the maze below: 0 | 1 2 3 11 The find_path function would return this path: [0, 4, 5, 1, 2, 3]. Online visualizer To help you debug your program, when you run the tester, the tester will make a "path" file based on the path your find_path function generates (its return values.) You can see what is happening by going to this site: Online Visualizer • Use the radio buttons to select the test in question (see your error message.) • Then, load the corresponding testpath file.
Maze Runner Function - Implementation of this function is done in a1_partd.py We describe a maze as having row x col cells. For example if row was 3, and col was 4, then we would have a grid of cells as follows. We describe a wall by the two cell numbers the wall separates. If every single wall existed, there would be (row-1)(col) + (col-1) (row) walls. 0 | 1 | 2 | 3 4 | 5 | 6 | 7 8 | 9 | 10 11 A Maze class (which you do not need to implement) describes a maze as mentioned above. This class is defined in maze.py. It has methods that you can use to travel through the maze (i.e. figure out where you are, find a neighbour cell etc.) use a recursive maze runner function: def find_path(maze, from_cell, to_cell); The find_path function will find a path from cell number from_cell to cell number to_cell and will return it as a list containing all the cell numbers along the path, from the from_cell to the to_cell. You are allowed to use this function as a wrapper to a recursive function that does the work, allowing for other arguments to your function prototype or additional processing. However, the function that does the work to find the path must be recursive. For example, suppose the from_cell was 0 and the to_cell was 3, using the maze below: 0 | 1 2 3 11 The find_path function would return this path: [0, 4, 5, 1, 2, 3]. Online visualizer To help you debug your program, when you run the tester, the tester will make a "path" file based on the path your find_path function generates (its return values.) You can see what is happening by going to this site: Online Visualizer • Use the radio buttons to select the test in question (see your error message.) • Then, load the corresponding testpath file.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education