CS 2360 Assignment 5: Due Midnight March 6
Connect 4 (Part 2)
For this part of the assignment you will be building an actual program
that plays connect 4. Obviously you should use your functions that
you implemented last time, if you have any confidence in them whatsoever.
The specifics of the assignment are to implement:
- Your comments should include a fairly extensive write-up of
your code. You should explain how you used the ADTs previously
created (in part 5) to create a solution. You should (of course)
also carefully explain the new structures for use with the
minimax search. You should also detail the functions used to
implement the minimax search, and how they work with the
data structures to accomplish their task. All of this should be
written clearly and concisely. Include enough detail to get across to
someone reading the code how it works. If you find other elements
of your code interesting, tricky, potentially confusing, not-quite-right,
etc. these should also be documented.
- c4-gen-board which takes a size as a parameter. This should
generate an empty board of the specified size. I am not sure how I
managed to miss this in the last assignment.
- You should implement a function called c4-choose-column which
takes (in this order) a board, the size of the board, the number of
lookahead levels for the minimax search, and the color of the player
whose turn it is. This should return a column number suitable for use
with c4-slide-in-column. This function should implement
a minimax search of the specified number of lookahead levels.
This function should (naturally) use an ADT to hold its data an
provide an abstraction to work on. A significant part of the grade
on the minimax search will be a reasonably well set up ADT for
use here (I called mine "c4tree") and the documentation
accompanying/explaining this ADT and how it used with
your alogrithm(s).
- Programs must be play connect 4 interactively with the user
if the command c4-simple-driver is entered at the terminal.
You are free to adapt/use my implementation to suit your needs.
Tournament Instructions
If you want to have your code considered for the connect four
tournament here is what you must do.
- Turnin your program by Sunday morning at 10am. We will begin
tournament play then. However, we will not grade the assignment
you submit for the tournament, so you must submit an assignment
to the appropriate TA by email by the normal time. This will be the
assignment for grading, and it is perfectly ok if it is different from
the one you submit for the tournament.
- Your c4-choose-column and c4-slide-in-column
routines must return (take) the parameter of the column
number beginning from zero and going up to size-1. This is so
programs can use each others output correctly.
- Programs which don't function are going to be eliminated immediately,
so you are probably better off making your program do something (and
not die) in every case rather than fine-tuning it for some small number
of cases.
Back To The CS2360 Home
Page
Ian
Smith (iansmith@cc.gatech.edu)
Last Modified
19 Feb 95 by Ian Smith (iansmith@cc.gatech.edu)