CS106 Final Project

The final project in CS106 is an opportunity for you to showcase what you have learned in this class, and begin applying your newfound knowledge and abilities to a problem that interests you personally.

The final project is to be an individual or a small group project, although I hope that in either case you consult with others in the class and with professors (if possible) for help in design, implementation, and debugging.

Timeline (Milestones)

There will be four deliverables for this project, due according to the following schedule:

  1. Project Design (2%): You submit a document outlining what your project will do. See below for more details. Due W9 Saturday, end of day.

  2. Project Walkthrough (3%): You and I meet to look at what you have completed. I will recommend solutions to problems you are having. At least 50% of your code must be complete when we meet. Sometime between Thanksgiving and Study Break.

  3. Project Showcase (5%): during our final exam time you will demo your work to the class. You’ll mainly show your code running, but depending on the project you might also make slides. For a team project, each team member should contribute to the presentation.

  4. Project Submission (90%): You submit your final project code by the end of the day of our final exam time. See details below. Since the problem-solving process is essential and cannot be evaluated on the basis of code alone, code submitted without a walkthrough will not be graded.

I will combine the points from these deliverables to compute your score for the final project/presentation.

Details for each milestone are below:

Milestone 1: Project Design

Write a document (Word, PDF, etc., not Python code) that includes the following:

It’s okay if you don’t have everything fully designed; expect the project to take shape as you go. But note that the more work you do on your design, the less time you’ll have to spend writing the code (because you’ll implement more of it correctly the first time).

Suggestion: Use AI!.

Last year I allowed students to use AI-generated code under certain conditions. But students often had trouble explaining the code that the AI generated, showing that they didn’t really understand what the code was doing. So this year the policy is simpler: if you want to use some AI-generated code (or code from blog posts, StackOverflow, etc.) in your code, send it to the instructor for approval before you use it.

Regardless of how you use the AI (or other references like blog posts, tutorials, or sample code), you should be able to explain every part of your code during the walkthrough. If you can’t, you should probably rewrite it.

General Notes

What kinds of projects can you work on? Almost anything that you can imagine to be “scientific computing”, “modeling”, or education. For example:

I encourage you to investigate and (hopefully) use existing Python packages. Interesting ones include:

Ideas

Milestone 2: Project Walkthrough

You will meet with me to discuss your project. You should have at least 50% of your code complete at this point. You should be able to show me what you have working, and I will give you feedback on what you have done and what you need to do to finish.

You should be prepared to discuss the following:

I will:

Milestone 3: Project Showcase

During our final exam time, you will demo your project to the class.

We will divide up by rows. Each person will demo their project to others in the row. Each row will then nominate one project to show to the whole class.

Most people will only need to bring their running code. If you are doing a simulation project or something else that requires more explanation or summary, though, you might find it helpful to make slides.

Although this event will feel pretty informal, you should still:

For a team project, each team member should be present and contribute.

Milestone 4: Final Code and README

Submit a ZIP file on Moodle that includes:

Grading

I will grade your project submission as follows:

Note that it is better to choose a final project that is not overly complex and get it right than it is to choose a project that is too complex and not finish it. I recommend that you find a project that you can implement in stages, so that at multiple points you can have a “finished” project, and then decide if you want to or have time to proceed to the next stage. If you choose this route, it would be best to document these stages in your design document.

Testing

You can use assert to test your functions. For example:

def double(x):
    return x * 2

def is_close(x, y):
    return abs(x - y) < .001

assert is_close(double(2), 4)
assert is_close(double(3), 6)

Reuse vs Plagiarism

It can be very helpful to find an example we did in class (lab, homework, etc.) that is similar to what you want to do and adapt it. This is highly encouraged. Just note that you did so in your code documentation.

If you intend to use code from other people outside of the class, talk to us first and remember that we’ll grade you on the code you write, not on what other people write. If you do make use of existing code and libraries, be sure to clearly indicate who wrote what parts of the code; using code without proper attribution is a form of plagiarism.

Feel free to discuss ideas with us or with your classmates, but don’t copy code (i.e. plagiarize). Here are examples of what plagiarism looks like:

Consider these rules of thumb:

Note that these rules of thumb apply to the code supplied in this course’s materials as well.

Resources

Streamlit stuff

Games in Streamlit

State management in streamlit is a bit tricky because the file re-runs from the top every time. I usually solve this by having a game-state object that gets stored in session state; see this grid demo. Here are some more examples and documentation:

Other Game Engines

There’s lots of game engines for Python. Some of them might be hard to learn, but might be worthwhile depending on the complexity of what you’re trying to do.

Datasets

Acknowledgments

Like most CS 106 material, these instructions were based on material written for a prior offering of this class by Dr. Victor Norman.