CS 117: Final Project
Assigned on Wednesday, 3/6/02
Due on Saturday, 3/16/02 - no grace period! (Carleton policy)
Overview
Create a computer game. You can approach this with the goal of making the game
fun to play, making the computer play well (even if it's not much fun for the
user), or both.
Good games to implement include Bagels (see description at the bottom of this
document for details), 3D Tic-Tac-Toe, Blackjack, Cribbage, Dots and Boxes,
Battleship,....
Let me know if you have questions about the rules or suitability of a particular
game. I recommend that you send an email or talk to me about your choice of
project to make sure that you haven't picked something too easy or too hard.
Your project must incorporate the following:
- File Input/Output. How you wish to incorporate this is up to you. One possibility
would be to have a game where you could save your current game and restore
it later. Another possibility would be to have a file with information to
lookup, such as the current year's rules for MahJong..
- Some level of computer intelligence. In some sense, the computer should
play against you or manage your game in some kind of intelligent way. Since
this isn't a class in Artificial Intelligence, I don't expect the computer
to necessarily be able to a world class player at your game (or even close)...
but I'd like to see some kind of effort here.
Thoughts on grading
I will grade the projects based on the following factors:
- How cleanly the program runs... is it bug free? Does it crash?
- Complexity... a chess program that will beat Garry Kasparov is clearly
cooler than a program that flips a coin.
- Style.
The first factor above is most important. A program that runs correctly, error-free,
and achieves the above specifications will receive better grades than an incredibly
smart chess program that crashes and provides unreadable output. Of course, given
two programs side-by-side that run perfectly, the one that accomplishes more will
receive the better grade.
To reiterate: It is most important to submit something that works.
The final submission (due Saturday 3/16/02 - no grace period!)
In addition to submitting your java files, you should submit the following
items of documentation in the README.TXT file that is part of your BlueJ
project. You may be brief.
-
A description of your program and its features.
- A brief description and justification of how it is constructed (classes,
arrays, etc.)
-
A discussion of the current status of your program, what works and what
doesn't, etc.
You may handle input/output via javabook classes, or via the terminal window.
Choose whichever you prefer.
Rules for 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 may have no
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:
-
If the guess has no digits in common with the mystery number, the answer
is "Bagels" or "B."
-
If the guess has a digit in common with the mystery number, and the common
digit is in the same position in both numbers, the responder says "Fermi"
or "F."
-
If the guess has a digit in common with the mystery number, but the common
digit is not in the same position in both numbers, the responder says "Pico"
or "P".
For example, suppose the mystery number is 395. Here are a few guesses
and responses:
246 B
037 P
105 F
309 PF
etc.
Note that if there are Picos and Fermis in the same response, all the Picos
should be reported first. That is, you'd never say "PFP," thus suggesting
that maybe the middle digit of the guess was the one in the correct position.
Instead, you'd say "PPF," regardless of which digit was the Fermi, and
which two were the Picos.
If you want more clarification of the rules of Bagels, let me know.
If you choose this project, you should write a program that will play Bagels
with you, both as the Guesser and the Responder. Having the computer act as
Responder is fairly straight-forward. Having it act as Guesser is trickier,
but fun.