Due date: 3/24 : 11PM
Objective: to design and implement an interactive (GUI) player so
that you learn to play the game
Playing Ingenious: It is time to learn to play
Ingenious against your best players. Also, you have grown older and it is
time to program against your own API to test whether the description is
Task 1: Design and implement a strategy -- against
your existing, unmodifiable
strategy API -- that allows a
person to pick the next tile placement. We dub this form of strategy
You may not change any pieces of your implementation.
The hci strategy must force the person to pick a tile placement in
a specified number of seconds [default: 60], and it
must not allow the person to pick an illegal tile placement.
Also implement a test harness that consumes a player's state, applies
the hci strategy, and thus determines the next placement. The harness
must consume specifications of the following form:
Tile Tile ...
<placement c0=Color d0=Nat a0=Nat c1=Color d1=Nat a1=Nat />
<score orange=Nat red=Nat green=Nat yellow=Nat purple=Nat blue=Nat />
<tile c0=Color c1=Color />
a natural number in string form.
interval attribute specifies the waiting time.
Its XML output is a legal tile placement or a 'time out' message:
Report only the first placement if the chosen placement in the given
context produces more than one placement per turn.
is one of
Draft a memo on the decision to implement the human-player interface as a
strategy. The memo must argue for or against the idea based on your
experience, taking into account both the software engineering and the HCI
Deliverables: Your SVN directory must contain a
subdirectory labeled "10" with the following pieces:
HCI/ ... source files for the hci strategy implementation ...
xbuild ... builds an executable (if needed) by linking against files in 09 (or less)
xrun ... consumes a player configuration, displays it, and reports the result
xplay ... sets up and runs an Ingenious game for one human and one to five AIs
xplay script must allow you or someone
else to play a complete Ingenious game, against a randomly chosen number
of AI players.
If you so wish, you may also create a test directory with external test
cases as specified in the past. We will not
run a test fest,