| 6.170 |
Laboratory in Software Engineering
Spring 2002
Final Project (Antichess) Amendment: Board Holes
|
Handout F5
Contents:
Background
The 6.170 staff has enjoyed using your initial implementation, but
wants to introduce the possiblity of irregular board shapes.
You will extend Antichess to support missing squares. The missing squares,
or holes, will allow users to create their own boards of arbitrary shape.
The intent of this amendment is to test the extensibility of your
exisiting design and your group's ability to adapt to requirements
changes.
Board Holes
Your final product will have to support board holes in which pieces can not
land and non-knight pieces cannot cross. A pawn which is faced with a hole
will be promoted to a queen just as it would have if it were faced with the
end of the board. Regardless of board shape, a white pawn on the
2nd rank or a black pawn on the 7th will have the option of moving 2 squares
(assuming both of the squares are not holes and unoccupied).
It is clear that board holes can
significantly change the game play of antichess,
so computer players playing on non-standard boards aren't required to produce
anything better than random, valid moves.
It is not required that your final project provide an editor for boards, but
it must support loading, saving and playing games on non-standard (holy) boards.
Detailed Requirements
The Detailed Requirements
(Appendix 1) section of the original specifications are amended as
follows.
Game File Format
The antichess application must be able to load files of the following format, and must produce files which begin with the following format (additional lines may be added to store information like player types, names or levels). On consecutive lines the file format contains: next player, white time, black time, and 8 lines for board state with upper-case letters for white, lower-case for black, dashes (-) for empty, and spaces ( ) for holes. The following is a formal discription of the file format:
::= newline newline
::= black -- white
::= newline
::=
::= newline
::= - | |
::= P | p | K | k | N | n | R | r | Q | q | B | b
The fields in the file are:
- < next-turn-color > indicates which color moves next after the board is loaded.
- < timeleft > is two integers indicating the number of milliseconds left on each player's clock
(white player first).
- < board > describes the content of each of the squares on the board. The first < sq > in the first < row > corresponds to square A8 on the display, and the last < sq > in the last < row > corresponds to square H1. Each square is either empty (denoted by a hyphen), a hole (demoted by a space) or a < piece >. A < piece > is either denoted by
lower case letters for black pieces or upper case letters as white pieces (P = white pawn, p = black pawn, K/k= white/black
king, Q/q = white/black queen, R/r = white/black rook, B/b = white/black bishop, N/n = white/black knight).
As an example here is a load file for a standard initial board configuration. Time left for each player is 5 minutes (300000 milliseconds). In conventional layout, the white pieces are in the bottom two rows and black pieces in the top two.
white
300000
300000
rnbqkbnr
pppppppp
--------
--------
--------
--------
PPPPPPPP
RNBQKBNR
Here is an example with a non-standard board in which black is about to
promote a pawn.
black
20021
34210
-bqkb-
---pp---
--n--N-n
-- -- --
-- -- --
--------
---PP---
-BQKBN
Ambiguities
Parts of this amendment have been left intentionally vague. It is
up to you to decide what (if any) clarifications are necessary. You
should include any changes to your Revised Specification documentation
in your final submission on May 13.
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).
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.
For problems or questions regarding this page, contact:
6.170-webmaster@mit.edu.
$Id: amendment.html,v 1.1 2002/05/01 07:02:36 kalpak Exp $