| 6.170 |
Laboratory in Software Engineering
Spring 2004
Final Project (Antichess) Amendment: Undo Move, Move Now
|
Handout F3
Quick links:
Contents:
The only thing that the 6.170 staff loves more than playing antichess
is cheating at antichess; thus, you will be required to add two features
to your antichess application that will give human players a leg up
against your artful AI player:
- Undo Move - Allow a human player to undo his last move.
- Move Now - Force the AI player to decide its next move right away.
Both of these features should only be available to the end user
as circumscribed below.
The Undo Move feature should
allow a human player to undo his or her last move; thus,
- In a computer-computer game, this feature should be disabled.
- In a computer-human game,
this feature should be disabled if and only if
the human player has no moves to undo.
- In a human-human game,
this feature should be disabled if and only if
no moves have been made.
When a human player chooses to undo a move during his own turn,
then first his opponent's last move will be undone
and then his own last move should be undone.
If it is a timed game, then the opponent's clock
should be restored to the amount of time that it had
on it at the beginning of his last move while the human
player's clock should continue to tick down as a penalty for
invoking undo move.
When a human player chooses to undo a move during his opponent's turn,
then the opponent's turn will be interrupted and the human player's
last move will be undone. Again, if it is a timed game, then
the opponent's clock should be restored to the amount of time that it had
on it at the beginning of his last move while the human
player's clock should continue to tick down as a penalty for
invoking undo move.
The Move Now feature should allow a human player to force
the AI player to move within one second of when the user invokes the feature.
The move returned by the AI player may be the best move it found so far,
a random move, its favorite move, whatever basically anything
so long as it returns a legal move.
You must visibly enable the undo move
and move now features in your GUI only when appropriate
as described by the conitions above.
Consider using the
setEnabled()
method that every JComponent implements to indicate
the availability of each feature.
For whatever mechanism you decide to use to convey this information to
the user, it should make the available options obvious.
Your GUI should allow for human/human,
human/computer, and computer/computer games.
This amendment does not affect the API for the tournament AI player.
A player in the AI tournament will not be forced to have its move undone,
nor will it ever be asked to move immediately.
To avoid non-terminating endgames, the tournament may, but is not
required to, charge a full second of time for any move that takes less
than a second. This will be reflected in the time passed to
AntichessAiPlayer.getMove. This will have no affect on your code
requirements, but may have a slight impact on your AI if it keeps an
internal clock or relies upon making very fast moves.
Ambiguities
Parts of this amendment have been left intentionally vague. It is
up to you to decide what clarifications (if any) are necessary. You
should include any changes to your Revised Specification documentation
in your final submission on May 11.
Design Decisions
Spend some time thinking about the best way to incorporate this change
into your design. In your final design write-up, be sure to discuss
the changes to your initial design (and the relevant trade-offs).
Also comment on the effects of the introduction of the amendment
on your application's usability.
You will be graded on how easily your initial design can support the
amendment, and how cleanly you incorporate the amendment into your
design.
Change Log
This section will detail the changes made during revisions of this
handout. You may use the version number at the bottom of your
hardcopy to determine what has changed since you printed this handout.
Back to the problem sets page.
Back to the final project page.
For problems or questions regarding this page, contact:
6.170-webmaster@mit.edu.
$Id: amendment.html,v 1.7 2004/04/28 01:02:11 mbolin Exp $