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

Tree @master (Download .tar.gz)

4d-chess.md @masterview markup · 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 steps—and 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 direction—which 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 lines—that is, 1C through 4C—so let's extend that notation a bit more:

  • If I don't care about the number of directions—for example, in the case of the Queen, who can travel in any straight line—I'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 one—for example, if we admitted variables, then we could use the knight-like notation to represent