1/21/2024 0 Comments Pac man world 6 3As you work through the following questions, you might find it useful to refer to the object glossary (the second to last tab in the navigation bar above).įirst, test that the SearchAgent is working correctly by running: python pacman.py -l tinyMaze -p SearchAgent -a fn=tinyMazeSearch The search algorithms for formulating a plan are not implemented - that's your job. In searchAgents.py, you'll find a fully implemented SearchAgent, which plans out a path through Pacman's world and then executes that path step-by-step. Question 1 (3 points): Finding a Fixed Food Dot using Depth First Search Note: if you get error messages regarding Tkinter, see this page. In UNIX/Mac OS X, you can even run all these commands in order with bash commands.txt. You can see the list of all options and their default values via: python pacman.py -hĪlso, all of the commands that appear in this project also appear in commands.txt, for easy copying and pasting. Note that pacman.py supports a number of options that can each be expressed in a long way (e.g., -layout) or a short way (e.g., -l). Soon, your agent will solve not only tinyMaze, but any maze you want. If Pacman gets stuck, you can exit the game by typing CTRL-c into your terminal. This agent can occasionally win: python pacman.py -layout testMaze -pacman GoWestAgentīut, things get ugly for this agent when turning is required: python pacman.py -layout tinyMaze -pacman GoWestAgent The simplest agent in searchAgents.py is called the GoWestAgent, which always goes West (a trivial reflex agent). Navigating this world efficiently will be Pacman's first step in mastering his domain. Pacman lives in a shiny blue world of twisting corridors and tasty round treats. But, we don't know when or how to help unless you ask.ĭiscussion: Please be careful not to post spoilers.Īfter downloading the code ( search.zip), unzipping it, and changing to the directory, you should be able to play a game of Pacman by typing the following at the command line: python pacman.py We want these projects to be rewarding and instructional, not frustrating and demoralizing. If you can't make our office hours, let us know and we will schedule more. Office hours, section, and the discussion forum are there for your support please use them. Getting Help: You are not alone! If you find yourself stuck on something, contact the course staff for help. If you do, we will pursue the strongest consequences available to us. We trust you all to submit your own work only please don't let us down. These cheat detectors are quite hard to fool, so please don't try. If you copy someone else's code and submit it with minor changes, we will know. If necessary, we will review and grade assignments individually to ensure that you receive due credit for your work.Īcademic Dishonesty: We will be checking your code against other submissions in the class for logical redundancy. However, the correctness of your implementation - not the autograder's judgements - will be the final judge of your score. Please do not change the names of any provided functions or classes within the code, or you will wreak havoc on the autograder. Please do not change the other files in this distribution or submit any of our original files other than these files.Įvaluation: Your code will be autograded for technical correctness. You should submit these files with your code and comments. Project 1 specific autograding test classesįiles to Edit and Submit: You will fill in portions of search.py and searchAgents.py during the assignment. Parses autograder test and solution filesĭirectory containing the test cases for each question Useful data structures for implementing search algorithms.Ĭode for reading layout files and storing their contents This file describes several supporting types like AgentState, Agent, Direction, and Grid. The logic behind how the Pacman world works. This file describes a Pacman GameState type, which you use in this project. Where all of your search-based agents will reside. Where all of your search algorithms will reside. You can download all the code and supporting files as a zip archive. The code for this project consists of several Python files, some of which you will need to read and understand in order to complete the assignment, and some of which you can ignore. See the autograder tutorial in Project 0 for more information about using the autograder. This can be run with the command: python autograder.py You will build general search algorithms and apply them to Pacman scenarios.Īs in Project 0, this project includes an autograder for you to grade your answers on your machine. In this project, your Pacman agent will find paths through his maze world, both to reach a particular location and to collect food efficiently.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |