Tutorial

This tutorial is meant for complete beginners to 5D chess. Knowledge of 2D chess is highly recommended, as 5D mechanics are based heavily on it.

## The four axes: rank, file, time, timeline

The very first thing that a beginner should understand well is the coordinate system used in 5D chess. Newcomers (especially those familiar with 2D chess) are often confused by piece movements, and this stems from a lack of understanding of the coordinate system.

In 2D chess, there are two axes: file (X) and rank (Y). In 5D chess, there are four: file (X), rank (Y), time (T) and timeline (L). Thus, four coordinates are needed to fully specify a square in a 5D chess game.

For example, in the above image the blue square is at timeline L2, time T3 (on white's board), file f and rank 4. In notation, this is written down as `(L2 T3 w) f4`, or `(2T3)f4` for short.

*Remark: For each time coordinate, there are two boards: one board with a white outline — on which white can play; and one board with a black outline — on which black can play. The color of the board is usually omitted, as it is implied by which player is currently moving.*

## The pieces

5D chess pieces move in analogous ways to their 2D counterparts, but their movements are greatly expanded due to the addition of the time/timeline axes.

### Rooks

Rooks can move any number of squares along one, and only one axis. In other words, they can move only in straight lines. In particular, note how the rook stays at the same rank/file when it moves through the time/timeline axes. This is the basis for some cool tactics unique to 5D chess.

Just as in 2D chess, a rook's path can be blocked by other pieces, and also enemy pieces in its path can be captured.

### Bishops

Bishops can move the same number of squares along two axes at the same time. Their paths are what we call diagonals; 5D chess differs from 2D chess in that the diagonals are not restricted to just the rank/file axes. They could be across the rank/time axes, time/timeline axes and so on. This leads to interesting situations like bishops attacking in straight lines into the past.

Just as in 2D chess, a bishop's path can be blocked by other pieces, and also enemy pieces in its path can be captured.

### Knights

Knights can move 1 squares along one axis and 2 squares along another axis. Their paths are a direct generalization of the 2D knight's moves. Just like in 2D chess, the 5D knight can "leap" over enemy pieces. When there are many pieces around, 5D knights can be tricky to deal with, because they have access to many more squares than other pieces like the bishop or rook, whose paths are often blocked.

### Queens

Queens can move the same number of squares in any number of axes. In other words, they can move in either straight lines, diagonals, triagonals, or quadragonals. (the latter two are diagonals but across three/four axes respectively). Due to its incredible mobility, 5D queens are by far the most overpowered piece; its relative value is much greater than the 2D queen's.

Just as in 2D chess, a queen's path can be blocked by other pieces, and also enemy pieces in its path can be captured.

### Kings

Kings can move 1 square in any number of axes. In most variants, the king is a royal piece, meaning a player wins by checkmating another player's king. Interestingly, a 5D king alone *can* checkmate the opponent's 5D king!

### Unicorns\*

Unicorns move any distance along a triagonal. This means the same distance along 3 axes out of the four (file, rank, timeline, parellel universe.) this property makes it that any Unicorn move must be to another board.

### Dragons\*

Dragons move any distance along a quadragonal. It must move the same distance along all of the 4 axes. This makes it usually valued less than pawns, as it can't even move without a parellel timeline.

### Princesses\*

The Princess is an alternate interpretation to how queens should move in 5D chess. Instead of moving in any number of straight lines like the queen, it can move like a bishop or a rook, but can't move like a unicorn or dragon. **This is different from a queen.**

## 5D mechanics

This section describes the game mechanics unique to 5D chess. The beginner may find this a lot to take in, and will likely be utterly confused at some point. Hence, we strongly advise beginners to get their hands dirty by playing against the AI, in addition to reading this section.

### Playable boards

In 5D chess, a move actually consists of a sequence of submoves on the player's playable boards.
In a given position, the set of all playable boards consist of the rightmost boards in every timeline.
Only the boards that are outlined with the current player's color can be selected and moved on.

Here's a simple example: there are two timelines and it is black to move. The highlighted boards are black's playable boards, because they have a black outline.

This is a more contrived example: there are four timelines and it is black to move.
The three highlighted boards are black's active boards (the other one has a white outline, so it is white's active board).
Note how the active boards are on different turns.

### Types of submoves

Roughly speaking, there are 3 different types of submoves that can be made on playable boards. The following examples are positions that continue from the simple example above.

#### Playable board to playable board: same timeline

Here, the bishop on L0 moved from e7 to d8 on the same timeline, and similarly the rook on L1 moved from a8 to b8.
Assuming that the playable boards were at turn 15, the single move consisting of these 2 submoves can be written down as `(0T15) Bd8 (1T15) Rb8`.
After each submove, the source and destination timelines will advance.

#### Playable board to playable board: different timelines

Here, the king moved from `(1T15) e8` to `(0T15) f8`. The move consisting of this single submove is written down as `(1T15)e8>(0T15)f8`. As with above, the source and destination timelines (L1 and L0 respectively) will advance.

#### Playable board to past board: branching

This is more advanced, and will be covered in detail later in the section on branching.
But just to give an idea, this is what a branching move looks like.
The knight at `(1T15) d7` moves to `(0T13) d7`, creating the new timeline L-1.

### The present

The present is represented by a vertical bar, and is always at the earliest playable board among all active timelines. It can move forward or back depending on if players branch to a past board or not. A player must move the present before they can submit a move.

Boards that are past the present do not have to be played in. In the branching diagram above, the knight at `(1T15) d7` moves to `(0T13) d7`, which moved the present back. Now that the present is behind T15, no move is required in the active board at 0T15.

### Branching

Past boards in 5D chess cannot be changed. So, whenever a piece goes back in time, it branches, creating a new board where the piece is in the new location. Branches are always created downwards from the view of the current player. Notation convention is that the 1st timeline is 0, white's timelines are +1, +2, etc., and black's timelines are -1, -2, etc.

In the branching diagram above, the knight at `(1T15) d7` moves to `(0T13) d7`, creating a copy of that board at (-1T14), except with a knight at d7. Meanwhile, the original board at (1T15) advances to (1T16) without the knight.

### Inactive timelines

A player can have up to 1 more active timeline than the other player. If a player would create a 2nd extra timeline, it is marked inactive and does not move the present. Inactive timelines can become active if the other player chooses to create new timelines to offset the timeline difference.