0

Chess is normally played on a square board. This means, the board state can be easily represented in a square 8x8 2-dimensional array.

On the other hand, Gliński's hexagonal chess is played on a hexagonal board.

A hexagonal chess board with 91 hexagons

I want to store this position in a multi-dimensional array. That is, an array with a specific length in each dimension.

I want the distance between chess pieces in the array to represent their actual distance on the chess board as closely as possible.

That means, a 91x1 array would superficially solve the problem but would not be representative of their actual locations on the board.

1 Answers1

2

Use oblique axes (with $120°$ angle instead of $90°$) with origin $O$ in the center of the grid and $x$ axis pointing to the cell numbered 6 in the North-East corner, $y$ axis pointing to the cell numbered 6 in the North-West corner.

For example, the cell where the Black Queen stays has (oblique) coordinates $(4,5)$, the cell where the White King stays has (oblique) coordinates $(-4,-5)$.

A move will be given by adding a vector to the present position

$$\begin{pmatrix}x\\y\end{pmatrix} \to \begin{pmatrix}x+a\\y+b\end{pmatrix}$$

with one of the following 6 forms:

$$\begin{pmatrix}a\\b\end{pmatrix}=\begin{pmatrix}1\\1\end{pmatrix} \ \text{or} \ \begin{pmatrix}1\\0\end{pmatrix} \ \text{or} \ \begin{pmatrix}-1\\0\end{pmatrix} \ \text{or} \ \begin{pmatrix}0\\1\end{pmatrix} \ \text{or} \begin{pmatrix}0\\-1\end{pmatrix} \ \text{or} \ \ \begin{pmatrix}-1\\-1\end{pmatrix}.$$

Coordinates $(x,y)$ are limited in this way:

$$\begin{cases}-5 \le x \le 5\\-5 \le y \le 5\\-5 \le x-y \le 5\end{cases},$$

the last line inequalities being due to vertical sides.

Jean Marie
  • 81,803
  • see as well https://opus.lib.uts.edu.au/bitstream/10453/2661/3/2005002959.pdf – Jean Marie Jan 07 '23 at 09:50
  • Wouldn't the cell of the black queen be (4, 5) then? That is, given the centre hex as 0, 0, stepping 4 towards the NE 6 hexagon then 5 towards the queen. – Richie Bendall Jan 30 '23 at 05:20
  • You are perfectly right (I think the confusion I have made is to take the black pawns lines as axes...). I fix it. – Jean Marie Jan 30 '23 at 09:42