Loading...
Loading WebAssembly module. This may take a while.
Option 1
+ Hint
Import Data
Export Data
Copied!
Settings
Game

When checked, submitting legal moves will be allowed even if the current board has checks.

Interface
Information

Welcome to 5D Chess Engine! This guide will help you go through its features.

To close this window, simply click anywhere outside the window. If you want to see it again, click the button on the bottom.

Viewport

The main area displays the chess boards. You can interact with the boards using mouse or touch:

  • Zoom - Use mouse wheel or pinch gesture to zoom in and out
  • Pan - Click and drag (or touch and drag) to move the view around
  • Select Piece - Click or tap on a piece to select it. If you are unsure which piece can be selected, you can turn on "show movable pieces" in the settings.
  • Move Piece - After selecting a piece, click or tap on a valid destination square to move it.

Control Panel

The control panel on the top right enables tree-shaped travsersal of game states by these navigation buttons:

  • PREV - Go to previous action (Shortcut: Arrow ↑)
  • NEXT - Go to next action (Shortcut: Arrow ↓)
  • UNDO - Undo last move (Shortcut: Arrow ←)
  • REDO - Redo move (Shortcut: Arrow →)
  • SUBMIT - Submit move (Shortcut: Enter)

To use the NEXT button, you need to expand the control panel and select the desired action first. Actions are added to the list as you submit the moves. If there are still more legal actions not on the list, pressing Hint button (Shortcut: H) adds a computed legal action to the list immediately.

Action Buttons

Action buttons on the bottom:

  • Focus - Center view on current board state (Shortcut: Space)
  • Screenshot - Capture and download board image
  • Import - Import game from Branched 5DPGN
  • Export - Export current game to Branched 5DPGN
  • Info - View this window
  • Edit - This feature is under development
  • Settings - Configure application preferences

HUD

The HUD (Heads-Up Display) on the top shows the status of the game. When expanded, it shows comments recorded during the game.

To edit the comments, expand the HUD and click the comment area. After editing, two buttons will show up. Click "Update Comment" to save changes or "Discard Changes" to cancel the edit. If you would rather delete the comment, please clear all text and click "Delete Comment".

The light indicator in the right shows board state:

  • Disabled - Normal board state, no phantom checks
  • Glowing Red - Phantom checks detected. Click the light to toggle phantom board visibility

Game Rules

While I am working on the documentation, for rules of 5D Chess with Multiverse Time Travel, please visit:

5D Chess on Fandom

This application implements the official rules of 5D Chess with Multiverse Time Travel. Click the link above to learn about piece movements, time dimension mechanics, and game objectives.

The Branched 5DPGN used by this application is similar to Shad’s notation. Take this f7-sacrifice game record as an example:

            [Mode "5D"]
            [Board "Standard"]
            1. e3 / Nf6
            2w. Bb5 {Be careful!}
            (2b. d5 {Another move})
            2b. c6
            3. c3 / cxb5
            4. Qb3 / Qa5
            5. Q>>xf7+ {f7-sacrifice!} / (1T1)Kxf7
            6. (1T2)Nh3 / (1T2)e6
            7. (1T3)e3 / (1T3)Qf6
            8. (1T4)Qh5*
            

