Chess
Back to EnvironmentsDescription
Chess is a strategic two-player board game where each participant controls an army of 16 pieces: one King, one Queen, two Rooks, two Knights, two Bishops, and eight Pawns. The objective is to checkmate the opponent's King, rendering it unable to escape capture. Players take turns making moves in UCI (Universal Chess Interface) format, strategically advancing their pieces to control the board, attack the opponent's pieces, and defend their own.
Action Space
Actions are strings representing a chess move in UCI notation, enclosed in square brackets.
Special Tokens:
- [<uci_move>]: To make a chess move
- Example:
[e2e4]
- Example:
Example Actions:
- "I advance my pawn to [e2e4]."
- "[e7e5]"
- "That's a brilliant move! [Ng1f3]"
Observation Space
Players receive a series of messages exchanged during the game, including their own and the opponent's moves, current board state, and available valid moves.
Initial Game Observation
[GAME]: Game started. You are playing White in a game of Chess. Make your move in UCI format enclosed in square brackets (e.g., [Move] e2e4). You can also include additional text in your messages. It's your turn. What is your move?
Board state in open mode:
r n b q k b n r p p p p p p p p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P P P P P P P P R N B Q K B N R
Step Observation
Player 0: I advance my pawn to [Move] e2e4. [GAME]: Player 0 (White) moves from e2 to e4. [GAME] r n b q k b n r p p p p p p p p . . . . . . . . . . . . . . . . . . . . P . . . . . . . . . . . P P P P . P P P R N B Q K B N R
Valid moves when show_valid=True:
[GAME] Valid moves: [g8h6], [g8f6], [b8c6], [b8a6], [h7h6], [g7g6], [f7f6], [e7e6], [d7d6], [c7c6], [b7b6], [a7a6], [h7h5], [g7g5], [f7f5], [e7e5], [d7d5], [c7c5], [b7b5], [a7a5]
Gameplay
- Players: 2
- Colors: Player 0 plays as White, Player 1 plays as Black
- Turns: Players alternate making moves, starting with White
- Move Format: All moves must be in UCI notation enclosed in square brackets
- Objective: Checkmate the opponent's King to win the game
Variants
Env-id | is_open | max_turns | show_valid |
---|---|---|---|
Chess-v0 | False | 30 | True |
Chess-v0-open | True | 30 | False |
Chess-v0-long | False | 50 | True |
Chess-v0-blind | False | 50 | False |
Contact
If you have questions or face issues with this specific environment, please reach out directly to Guertlerlo@cfar.a-star.edu.sg