# Puzzle Complexity

Determining the difficulty of a puzzle is a nontrivial task. It requires a good understanding of the underlying mechanics, and is also inherently subjective. Yet, in order to automatically generate puzzles in a consistent and useful manner, establishing the difficulty of generated puzzles is vital.

## User Study

In recent years smartphones have become commonplace, causing a huge market to appear for mobile games. As part of this, puzzle games have become increasingly popular.

Most puzzle games assign difficulty ratings to their levels, to help players select a level at their skill. These ratings are usually assigned by humans, and are often not grounded very well. Our research focuses on rating the difficulty of levels without human intervention.

We created a method to automatically calculate the difficulty of a puzzle game level. This method takes several measures, such as the size of a level, or the number of moves required to solve that level, and combines them to come up with a difficulty score for the level. We tested this method on three different games, detailed below.

We are currently collecting data. Paul Mutser has set up a user study for his Master thesis research. You can still participate!

## Results

We are able to conclude that our method is effective in predicting the difficulty of puzzle game levels. In Flow, we were able to predict the difficulty of the levels with a precision of 0.4 points on average (on a 1 to 10 scale) when compared with player-provided difficulty ratings. For both Lazors and Move we achieved an average precision of around one point.

We believe this error is small enough for practical use. Difficulty rating is subjective, and any method will never be perfect for all players. An error of less than one point is good enough to give players an indication of the difficulty of that level.

## Flow

Flow is a puzzle game created by Big Duck Games. The game is laid out on a grid of varying size, with multiple coloured balls placed onto it, in such a way that there are exactly two balls of each colour. The player has to draw paths between the balls of the same colour, until all pairs are connected. The paths are not allowed to intersect, and together should fill the entire level.

In our research we found out that the difficulty of Flow levels is mostly determined by the size of the level, where larger levels generally seem to be harder. When the balls of each pair are moved further away from each other, this slightly decreases the difficulty. Having more pairs of balls also seems to decrease the level difficulty. We noticed that the amount of corners the paths make in the solution does not affect the difficulty a lot.

You can try some Flow puzzles here.

## Lazors

Lazors is a puzzle game created by Pyrosphere. The goal of the game is to guide a number of laser beams over a number of targets. Lasers can be guided by moving around objects that manipulate the beams. These objects include mirror blocks that reflect the beam, wall blocks that stop the beam, glass blocks that split the beam into two beams, and diamond blocks that refract the beam. For simplicity, our implementation of Lazors only makes use of mirrors to manipulate the lasers.

In our research we discovered that the number of laser beams and the number of targets hardly affect the difficulty of a level. The difficulty is strongly related to the number of times two laser beams intersect with each other. The number of mirrors, and the number of times that a beam reflects off of a mirror, does have a large influence on the difficulty. The size of a level only has a minor effect on the difficulty.

You can try some Lazors puzzles here.

## Move

Move is a puzzle game created by Nitako Brain Puzzles. In Move, players have to move a number of coloured balls to the squares of the same colour. Balls can be moved up, down, left, and right, but not through walls and each other. The challenge of the game lies in the fact that the player can only move all balls at the same time in the same direction. The player must make clever use of the walls to make the balls move relative to each other, and solve the level.

Our research shows that the size of the level, the number of balls, the number of walls, and the number of unique colours only have little effect on the difficulty of levels. The minimum number of moves required to solve a level is of high importance for the difficulty of a level. We also noticed that the intuitivity of these moves is important to calculate the difficulty. We created a simple definition of intuitivity to determine the amount of counter-intuitive moves required to solve a level. We found out that this number has the largest influence on the difficulty.

You can try some Move puzzles here.

## Publications

If you want to know more about the research behind this project, you can check the following publications.

- Automated level generation and difficulty rating for Trainyard

N. Vendrig, Master thesis - Automated Rating of Level Difficulty for Puzzle Games

P. Mutser, Master thesis

## Team

The following people have contributed to this project.- Marc van Kreveld
- Maarten Löffler
- Nicky Vendrig
- Paul Mutser