Ant Pixel Puzzle › Dev log › How we measure difficulty: bot win rates and real attempts

How we measure difficulty: bot win rates and real attempts

Being solvable is the floor. The next question is how hard a level is for a real person. This post is about how we learned to measure that more accurately, one step at a time.

The first yardstick: two bots

At first, difficulty came from two bots playing the real game:

  • The casual player takes any box whose color can be eaten right now; 24 games per level.
  • The three-row expert looks ahead but only sees the first three rows of the tray; 8 games per level.

Each difficulty tier has a range. On a hard level the casual player may win at most 35% and the three-row expert at most 40%; on an expert level, 25% and 30%. Once a tray is picked, both win rates are recorded with it and checked again at deploy time. If the tray changed and the rates were not measured again, the site cannot be published.

Real players did not match

After the game had been live for a while we had real data: how many attempts players needed, on average, to beat a level the first time. On levels 1–200 the bots pointed in roughly the right direction. Levels where the casual bot won 5% or less took real players 3.6 attempts on average; 6–15% took 3.3; above 15% took 1.9. Noodle levels added about 0.5 attempts.

On levels 241–300 it fell apart. The correlation between real attempts and the casual win rate was only −0.37, and with the expert's win rate −0.24: close to no prediction at all. The clearest case: levels 289 and 297, where both bots won 0% and looked brutal, took real players 1.5 attempts on average, while level 277 took 9.2.

The reason is not hard to see. Real players are neither the random casual bot nor the look-ahead expert. Someone who has played a while takes the box that can eat the most right now, and sometimes glances at the next box.

The second yardstick: the veteran gauge

So we wrote a third bot in that image, the veteran: it takes the box with the largest share it can eat right now, glances at the next box, and plays a random box 30% of the time. 400 games per level.

One more problem: from chapter 18 on, with the level's normal slots the veteran won almost nothing, so levels could not be told apart. The fix was to give the veteran and the casual player one extra slot and play another 400 games each. With that extra slot, easy and hard separate cleanly.

Finally, using real data from levels 221–380 (the 160 levels that had been live at least 7 days), we fitted a formula that turns those two extra-slot win rates, plus whether the level has queue tickets or tides, into “average attempts for a real player to win the first time”. Tested on chapters 20 and 21, which were not part of the fit, the chapter average was off by 0.14 attempts.

Where it works and where it does not

The gauge is accurate for a whole chapter and only rough for a single level: the per-level correlation is 0.44. And when both bots still win nothing even with the extra slot, the gauge is capped and cannot tell how hard the level really is. So it is the main guide when picking trays, and real-player data after release still has the last word.

Targets set with the gauge

From level 441 on, each chapter aims for an average of 3.5–4.0 attempts, hard levels at least 2.8 (target 3.6), easier levels at least 2.2 and tutorial levels at least 1.8. Within a chapter, a harder level comes every three or four levels.

For a player that means roughly this: in a chapter of twenty, some levels fall in one or two tries, some take four or five, and the spikes can take more. If you have tried a level a dozen times and still cannot beat it, we probably got it wrong; send us the level number and we will check it against the data.

Why go to this much trouble

Whether a puzzle game is fun depends a lot on landing the difficulty: too easy is dull, too hard and people quit. Tuning 720 levels by feel does not scale. With a yardstick that matches real players, a new chapter can land in the right place from the day it ships.

Play now

More from the dev log