Suggestions for Summer C.S. activities
Are you appalled at the thought of an entire Summer break with no
programming? Or just bored by the lack of homework? Or even possibly wanting
to get a headstart on the next semester? If so, I have some suggestions for
you:
- For a language you have already learned, brush up or practice it,
either with some homework exercises from the textbook, or another book
you have access to, or from something you find on the net that sounds
interesting, or from these projects.
- Learn a new language.
- If you have not yet completed CS110, Introduction to C++,
then you should probably first concentrate on C++, because the
Redlands programming sequence is based on it.
- Java
- A worthy alternative to C++ for any except the most
compute-bound problems.
- You can write GUI programs that work on any platform.
- You can write applets that run inside a browser.
- Python: www.python.org/ IDE
included. Huge libraries available. Quick start to writing
Python code. Advanced mini-tutorial.
- Haskell: haskell.org/ a functional
language. See how to work with infinite sets!
- Lisp/Scheme: www.plt-scheme.org/ the
pioneering functional language. Write functions which create new
functions!
- Prolog: www.swi-prolog.org/ Logic
programming. Write functions which can compute their own
inverses!
- Perl: www.perl.org/ often used to
build dynamic web pages, and for housekeeping tasks. Huge libraries
available.
- Professionalize your tools:
- CVS: Maintain audit trail of your source code [required for
CS220].
- Linux: get an account on our Linux box [required for CS230, useful
for CS220 and CS340].
- SSH: Secure connections between machines
- PuTTY: SSH for MS-Windows [required for CS230]
- Server maintence: some students may be allowed to participate in
the care and feeding of our Linux box: it needs to support Apache and
MySql.
- Databases are important.
- Analyze the interaction of computer science and society:
- Should reliability requirements of medical support systems, voting
systems, credit reporting and other systems with potentially high
impact on individuals influence the ethics and morality expected of
computer scientists? Can/should government require/sanction such
behaviors?
- Impact of encryption on speech, crime, opposition to government,
e-commerce, intellectual property.
Some projects to consider
Examples and code for many of these can be found on the web.
You will get the most out of the
exercise if you plan your approach and debug your code before you look at
someone else's solution. On the other hand, reading other people's code is
often illuminating, and is a worthwhile skill to acquire.
- Don't get sued: Honor copyright and licenses.
- Be honest: Provide proper source attribution.
- Remember that you must understand any code that you submit for a grade.
- Sieve of Eratosthenes:
- great practice with arrays, loops, and integer arithmetic.
- Shuffle:
- To shuffle a deck of cards correctly is a bit subtle. Try your hand
before peeking at the standard solution.
- Number theory:
- If you like number theory, you will love cryptography. To get serious
with it, you'll need to use a "large integer" package. Random number
generators fit here, too.
- Buffton's needle:
- compute pi with only straight lines, and NO trig functions!
- Hangman:
- grab a dictionary from the net.
- Poker:
- evaluating a poker hand is quite tricky. Define a class to represent
a card, and a class that collects cards into hands.
- Tic-tac-toe:
- Fairly easy to code after you decide on a representation for the
board.
- Four-in-a-row:
- Implementation is a lot like tic-tac-toe, but it does not have such
an immediate complete winning strategy.
- Battleship:
- Can be done at many levels. See following game comments.
- Series:
- Keep track of wins and losses over multiple game.
- Game graphics:
- Take some text-mode game that works, and display it nicely: pictures
for card games, hangman pictures, fancy tic-tac-toe layout, etc. There
are lots of bitmapped pictures on the net that you can use, just be
sensitive to copyrights.
- Game sounds:
- play an appropriate (or annoying!) noise after a hit or a miss,
etc.
- GUI interface:
- Convert (or re-write) your game to provide a true GUI interface. This
needs an event-driven program, and I don't recommend you do it in C or
C++ because you will have to learn a lot of things peculiar to a
specific operating system (whether MS-Windows, X-windows, or
Macintosh).
- Sockets:
- allow opponent on a remote machine / different operating system.
- Applet:
- allow your game to run inside a browser (especially easy with
Java).
- Client-server:
- allow multiple players. Don't try this with C/C++ if you have only one semester.
- Symbolic computation:
- create deriviative of an expression. Then simplify it. Hint: use
Python, Haskell, Scheme or Prolog.
- Strategy enhancements:
- Write a good/optimal strategy for one of your games. This tends to be
messy in an imperative language, so use Python, Haskell, Scheme or
Prolog.
- Machine learning:
- Don't write the strategy yourself, let your program learn it.
Decision trees, neural networks, and genetic algorithms can all be
competitive.
Arc of Games
Notice in the list above that there is a progression, or arc, to the game
projects. That is one of the appeals of game projects: You can always find
more to do. Of equal import when deadlines are imminent, you can often also
cut back on the requirements for games. For instance, in checkers, start out
without implementing Kings. The game itself will be less interesting, but you
can still demonstrate most of the same programming competence without
Kings.
In the area of game strategy there is a similar arc. In particular, when
implementing a computer player you should always start out with the
"random-mover" strategy. It will usually be a lousy player, but it does
exercise all the remaining parts of your system. (Ensuring that it generates
only legal moves is a great test of your legal-move-tester.)
Furthermore, the random mover provides a benchmark for measuring how good
your advanced strategies are. In particular, if a supposedly advanced strategy is beaten
by the random-mover, you have serious questions to address.
Finally, the random-mover is often the strategy to bootstrap your machine
learning method from.
Notice that the arcs have a natural bifurcation:
- increasingly
attractive interfaces, and
- increasingly competent play.
Even if
you take route (1) with sounds, client-server, etc., you are well advised to
keep a text-mode interface if you ever want to work on route (2).
Basically, to develop and test advanced strategies, you don't want to have to
have an army of people clicking away. And it is really convenient to be able
to have two computers play each other.
Return to my
home page
CVS $Id: summer.html,v 1.3 2004/12/15 18:56:44 paulmcq Exp $