Wednesday, April 13, 2016

[zqczyawt] Higher dimensional chess

Chess can very straightforwardly be extended to higher dimensions.

The king moves 1 square in any direction (coordinates differ by 1).  As the number of dimensions increases, the Euclidean distance a king can travel in one diagonal move increases without bound.

The nonroyal Man (or Commoner) piece moves the same as a king.  We'll get to it later.

The queen moves any number of squares in the same directions as a king.

Consider a 5^d hypercube centered around a queen.  The knight can jump to any square in the hypercube that a queen cannot reach. The knight is very powerful in higher dimensions.

The bishop moves to the colorbound subset of queen moves.

The rook moves to the complement of the bishop moves with respect to queen, that is, the queen moves that the bishop cannot reach.  Note that this means the rook does not move strictly orthogonally: for example, in 3 dimensions, the rook can also move along the space diagonal.

The pawn moves one square forward toward the opponent, or 2 if the first move.  It can capture diagonally forward like a bishop.  Preserving how pawns can protect pieces only colorbound-diagonally maintains the "good" bishop/"bad" bishop ideas from 2D chess.  En passant works the same: a pawn may be captured by an opposing pawn during the first of a 2-step move.

Initial pieces: Fill the second rank entirely with a hyperplane of 8^(d-1) pawns.  On the first rank, 1/4 of the area is rooks, 1/4 knights, 1/8 bishops of one color, 1/8 bishops of the other color, 1/8 queens, 1 king, and the remainder "1/8 - 1" is man pieces (i.e., there are 8^(d-2)-1 men).

Initial locations shuffled like Chess960.  We probably want an algorithm to compactly and unambiguously specify an initial position from a number or a seed.

Castling is interesting.  The radical idea: only the king moves when castling in 3 dimensions or higher.  In 2 dimensions, after the king moves to g or c file, the rook would get trapped behind the pawn shield.  In 3 dimensions or higher, there is enough space for pieces to maneuver around the king after castling, so there is no need to untrap the rook during the castling operation.

One special corner of the 1st rank is designated the kingside corner.  When castling kingside, the king ends up 1 diagonal square away from the kingside corner.  When castling toward any other corner (one of the many "queenside" castlings), the king ends up 1 square inward from the analogous kingside destination.  In other words, imagine 2^(d-1) hypercube centered on the 1st rank, with the square in that hypercube closest to the kingside corner marked.  Translate the hypercube 2 diagonal steps toward any corner of the 1st rank.  The new location of the marked square is the destination of the king when castling to that corner.  (I think this is right.)

If the randomized initial position of the king is a castling destination, then it provides the player with the ability to pass exactly once, which might be useful for getting out of zugzwang.  Keeping track of an invisible right to castle is easily done on a computer board interface, and any realistic implementation of higher dimensional chess will be probably be done on a computer anyway.

If we wish to keep the prohibition of castling though check, then we require that there be some path of empty unchecked squares from the king's start location to the castling destination.  The path must be entirely contained in the 1st rank.  Along the path, the distance to the destination must be monotonically decreasing (nonincreasing): The king cannot take a windy path to the destination.

Determining the existence of a valid path probably becomes prohibitively complicated in very high dimensions, so it's probably best to eliminate both the prohibition of castling through check (but continue to prohibit castling in check) and the requirement that there be a path of empty squares to the castling destination.  Castling is permitted whenever the destination is empty, and the king jumps there.

Although chess can be thus extended to higher dimensions, there's no guarantee it will be a good game.  Maybe short forced checkmates exist from many initial positions, or "easy" forced draws, like in larger (2D) analogues of Dodgem.

Just for fun, we highlight 8-dimensional chess, played on a board with 8^8 = 16777216 squares.  Each player starts out with 2097152 pawns and an equal number of pieces.  It is certainly a large unwieldy game, probably impossible for humans to play.  Even with a computer, solving mate in 1 problems might take too long.

No comments :