The idea for the game came to me when I saw a multi-colored floor tile made up of hexagons, but the way the tiles were laid out made it impossible to find a simple rule for them. As I was thinking about it, I noticed this rule about the neighboring relationships of the colored tiles in other cases. At first I created and played this game on paper.
Later, I wrote a JavaScript code that allows players to easily model their ideas in the game on their browsers. The program alerts the player if a tile is missing the appropriate number of neighbors, and indicates with a faint shade which tiles can be painted to continue the shape. The player can choose freely from these tiles. You can access this at this link. If you're not familiar with this game, read on for the description and check out the examples. Have fun!
Hexpedition is a math puzzle coloring game where players color tiles on a mosaic consisting of identical tiles. The objective is to color the tiles according to a predetermined rule, which is determined by a specified neighbor count. This number represents how many colored tiles should be adjacent to a given colored tile exactly.
The aim of the game is to find a coloring arrangement, satisfying a given neighbor count rule, where only a finite number of tiles need to be colored to ensure that the initial rule holds for every tile.
Some examples in uniform hexagonal tiling:
If the neighbor count is zero, then a colored tile cannot have any colored neighbors. The game ends after coloring just one tile.
If the neighbor count is one, then every colored tile must have at least one other colored tile as its neighbor. If there is already a colored tile, then a new colored tile must be placed adjacent to the existing colored tile, while still satisfying the rule that there is only one colored tile adjacent to each colored tile.
If the neighbor count is two, then a colored tile must have at least two other colored tiles as its neighbors, which means that all three hexagons meeting at a vertex must be colored.
When the neighborhod count is three, it becomes more challenging to grasp the solution where a finite number of tile colorings can satisfy the initial rule for every tile. However, as shown in the diagram, a repeating unit of four tiles can be created through D6 symmetric repetition (rotating by 60 degrees for each repeating unit). By doing so, a finite coloring arrangement can be formed consisting of all 24 tiles that forms a self-repeating ring, where every tile has three other neighboring tiles that satisfy the given rule.
If the neighbor count is four, a translational pattern emerges that repeats continuously, therefore in this case, there is no solution with a finite number of colored tiles. And there is no solution with a neighborhood count greater than four either.
The game can be extended to other regular uniform tilings as well. However, they don't necessarily have to be planar; they can also include the Platonic solids (tetrahedron, octahedron, dodecahedron, cube, icosahedron), or even hyperbolic tilings.
The solutions of coloring a dodecahedron using a neighborhood number of 3 can be seen in a perspective and a modified azimuthal projection in the following images.
As a matter of fact, it is possible to find a coloring solution for the case where the neighbor count is between 0 and 5 on the dodecahedron.
Below I provide images of other non-hexagonal tile fillings as examples.
Another way to extend the game is by increasing the number of colors. In this case, we are not dealing with a simple neighbor count, but depending on the number of chosen colors, we must determine at the beginning of the game the numerical neighbor relationship of each possible color with the other possible colors. These relationships can be most easily represented in a square matrix whose size is the product of the selected number of colors with itself.
When using two colors, the number of neighboring tiles is represented by a two-by-two matrix instead of a single digit. As we are already using quite a lot of numbers at this point (think about the four values of the matrix), it is advisable to use the Latin alphabet letters when referring to tiles colored with different colors. Now, let's take a closer look at how the values of the two-by-two matrix correspond to the coloring rules: the values in the first row and first column of the matrix apply to tiles colored with the first color ("A") in the familiar way, while the values in the second row and second column of the matrix apply to tiles colored with the second color ("B"). The second column of the first row of the matrix specifies the number of tiles colored with the second color ("B") that must be adjacent to tiles colored with the first color ("A"). Finally, the first column of the second row of the matrix determines the number of tiles colored with the first color ("A") that must be adjacent to tiles colored with the second color ("B"). Although this description may seem a bit complicated, I show you some examples where using different rules and a finite number of colored tiles can lead to solutions.
When using two colors, there are many initial rule systems that can be found to solve the puzzle with a finite number of colored tiles (I found 26 ordered solutions - ordered in this case is the last lexicographic permutation, this means that with starting from the top-left value of the matrix, going through each row, and making the sequence of numbers as large as possible. With this process you can avoid repeating the same solution, since swapping the colors labeled "A" and "B" will result in a different 2x2 matrix).
The solvable matrices can be grouped based on their appearance:
There are tree-like solutions, where starting from a central point and following the rules continuously will lead to a solution.
There are solutions where moving around the vertices is prohibited while adhering to the matrix's neighboring relationships. Therefore, by forming a small ring and taking some tiles around, the initial conditions can be solved.
And there are those which can only be solved by finding highly symmetric, large, repeating units. These solutions resemble great rings.
I have written a JavaScript code where a player can easily model their ideas in the game in the browser. The program alerts the player if any tile is missing the appropriate number of neighbors, and highlights in a faint shade which tiles can be colored to continue the pattern, from which the player can freely choose.
The initial tiling parameters can be changed in the program, namely the number of sides of the polygon used for tiling and the number of polygons meeting at a vertex. The program is capable of displaying Platonic solids (regular spherical tiling) and hyperbolic tilings. The program allows for the movement of the tilings as well.
In addition, the matrix that specifies the coloring neighborhood relations can be freely set, with the only condition being that a tile cannot have more neighbors than the number of sides in the polygon that makes up the tiling, and the given matrices are always rearranged in descending order starting from the top left value of the rule matrix, going through each row, and continuing onto the next row, so that the sequence of numbers is as large as possible. This ensures that the same solution is not found twice, as exchanging the colors "A" and "B" will result in a different matrix (except in cases where the coloring is symmetric for the two colors).
I created all the images and animations depicted above using a program I wrote myself.
HOTKEYS:
A + SHIFT: Autoanimation (first you need to add and activate animations).
1 - 5: Select coloring.
A - E: Select coloring.
H: Help.
L: Save/Load worklow, not working with iframe version, download html version to use this function.
M: Enable/disable menu bar.
O: Press double to reinitilaize the program.
P: Change between projections (azimuthal projection only available in spheric tilings).
R: Enable/disable rotation, change between rotation modes (2D or 3D around the center) in orthogonal and perspectivic projection.
Rotation can only enabled in spheric and hyperbolic tilings.
T: Enable/disable translation (only available in planar tilings).
F8: Hide all menu item.
PRINT SCREEN: Takes a screenshot of the canvas as png file. No further cropping is required. Not working with iframe version,
download html version to use this function.