Machine Problems

Instructions for Machine Problems will be posted here. Each MP will be available to you one week before the date listed below. MPs are due by midnight Urbana time on the date listed below.

General MP Instructions

Each MP is distributed as a ZIP archive. In the ZIP archive, you will find the following files:

  • submitted file: there will be only one file you submit. To find out what it’s called, you have to read the instructions for each MP. For example, in MP1, it’s called naive_bayes.py. This will contain several almost-empty methods, or blank lines, where you have to insert working code.

  • mp?.py - this is an interactive user interface that uses pygame to help you debug the MP; you can run it by typing $ python mp?.py (replace the question mark by the MP number). It doesn’t need to work, but we hope that you will enjoy the MP more if you use it. An example of how it should look, when everything works, will be linked from each MP’s page.

  • grade.py - this is the same code that the autograder runs. Before you submit to the autograder, please try running this on your own machine. You’ll first need to type pip install gradescope-utils to get the gradescope utilities, then you can type python grade.py. If it shows any errors, please fix them on your own machine before you try submitting to the autograder – you will save a lot of time! The autograder will run all of the same tests that are available to you, plus a few more hidden tests.

  • requirements.txt lists the python packages that are used by the autograder. You can install them by typing pip install -r requirements.txt.

  • Other packages: if your submitted file calls any packages that are not listed in requirements.txt, or in the Python Standard Library, then it won’t work on Gradescope. numpy is always available; other things are usually not available.

How to Submit

When you’re ready to submit, go to Gradescope.

  • Submit only the one submittable file (e.g., in MP1 this is called naive_bayes.py). Any other files you submit will be ignored.

  • You may submit as many times as you like. By default, we willl count your last submission; if you want us to grade a submission other than your last one, please select it using the Gradescope user interface.

MP Grading Policy

Machine problems are graded by the autograder.

You are allowed to submit any MP late, with a penalty: your MP grade will be multiplied by \(\max(0.5,1-t/28800)\), where \(t\) is the lateness of your submission, in minutes. For example, if you’re late by one day, you can earn 95% credit; if you’re late by any number of days greater than 10, you can still earn up to 50% credit.

Warning

Warnings about the late penalty

  • Gradescope does not show you the late penalty. If you want to know what your score really is, you need to check Gradescope’s lateness field, and calculate your late penalty yourself.

  • The late penalty is not waived for travel, trauma, interviews, religious holidays, or for any illness or injury that leaves you with the use of your hands. It is not waived on account of computer crashes; please back up your work.

Collaboration Policy

  • You may not share code with other students.

  • You may copy partial solutions (up to no more than eight lines of code per block) from sources on the web, as long as your code contains comments giving the source URL.

  • Most other types of collaboration are allowed: please feel free to share verbal descriptions of solution ideas, whiteboard block diagrams, limited bits of pseudocode, and pointers to web resources with other students.