Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a Maze class which is a simple class that will take in the definition of a maze as a string, and convert it into a
a Maze class which is a simple class that will take in the definition of a maze as a string, and convert it into a matrix, which can be indexed using the at function. The at function takes in a coordinate as input, and returns a symbol representing the cell of the maze ie whether it is empty, a wall, etc.
a MazeState class which is simply just a maze and a position for the player this suffices to define the state of a player in a maze
a MazeProblem class, which is incomplete. The goal of this project is to complete this definition of a maze problem, so that it can be solved by one of the search algorithms already included in the AIMA repository. Once properly implemented, the included
test.py script will run tests over multiple different mazes, each time showing the maze, the solution found, and the number of steps actions required to solve the maze each action counts as one step
Turn in: your modified version of
maze.py onto the course website under Assignments and Homework Assignments are due Friday, January by : pm Please start early in case you encounter any unexpected difficulties.
Included files:
homeworkpdf: this document
maze.py: this includes a skeleton of the MazeProblem class that you want to complete.
test.py: this file includes several tests of your MazeProblem class. Make sure every test passes before you submit your assignment. This file contains the public tests, whereas your assignment will be graded based on private tests that will be revealed when the solutions are posted.
search.py and
util.py come from the AIMA python repository.
Hint: Read the code. USE THE DEBUGGER. For example, insert this line in your code:
import pdb; pdbsettrace
and whenever your code runs this line, it will start the commandline debugger at that point in the code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started