gdritter repos documents / master posts / 4d-chess.md
master

Tree @master (Download .tar.gz)

4d-chess.md @masterview rendered · raw · history · blame

Back when I was an undergrad, I designed a family of four-dimensional
chess variants. I have no idea how they play: I have literally never
convinced another human being to play them with me, in part because I
only ever implemented them as buggy software, and playing them with
analog equipment is tedious and error-prone. But still, it seems like
a shame to let the idea languish, so I'm going to describe my approach
here, in hopes that it provides at least passing interest.

## The "Board"

There's a trick to visualizing and working with discrete chunks of
higher-dimensional spaces: you can always look at an _n_-dimensional
space with _k_ discrete chunks as _k_ instances of an _n-1_-dimensional
space. A basic example: a three-dimensional space, divided into
three discrete chunks, can be displayed as three two-dimensional spaces:

[image here]

This obscures the connectivity of the space a bit: if we're talking about
a 3D game in which a token can move one space at a time, then a token here

[image]

could, in one 'turn', move to any of these places:

[image]

It does mean that our visual is a bit misleading: it looks like the
piece is 'hopping' from one 'square' to the next, but the squares here
are a fiction to make it easier to see every part of a 3d space on a 2d
web page. It'd be like having a dynamic map of each floor of a building
set next to each other:

[image]

A person going upstairs here, viewed on a 2D map like this, would "jump"
from one map to the next, in the same way that a piece moving upwards in
our 3d game-space would "jump" from one square to the next.

Now, we apply the same approach to a four-dimensional space, it means we
can split apart a four-dimensional object into multiple three-dimensional
"slices":

[image]

And again, we can split that three-dimensional object into several
two-dimensional slices: our 3×3×3×3 hypercube has become three 3×3×3 cubes,
which in turn became three sets of three 3×3 grids:

[image]

In a two-dimensional space, we have four possible cardinal directions:
_up_, _down_, _left_, and _right_:

[image]

In a three-dimensional space, we add two new directions, which I will
call _in_ and _out_:

[image]

And in a four-dimensional space, we add two _more_ directions, which are
traditionally called _ana_ and _kata_:

[image]

So here's a 3×3×3×3 hypercube, sliced into sets of sets of grids,
and all the possible non-diagonal 'moves' for a piece sitting at the center,
each labeled with the cardinal direction to which it corresponds:

[image]

Whew!

So, my original plan called for a 5×5×5×5 hypercube as the board. This means
that there are a lot more _positions_ than on a standard chessboard: an
8×8 chessboard yields 8×8=64 possible locations, while a 5×5×5×5 board yields a
whopping _625_ positions. On the other hand, a four-dimensional board has a
_lot_ more connections and paths: on a 2d board, a given square is bordered
non-diagonally by four squares, and another four diagonal squares:

[image]

On a 3d board, you'd have six non-diagonal connections and _twenty_ diagonal
ones:

[image]

And on a 4d board, you'd have eight non-diagonal connections and _seventy-two_
diagonal ones:

[image]

Part of what that means is that you have a tradeoff when it comes to board size:
a 3×3×3×3 board would only have 81 spaces, making it a lot closer to a
classic chessboard size: on the other hand, almost every spot on that board is
_closely adjacent to_ another spot: a piece in the center is literally diagonally
adjacent to every single space on the board! On the other hand, if we try to take
a cue from traditional chess-board sizing and used an 8×8×8×8 hypercube, we'd have
a board with 4096 possible positions: a piece, hopping along cardinal directions
from the bottom-left inward ana-most corner and hopping _towards_ the top-right
outward kata-most corner would have to take 32 stepsand that's just for one
piece!

So we need some middle ground, and my completely unscientific kneejerk thoght
is that 5×5×5×5 gives us enough space without giving us too much space. That
might be wrong! But let's run with it for now.

## Moving in Four Dimensions

What does it mean to move _diagonally_ in two dimensions? Pieces in chess
usually move _horizontally_ or _vertically_, which means they move in exactly
one cardinal direction at once:

[image]

Or they move _diagonally_, which means they move the same number of squares in
two _orthogonal_ cardinal directions at once:

[image]

