Code Monkey home page Code Monkey logo

492_hw2's Introduction

One final note: developing on a VM can be time consuming. We will be exposing an autograder soon, so if you can get the code working on your local environment, feel free to develop there and check that your code runs on the autograder when it goes live. The autograder tests include the tests in test.py, so if you find that you are passing the tests in test.py and failing all the autograder tests, you will know that we are not able to run your code on our grading environment, and you should get it up and running on the VM to see what went wrong.

Ubuntu VM Installation

This process will take up to 20 minutes Follow these instructions to get an Ubuntu VM running through virtualbox on your computer (note: the Ubuntu image download is ~2 GB. If you have internet constraints at home, best to do this on MWireless). It is recommended to download Ubuntu 18.04.3.

You can "install ubuntu" or "try it". Either will work for this assignment. Installing Ubuntu is helpful if you plan on using this VM long term, or would like to make copy paste available from your host system to your VM. Here are a few pointers if you would like to do this:

  • Step 8: choose "Install Ubuntu"
  • Step 10: choose "Minimal installation" - takes far less time, and for the purposes of this assignment you won't need the other programs included.
  • Step 11: choose "Erase disk and install Ubuntu". You will see a scary warning message saying it will delete all your files. It is referring to the virtual drive you're creating, not the host (your computer).

Downloading the repo and installing dependencies

sudo apt install git
git clone https://github.com/abwilf/HW2_Pacman.git
cd HW2_Pacman
sudo apt-get install python3-tk
sudo apt install python3-pip

Note: the staff has encountered some behavior where this last step fails. If you see an error along the lines of Unable to locate package python3-pip, here is a fix. Make sure to use sudo apt install python3-pip instead of python-pip as the fix recommends.

Then,

pip3 install future

Note: if this last step fails, and you may need this fix.

To test that all the dependencies worked, run this command to play a game of pacman.

python3 pacman.py

Note: you should be running some version of python 3.6. Check this with python3 --version, and you should see Python 3.6.x.

Currently, a trivial search agent, GoWestAgent, has already been implemented for you. This search agent only moves west. In some mazes, it may help Pac-Man find food, but it may not in others. Try out these 2 commands! If this works, you can get started coding and testing.

python3 pacman.py --layout testMaze --pacman GoWestAgent
python3 pacman.py --layout tinyMaze --pacman GoWestAgent

Credit

All credit for this portion of the homework goes to UC Berkeley’s CS188 course.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.