CS 111 Final Project

Aaron Bauer

September 10, 2021

CS 111 f21 – Final Project

Overview

To complete your CS 111 experience, you will take on a project of your own design.

Objectives

Collaboration

The project is to be done in a partnership of your choice. Unlike with pair-programming assignments from the course so far, you are not both required to work on all aspects of the project, but you are all expected to do your fair share. I will allow individual projects if you have a good reason that you wish to work alone. I encourage you to work in a partnership! It will let you accomplish more and have more fun.

Deadlines

See the What to Turn In for more details.


The Project

For the final project, you have two options. If you would like to do a graphical project, you can find slightly out-of-date pgl documentation here, messy, but up-to-date pgl documentation here and vpython documentation here.

OPTION #1: A SIMULATION

One of the things computers are good at is simulation of systems that evolve over time. Consider, for example, a computer model of the solar system. You can give the computer the initial positions, masses, and velocities of the largest objects in the solar system, plus a computational mechanism for simulating the effects of Newton’s law of gravitation. Then you can set the system running, and your solar system will go through its motions. You could then try adding a comet with a mouse click or two, and watch how the comet’s orbit is perturbed by close encounters with planets or asteroids. If the simulation takes relevant physical laws into account, the evolution of the system will be a good representation of the workings of the real solar system.

If you choose this project, you will simulate some time-dependent system that can be represented effectively in a rectangular display. You could show a top view of the solar system, or a side view of an aquarium, or a landscape with rain, clouds, plants, and birds. Your system will need to be animated, and there will need to be a diverse enough collection of elements to your system that the objects will have interactions of some kind. Planets, for example, interact gravitationally, big fish eat little fish, and raindrops cause plants to grow.

Some other simulation ideas: fishtank simulations, biological simulations (diseased vs. white blood cells, change of seasons), agricultural simulations (given a set of initial conditions, a choice of crop, etc, will you be able to harvest your crop and get it to market?)

Your simulation may include pretty much any features you can come up with, but its minimal features must include:

OPTION #2: A COMPUTER GAME

Write a game program. The game should be either fun for the user, or one in which the computer has some basic intelligence, or both. Your game can be entirely text based, or you can use pgl.py or vpython if you’d like to make it more visually appealing. No graphics are required, though.

Some possible games to implement: Boggle, Scrabble, Dots and Boxes, Battleship, Go Fish, Bejeweled, Connect Four, Mastermind, etc. Another possibility is Bagels, which is described at the bottom of the assignment. Some games to be wary of: a text-adventure game (these can be done well, but they usually devolve into a morass of nested if statements that aren’t interesting to write or read); Hangman, Tic-Tac-Toe, Blackjack, etc. (too simple); Go, your favorite German board game (too complex).

The requirement of some level of computer intelligence means this: the computer should play against you or manage your game in some kind of intelligent way. You don’t need the computer to be a world-class player at your game (or even close!)—but you should make an effort on this front.

If you have questions about the suitability of a particular game, feel free to discuss it with me.

What to Turn In

Project Proposal – turn in via Moodle by 9pm Friday, November 12

You must submit to me a one-page written proposal for your project. The proposal should include your partnership (or an explanation of your plan to work alone), what game you’re planning to write, and a list of pieces that you plan to implement, in order, to create your game. This should be a plan of attack for your project, so that you can think through what steps you will need to take to make your game work. Let me know if you have questions about the rules or suitability of a particular game or simulation. I recommend talking to me about your thoughts about the project early to make sure that you haven’t picked something too easy or too hard. The biggest trap on this assignment that students often fall into is picking something too complex and not having the time to finish it. Consult with me.

This is an example of a good design plan; feel free to model your own project proposal after this one.

Final Submission – turn in via Moodle by 9pm Wednesday, November 24

You must submit the following:

Evaluation

A note on correctness vs complexity: correctness is the most important factor. A simple text-based program that runs correctly, is error-free, and achieves the above specifications will get a better grade than an incredibly smart chess program that crashes and produces unreadable output.

To reiterate: It is most important to submit something that works. Set modest goals and achieve them first, then enhance your program later. Get the basics of the simulation working before adding user input. Only work on getting computer intelligence working after you have the basic game working with human player(s).


Bagels

Bagels is a two-person paper-and-pencil game that is similar to but simpler than Mastermind. One person thinks of a 3-digit number, and the other person tries to guess it. The 3-digit number is not allowed to have repeated digits, but it may begin with a zero (so 012, 987, and 361 are legal, but 112 and 303 are not). The Guesser makes a 3-digit guess. The Responder compares the guess to the actual mystery number, and responds to the guess by some combination of the words “Pico”, “Fermi”, and “Bagels”. The Guesser keeps guessing until the guess is the mystery number. Here are the response rules:

For example, suppose the mystery number is 395. Here are a few guesses and responses:
246 Bagels
037 Pico
105 Fermi
309 Pico, Fermi
395 Fermi, Fermi, Fermi.

If you choose this project, your program should will play Bagels with you, both as the Guesser and the Responder. Having the computer act as Responder is fairly straightforward. Having it act as Guesser is trickier, but fun.


Acknowledgments: This assignment description is modified from previous ones written by Amy Csizmar Dalal, Sneha Narayan, and David Liben-Nowell.