Massachusetts Institute of Technology
Department of Electrical Engineering and Computer Science
Project Amendment Number 1
6.170 Handout 29
Handed out on April 5, 1994
1 The UNDO Command
The customer of the antichess program (i.e., your TA) has just noticed
that an important requirement was inadvertently dropped from the
initial requirements specification. The missing requirement is that an
UNDO operation should be available to the human player. The UNDO
command allows the human player to take back moves. The UNDO command
needs to be enabled only when it is the human player's turn to make a
mov. When the UNDO command is issued, the most recent pair of moves is
undone, and it will be the human player's turn to move again. The
board and the timer clocks revert to the states they had immedi ately
b efore the h uman pla y er had his/her last move. The user should be
able to back up to the beginning of the game by issuing the UNDO
command repeatedly . You must amend the save file format to add extra
information, so that the UNDO command can be used on saved games to
undo past the point at which the game was saved. However, your program
must be downward-compatible , i.e., it must be able to load games in
the old format, although the user will not be able to back up past the
point of the save in such games.
Project Amendment Number 2
6.170 Handout 30
Handed out on April 14, 1994
The HINT Command
A new command called HINT is b eing added to the antichess
program. This command provides the human player with the facility of
asking help from the program about the next move the human player can
make. The HINT command needs to be enabled only when it is the human
player's turn to make a move. The clocks of the human player or the
machine player should not be tic king while the program is generating
a hint. When the HINT command is issued, the antichess program
computes a reasonably good valid move for the human player and
displays it on the screen. It is up to you to decide how much time to
take for generating this move or how good the move should be. Make
sure that you document your design decisions for the HINT
command. Your next submission, i.e., the oral presentation, should
discuss how you have incorporated the HINT command in your design.
Project Amendment Number 3
6.170 Handout 32
Handed out on April 21, 1994
The FLIP Command
A new command called FLIP is being added to the antichess program. The
FLIP command allows the human player to change sides at any time. The
human player will still begin a new game playing white, and will move
first. On his/her turn, the human player may issue the FLIP command;
the human now plays black and the computer plays white. The board
position remains the same. The human player should be able to issue
the FLIP command as many times during the game as desired, changing
sides each time. Note that after the human flips sides, it is the
machine player's turn to make a move. It is up to you to decide which
clock is to be assigned to the human player after the flip. You may
have to make other design decisions to support the FLIP command; be
sure to document them.
Spec Amendment
There are some spec amendments to the machine player interface; you
must conform to these changes. The game file format is augmented to
include the color that the machine player is playing. The format and a
sample initial board configuration is shown below.
<game-file> ::= <machine-player-color> newline
<next-turn-color> newline
<timeleft> newline <board>
B W 300.0 300.0
rnbqkbnr
pppppppp
--------
--------
--------
--------
PPPPPPPP
RNBQKBNR
When a new game is started, the machine player is set to play
black. When the board configuration is loaded from a file, the referee
must inform the machine player of the color it is supposed to
play. Note that this information is already included in the board
argument (which corresponds to the game file format) of machine
player$reset.