Well, what if we start moving this to three dimensions? We can still move in
one dimension: left, right, in, out, up, or down. This isn't a standard
term, but because we're moving in _one cardinal direction_, I'm going to
call this a _1C_ movement:

[image]

We can also move diagonally in roughly the same way as before: we can move
the same number of squares in _two orthogonal_ cardinal directions, or a
_2C_ movement:

[image]

But there's another way to move diagonally, two: the same number of squares
in _three orthogonal_ cardinal directions: here, we're moving right, up, and
in, all at once, in a _3C_ movement:

[image]

That was in just three dimensions: in four, we have the _1C_ movements

[image]

The _2C_ movements:

[image]

The _3C_ movements:

[image]

And, of course, the _4C_ movements:

[image]

## The Pieces

Well, let's come up with some pieces, shall we? Pawns are the "most basic"
piece, but how they move is in some ways harder to define than the other
pieces, so I'm going to leave them for a lot later. I will, however,
propose a piece that's _slightly_ more powerful: a **Squire**, which can
move one hop in any _cardinal_ (non-diagonal) direction:

[image]

We don't have any trouble tackling **the Rook**, which in 2D chess can
move as far as it wants in any one cardinal direction. Let's stick with
this and generalize it: our rook can make _any unrestricted 1C movement_.

[image]

That gives us an approach for **the Bishop**, too: in chess, it can move as
far as it wants diagonally, so our bishop can make _any unrestricted 2C
movement_.

[image]

This also suggests another piece or two not present in chess: we could,
for example, have a piece which can make _any unrestricted 3C_ movement,
something with no proper chess analogue. The logical corresponding
name for this piece is, of course, **the Trishop**.

[image]

We could also propose a **Quadshop**, but my instinct is that it would
be too restrictive a set of moves. For completeness' sake:

[image]

How about the **Knight**? It moves in a characteristic _L_ shape which
doesn't get covered by our movement descriptions, but we can describe
it at a high level as _one step in one direction, two in an orthogonal
direction_. We can keep this same description and allow any two orthogonal
cardinal directions to be chosen, to get a piece that moves like this:

[image]

This is another movement we could play with: what if, instead of _one
step in one direction, two in another_, we lengthened it, to _two
steps in one direction, three in another_? Let's call this more far-reaching
but unwieldy piece a **Baronet**:

[image]

Or, we could add another step in a third direction, orthogonal to the other
two, and have another knight-like piece: let's take this piece, with
_one step in one direction, one step in an orthogonal direction, and
two steps in a direction orthogonal to both the first ones_, and call
it a **Marquess**:

[image]

What does a **Queen** do? Well, in typical chess, she is allowed any _1C_
or _2C_ movement, so we should allow to use any _3C_ or _4C_ movement,
as well. She _is_ the queen, after all:

[image]

And a **King**, like chess, should be able to move a single jump in any
directionwhich is to say, it can move the same way as a Squire:

[image]

## Towards A Notation

There were lots of repeated patterns in the definitions above: various
kinds of "diagonality", number of steps, knight-like movements I've
already started using a shorthand notation for the different kinds of
straight linesthat is, `1C` through `4C`—so let's extend that notation
a bit more:

* If I don't care about the number of directionsfor example, in the case
  of the Queen, who can travel in any straight lineI'll use a star instead
  of a number: a Queen's motion can be described as `*C`.
* If I want to limit a piece to a particular number of steps, then I'll
  mark it with an `@`: so, a King's motion can be described as `1@*C`, which
  is read as _one step in any direction_. We can think of a notation like
  `3C` as being the same as `*@3C`.
* A knight-like sequence of moves in orthogonal directions is written
  with a slash: a Knight's motion is therefore summed up as `1/2`.

With this notation, we can concisely describe all the "pieces" given
above:

------------ ------------
  Squire      `1@1C`
  Rook        `1C`
  Bishop      `2C`
  Trishop     `3C`
  Quadshop    `4C`
  Knight      `1/2`
  Baronet     `2/3`
  Marquess    `1/1/2`
  Queen       `*C`
  King        `1@*C`
------------ ------------

This is just one possible notation, and I'm not convinced it's the best
onefor example, if we admitted variables, then we could use the knight-like
notation to represent