CS 111: Introduction to Computer Science

Final project

Due: 5:00PM Monday, November 23. Submit in a folder called "final".

You may work alone or with one other person from the class.

Choice #1: A graphical 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.

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

Choice #2: A game

Write a game program that is enjoyable to play.

There are lots of ways to approach this problem. You can choose an asymmetrical two-person game like Mastermind, where the computer doesn't have to be too bright, but the game is still fun for the person playing it.

Given the experiences you have had this term with graphics, you could also try a one-person graphical game like Tetris or minesweeper. For games of that sort, you'll probably need to give the user a way to use the keyboard and the mouse in interaction with a graphics window. The sample programs clickablewindow.py, typeablewindow.py, and twowindows.py should help you get started.

Alternatively, you could pick a game that requires a smart computer. For example, making the computer play tic-tac-toe (2D or 3D) or Bagels or dots-and-boxes intelligently is an interesting problem. You could even take a harder game like Boggle, and make the computer generate a random Boggle board and then search the board for words and print them all out. In the end, the approaches can be: make the game fun, make the computer smart, or both.

You only have two weeks, and you have an exam in the meantime, so pick a game that's simple enough that you can get the job done in time. Tic-tac-toe is simple enough, but Hearts probably is not. A simple text adventure (like Zork, if you've ever heard of it) is manageable. Chess is not.

If you want some more ideas of appropriate games, let me know.

Choice #3: Your own idea

Have a good idea of your own? Talk to me about it.

Grading criteria

What to hand in

By 5:00PM Monday, November 23: Hand in your source code and any other files your program needs. Also hand in a file called readme.txt, containing a summary of the status of your program. Tell me what your program does, what isn't working, how to use it, what bugs you know of, etc. Anything you want me to know about your program should go in readme.txt.

Put all of your files into a folder called "final", and submit it in the usual way to your hand-in folder. If you need to submit one or more revisions, call them "final2", "final3", etc. so I'll know which one to grade.

Have fun

And have a great break, too.