[Back to assignment handout]
In this assignment, we study a simplified version of Chess called Minichess (in fact, there are multiple variation of Minichess that you can read about on Wikipedia), which we introduce on this page. We want you to be familiar with the terminology and rules as you work through the assignment, but you are not responsible for implementing anything on this page! In the assignment starter files, we have provided a Python library that represents and visualizes Minichess games—you will benefit from abstraction by using this library to complete this assignment, without worrying about how it is implemented.
Minichess is a game with two players, called White and Black. Each player starts with eight pieces, arranged in a 4-by-4 board. The pieces always start in the following locations, called the initial game board:

The game proceeds with players alternating taking turns, starting with White. On their turn, a player makes a move by choosing one of their pieces and moving it to move to a different square, which may be empty or occupied by one of their opponent’s pieces.
Each type of piece has a name and different rules governing its movement:
| Piece type | Movement |
|---|---|
Pawn ![]() |
Can move forward one space into an unoccupied square, or can move diagonally forward one space to capture an opponent’s piece. |
Rook ![]() |
Can move and capture by travelling any number of spaces horizontally or vertically. Cannot jump over other pieces. |
Queen ![]() |
Can move and capture by travelling any number of spaces horizontally, vertically, or diagonally. Cannot jump over other pieces. |
King ![]() |
Can move and capture by one square in any direction, including diagonals. Cannot move into a square that would allow it to be captured by the opponent’s next move. |
The objective of the game is to capture the opposing player’s king. If it is your turn and your king is currently threatened (can be captured) by at least one of your opponent’s pieces, you must make a move to prevent this capture:
A Minichess game can end in three ways:
If you are familiar with the rules of chess, there are a few differences between Minichess and Chess to be aware of:
When humans play Minichess or chess, we can make moves by physically moving pieces (when in person) or clicking on a graphical interface (online). But for computers to process chess games, we need a simpler way of encoding moves that is easy for a Python program to process. This section describes how we’ll use strings to represent Minichess move (The notation we’ll use here is similar to standard chess algebraic notation, but simplified for the purposes of this assignment).
First, we assign coordinates to the 4-by-4 board as follows:
a,
b, c, or d, from left to
right.1,
2, 3, or 4, from bottom to
top.
Second, a move is represented as a string of four characters, where the first two characters are the column and row of where the piece started from, and the last two characters are the column and row of where the piece moved to.
For example, the string 'a2b3' indicates that a piece
moved from the square at “column a, row 2” to
the square at “column b, row 3”.
You might wonder how we know which piece was actually moved, if we
only know the coordinates! It will be the responsibility of one of our
provided Python classes (MiniChessGame) to keep track of
the state of the board, so that it knows which piece is at which square.
We discuss this more on the assignment
handout.