Handout F5

Quick links:

Contents:

Introduction

You will extend your antichess implementation to include power-up items. A power-up is an item on the game board that affects the game state when captured by a chess piece (i.e. the piece that lands on the square containing the power up). Your implementation's AI must be able to incorporate the effects of power-ups into its decision making, and your implementation's UI must be able to display and interact with power-ups.

All other rules of standard antichess apply.

Power-Ups

A power-up item is an item on a chess board that affects the game state when captured by a chess piece. Once captured, the power-up item will induce its effect on the game, and then be removed from the chess board. A positive or negative effect can be experienced when landing on a power-up. Power-up items cannot move, and are all placed at the beginning of the game in empty locations before any player's turn. All power-up item effects are public and their placement is defined at the beginning of the game through the PROPERTY_POWERUP_PLACEMENT property in the gameProperties parameter of AiPlayerFactory.createPlayer() method (Power-up placement is random and symmetric). Kings are not affected by power-ups, they can capture a power-up without having an effect.

Note: A power-up item is non-blocking, such that a piece like a bishop or rook could pass through the square without activating the power-up. The power-up will only be activated when a piece captures the power-up by moving to its exact location, not just passing through. Hence, a power-up is non-compulsory. Therefore, a piece is not forced to capture a power-up if it is able to. The powerups do not affect any normal legal moves in antichess (i.e. if the move was legal under normal antichess rules, then it is still legal with the new rules. The only effect powerups have is the specified behavior triggered upon occupying a location where it is placed).

There will be 3 types of power-ups that your implementation must support:

Game File Format

The images directory has been augmented to account for the different power-up images.

The rule set string for antichess with this amendment is "6170-fall-2007-powerups".

The game file schema has been modified to account for power-up items. There are now three more piece types: "powerup_upgrade", "powerup_destroy", and "powerup_spawn". All power-ups have a "neutral" side.

User Interface Requirements

The UI must support power-up items in the following ways:

  1. The UI must be able to display the power-up items on the board.
  2. The UI must allow power-up configuration and board placement for Human players.

Artificial Intelligence Requirements

The AI must support power-up items in the following ways:

  1. The AI should incorporate the effects of power-ups into its decision making.
  2. Your implementation's AI will be tested against the tournament server's reference player, which may or may not have power-up intelligence.

Antichess Tournament

You must ensure that you support the new rules in order to compete in the tournament. The tournament will run with both pre-amendment and post-amendment rulesets. Any illegal move in the tournament results in disqualification.

The tournament will be run with the antichess.mit.edu software on multi-core machines.

Tournament Timing

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 AiPlayer.getMove().

This will have no effect 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.

Draws

To avoid over-conservative play, the tournament will score a draw in the following two situations:
  1. The same board position has been repeated three times (the "Threefold repetition" rule). Positions are considered the same if the same player has the move, pieces of the same kind and colour occupy the same squares, and the possible moves of all the pieces of both players are the same.
  2. the last 50 moves have not involved a move of any pawn or a capture of any piece (the "Fifty move rule").

Draws are considered after any other end-game situations. For example, if the third repetition of a position results in a white's winning by checkmate, then white wins and a draw is not scored.

Wins score 3 points for the winner and 0 points for the loser; draws score 1 point each for the winner and loser. Note that, unlike in FIDE chess, draws are scored automatically by the tournament referee; they do not have to be requested.

Neither your Text UI nor your GUI needs to support draws, but your machine players may wish to know about them to avoid a draw if a win is possible.

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.

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.

Q & A

This section lists clarifications and answers to common questions about the amendment.

Q: Power-ups must be captured. However, this term doesn't work for pawns who have "moves" and "captures" that are different. What are the rules for a pawn?

A: For pawns, only moving onto a power-up is considered "capturing" the power-up. The pawn cannot diagonally capture or perform en passant on a power-up.
UPDATED: A pawn MUST diagonally capture a powerup if this enpassant move is forced on it by an enemy pawn.

Q: For the upgrade power-up, "If a pawn is upgraded while making an en passant, the move will not be counted as an en passant move, but rather a regular move." What does it mean to not be an en passant move?

A: If the pawn previously moved 2 squares and upgraded itself to a queen in a position that would have allowed an en passant move, the en passant will no longer be possible. En passant only works with pawns, so now that the pawn has been upgraded to a queen, en passant can no longer occur.

Q: Can we add more stuff to the XML save game files?

A: Yes, you can, provided the XML file still validates with the schema we provide. For example, if you decide to make one player timed and another player untimed (like our sample input file provided) and have that information saved into the XML file, you may add additional information in the XML file to do this. Otherwise, you can choose to keep to our default file specifications where both players are either "timed" or "untimed".

Q: Is the updated save game file schema available?

A: The updated schema has now been posted

Q: For the spawn powerup, what does "clockwise (...) relative to the capturing piece" mean?

A: This is referring to the spawned piece location, relative to the capturing piece locaation. The direction is clockwise when looking on the board from white's side.

Q: What does "random and symmetric" mean in the powerup spawn location description?

A: The placement is symmetric relative to the board's center point, so as to be fair to both sides.

Q: Do we have to force symmetry when allowing user to define custom powerup placement in the GUI?

A: No.

Q: What are the amendment requirements for TextUI?

A: You should be able to play amendment games from TextUI, but there is no requirement for user-defined powerup placement. The only way to start an amendment game from TextUI is by loading a save game with powerups.

Q: Can spawned pawns do a double-step?

A: No.

Q: Do powerup effects apply before or after the piece moves?

A: After.

Errata