Paper
Paper
• The task involves implementing an autonomous agent that can play the "Two Flags"
game using search algorithms like Minimax, Alpha-Beta Pruning, and MCTS
(Monte Carlo Tree Search).
• The agent must be able to play the game at a high level within a given time limit.
Agent Requirements
• The game is played on an 8x8 chessboard with two players: White and Black.
• Each player has 8 pawns, positioned initially on the second row for White and the
seventh row for Black.
o On their first move, pawns can advance two squares forward if both
squares are unoccupied.
o An opponent's pawn located in a square adjacent horizontally to a pawn that
has just moved two squares forward is allowed to be captured as if it had
moved only one square. This right is retained only for one turn (en passant -
capture in passing).
Winning Conditions
2. The board's bottom-left square is "a1", and the bottom-right square is "h1".
3. Moves are represented by source and destination squares (e.g., h2h4, h7h5).
• Performance against other agents will significantly impact the final score.
• The game will be managed using a dedicated server that follows the protocol:
4. The server sends a Time X command specifying the game’s time limit in
minutes.
6. The server then sends "Begin", signaling the start of the game.
9. The agent must support the "Setup" command to initialize a board position.
Example
Documentation and Explanation Requirements
In this section, you must answer all questions related to your implementation and provide
reasoning for your choices. Include code snippets when relevant.
1. What data structure did you use to represent the game board?
2. What data structures were used for the agent’s decision-making?
6. Does the agent compute moves while waiting for the opponent’s move?
9. Do you use it for only leaf nodes or also for pruning or/and also for inner nodes?
4. What were the minimum, average, and maximum expected search depths from
the algorithm?
7. Did you use forward or backward pruning? If yes what is the effect of the pruning
on the algorithm’s effectiveness.
2. What general principles regarding the “Two Flag” game did you learn from this
project?
Submission Requirements
5. At least one example of a game where the agent won in an interesting way.