At the top of each game record are several tags (headers) that define the background information of the position.

  1. [Mode "5D"] is unused. If the engine encounters an unknown tag, it records it silently without reporting an error.

  2. [Board "Standard"] indicates that the opening is Standard, meaning there is only one initial board.

    Two other preset openings are also supported: Standard – Turn Zero and Very Small – Open.

  3. If you want to play other openings, you may use [Board "Custom - Even"] or [Board "Custom - Odd"] to specify whether you are using an even or odd timeline. Use [Size "5x5"] to declare the board size (replace 5x5 with your desired size; up to 8x8 is supported). Then use 5dFEN to declare the starting board layout.

    If you do not specify whether the timeline is even or odd, the engine will determine it based on whether +0 or -0 appears in the 5dFEN. If you do not declare a board size, the default is 8x8.

    • For compatibility with other engines, [Board "Custom"] is also allowed and will simply be ignored.
    • If your record uses [Board "xxx"] and xxx is not a preset recognized by the engine, an error will be reported.
  4. The format of 5dFEN is:

    [<FEN>:<timeline>:<turn>:<color>]

    Example:

    [nbrk/3p*/P*3/KRBN:0:1:w]

    This indicates that on timeline L=0, turn T=1, there is a White board whose FEN is nbrk/3p*/P*3/KRBN.

    FEN stands for Forsyth-Edwards Notation. In general:

    • Lowercase letters pnbrqk represent Black pieces.
    • Uppercase letters PNBRQK represent White pieces.
    • Digits 1–8 indicate number of consecutive empty squares.
    • Slashes separate ranks.

    In 5dFEN, letters marked with an asterisk (only p*/P* r*/R* k*/K* w*/W*) indicate pieces that have not moved. These markers determine whether special moves such as castling are allowed.

    Some non-standard pieces are also supported. The engine supports the following pieces:

    • P — pawn
    • W — brawn
    • K — king
    • C — common king
    • Q — queen
    • Y — queen
    • S — princess
    • N — knight
    • R — rook
    • B — bishop
    • U — unicorn
    • D — dragon
  5. The notation of 5dpgn imitates standard chess PGN (Portable Game Notation). Its format is:

    <origin-board><piece><origin-square><jump-indicator><capture-marker><target-board><target-square>

    Where:

    • The board must be enclosed in English parentheses, e.g., (L1T2), meaning timeline L=1, turn T=2. L may be omitted. There must be no space between L1 and T2.
    • Piece letters must be uppercase.
    • Squares are written like a7. Files (x-axis, from White’s perspective left to right) use a–g. Ranks (y-axis, from White’s perspective bottom to top) use 1–8.
    • The capture marker is a lowercase x. If no capture occurs, omit it.
    • jump-indicators are > and >>.
      • > indicates time travel without creating a new timeline.
      • >> indicates the target board is in the past and a new timeline must be created.
    • If the move is not a time-travel move, there should be no jump-indicator or target board.
    • Castling may be written as O-O or Ke1g1/Ke8g8. Similarly, queenside castling may be written as O-O-O or Ke1c1/Ke8c8.
  6. Additional information may be appended to each move. The engine will read but ignore this information.

    • If a pawn/brawn promotes, append =Q at the end of the move. Replace Q with any uppercase piece letter.
    • You may append markers such as +, #, or * after a move, indicating check, checkmate, or soft mate respectively.
    • Shad’s notation defines formats such as ~, (~T6), (>L-5), etc. For example, Q>>xf7+ in the example may also be written as Q>>xf7+~ (~T1) (>L1). The engine can read these formats but will ignore them.
  7. Not all information must be written in full. As long as the information provided uniquely determines the move, parts may be omitted. The engine generates all legal moves and performs pattern matching; if unambiguous, it is accepted.

    For example, the first move e3 in the example would be fully written as (0T1)Pe2e3, but may also be written as (0T1)e3, (L0)e3, or simply e3.

  8. Each turn (half-move) consists of one or more moves separated by spaces. Before each turn, there should be a move number followed by a dot.

    • Black’s turn may be written as 2b. or with a slash /.
    • Correspondingly, White’s turn may be written as 2. or 2w..

    Within the engine, all moves in a turn are sorted in a standard order. This ensures that the player’s “next move” button matches the “next move” in the game record.

  9. Each turn may be followed by one or more comments enclosed in curly braces {}. Comments may be nested, but the number of opening and closing braces must match. The last comment will be displayed in the engine’s text window.

    • Due to standard sorting, if comments are placed elsewhere, the engine will ignore them.
  10. A 5dpgn record consists of multiple turns. All turns, including the final move, must be legally submittable turns. Turns may be separated by spaces or line breaks.

  11. Branching syntax: For variations, use the format recommended by @IceMoe. Parentheses represent branches, with the main line following afterward. For example:

                1.e4 e5
                (2. xx xx (3. xx xx) 3. xx xx)
                (2. xx xx)
                2. xx xx
                3. xx xx
                

    This indicates there are three possible moves on move 2.

    The parentheses of the last branch may be omitted. Therefore, 1.e3 / Nf6 2.Nf3 / d5 is equivalent to 1.e3 ( / Nf6 ( 2.Nf3 ( / d5))).

About 5D Chess Engine

Version 0.0.0

© ftxi 2024-2026.

Github Repository: https://github.com/ftxi/5dchess_engine

This software is free and distributed under the BSD 2-Clause License.

Resources

Icons: RemixIcon

Chess pieces: adopted from 5dchess-designer

Disclaimer

This Project was made without reference to source or decompiled code from the software "5d Chess With Multiverse Time Travel" developed by LLC. Thunkspace. All code, assets, libraries and other files in this project are either open source or made by myself.

camera

status