Click the cells to add alternating Xs or Os (or more symbols). You can play against friends by each choosing a symbol to play, or you can play all sides and try to solve the questions before.
You win if you make a straight line all of the same symbol, it is a draw if the board gets filled in without any lines. A line needs to be the same length as the side length. In 3D and 4D, there are many possible lines.
I'm a particular fan of the 3x3x3 board on 2 symbols, and both the 4x4x4 and 3x3x3x3 board on 3 symbols. In fact the 4x4x4 board on 3 symbols was once the basis of the physical board game Qubic.
The 3D 3x3x3 board consists of 3 copies of the 2D board. The 4D 3x3x3x3 board consists of 3 copies of the 3D board. Ultimately the 4th dimension is just a list of 4 numbers as opposed to a list of 3 numbers. To visualize it, the game places the different copies of the 3D board off at a diagonal, much like how when you draw something in 3D on a 2D screen you use a diagonals to demonstrate the perspectives.
This game is designed to illustrate the Hales-Jewett Theorem in a field of math called Ramsey Theory. Choose a side length and a number of symbols. The theorem guarantees that there is some minimal dimension d such that there will always be a straight line of the same symbol. Or in other words, if you make the dimension large enough you can always get the order of a straight line appearing. Denoting the sidelength by s and the coloured symbols by c, that minimal dimension is denoted HJ(s,c). Here are some known values that spoil the above challenges.
This video introduces Ramsey Theory, including a segment on the Hales-Jewett Theorem.