CMPS109 Programming Assignment 4 and 5
Objective
The objective of this assignment is to make use of C++ and templates and STL to
in a project of interest to you. You can request to work with a partner - in
which case you need to make clear in the report who did what. If you are
building on previous work or work to be used in another course as well - mention
this connection. Be realistic but ambitious - so the project can have some
minimum readily achievable goals, but if these prove easy you can go on to a
more interesting implementation.
Phase 1: February 20: Problem Choice - indicate what you intend to do (and if
it is with a partner) - 1 page.
Phase 2: February 27: First Results - working code demonstrating basics
(counts as assignment 4) - man page and discussion.
Phase 3: March 15: Final Results - more complete discussion - also be
prepared to give a 10 minute in class presentation On either March 13, or March
15.
Default Problem 1:
Implement two methods for finding a Hamilton Path in a graph. One of these will
be the Pohl/Warnsdorf heuristic - to be described in class. The other method
can be of your own choosing. You may expand on your pre-existing graph class to
solve this problem.
You should experimentally test both methods and plot results for an interesting
class of graphs - such as large sparse graph of near uniform degree.
Default Problem 2:
In chapter 8 of the text the predator prey simulation is given. Do a redesign of
this code to make it a template/STL based piece of code. Avoid inheritance. Add
some features that extend the text's example such as a new life form.
Discuss your redesign as to why it is better(or worse) than the text use of
inheritance.
Default Problem 3:
Implement a simple interactive poker program where the program plays
intelligently. The program should be matched "heads up" gainst a human
player. Both players will start with 1000 units - with bets and raises
being only one unit (limit poker).
Here, a convenient interface and the intelligence of the algorithm will determine
its playability.
Turn In:
Phase 1: 1/2 - 1 page doc describing problem choice and preliminary design
Phase 2:
- Code
- Man page
- Short doc describing design and implementation
Phase 3:
- Code
- Results: calculations and comparisons for default problem, or similar
information for the alternative problem.
- Complete discussion of results, design, and implementation.