...

/

Getting Ready: The Chess Game

Getting Ready: The Chess Game

Understand the chess game problem and learn the questions to further simplify this problem.

Problem definition

Chess is a strategy board game for two players on a checkered board of 64 squares in an 8x8 grid. Each player starts with 16 pieces: one king, one queen, two rooks, two knights, two bishops, and eight pawns. The goal is to checkmate the opponent’s king—this occurs when the king is in a position to be captured (check) and there is no way to move the king out of capture (checkmate).

Each piece has its unique movements. The rook can move horizontally or vertically, the knight can move in an L-shape position, the bishop can move diagonally, the queen can move in any direction, and the king can move one square in any direction. Pawns have the most complex movement rules: they can move forward one square, capture diagonally, and are subject to special rules such as a two-square advance on their first move, en passant, and promotion. Most pieces, except for the knight, cannot move through or over others. The game also includes special rules such as castling for the king and rook.

A chess game can end in a ...