Pourdots
How We Made Sure All 500 Color-Sort Levels Can Be Solved
If you've been stuck on a color-sort puzzle for a while, you've probably wondered: "Is this level even solvable?" That suspicion is fair — shuffle colors into bottles at random and you really can end up with an impossible layout. So before release, we had a computer solve every one of Pourdots' 500 main levels and 730 days of daily puzzles, and we saved each solution in the level file alongside the puzzle.
The rules, briefly
You can pour the top color of a bottle only onto the same color or into an empty bottle. Each color has four pieces, and you win when every bottle is either empty or holds four pieces of one color. As you progress, special bottles appear one at a time.
| Special bottle | Rule | First level |
|---|---|---|
| Small bottle | Holds only 3 pieces, so it can never complete a color — it must end empty | 61 |
| Hidden pieces | Lower pieces stay hidden until they reach the top | 121 |
| Locked bottle | Can't be poured into or out of until a bottle of its key color is complete | 201 |
| One-color bottle | Accepts only one specific color | 301 |
How one level gets made
- Set the conditions. Each level number has a set number of colors, bottles and special bottles. Level 1 has two colors; the final stretch has 11 or 12 colors and up to 16 bottles.
- Generate candidates. Colors are shuffled into a candidate layout. The random seed is derived from the level number, so rerunning the generator always produces the same layout.
- Try to solve them. A solver attempts each candidate. Anything unsolvable — or too large to solve within a fixed search budget — is thrown away.
- Pick one. Once up to eight solvable candidates are collected, they're ranked by moves needed and search effort, and the one that fits the level's place on the difficulty curve is chosen.
This means no level can be one of those "bad luck, it's impossible" layouts. Every puzzle in the level file has been solved to the end by the computer.
Levels with a proven minimum — and levels without
The solver uses A* search. Its estimate of the remaining moves — the number of same-color runs minus the number of colors — never overestimates, so when the search runs to completion the solution it finds is guaranteed to be the shortest possible. We use that length as the level's par.
The trouble is size. With more than ten colors and 14 to 16 bottles, the number of possible positions explodes. So the exact search stops after 40,000 positions, and if it hasn't finished, we switch to a weighted search that's less thorough but much faster. That search always finds a valid solution, but not necessarily the shortest one.
In the end, 275 of the 500 levels have a proven minimum, and the other 225 use the length of the fast search's solution as par. The first 74 levels are all proven; level 75 is the first one that isn't. In levels 401–500, only 16 of 100 are proven.
Level 301 stands out on the chart. Median par drops from 38 (levels 276–300) to 31 (levels 301–325), and the proven share jumps from 8% to 72%. There are two reasons. A new difficulty band starts at 301, so the color count restarts from the low end of that band (10 colors). And levels with a one-color bottle get an extra empty bottle, because when special bottles take away empty space, far too many layouts become unsolvable. More breathing room means shorter solutions — and searches the computer can finish.
The curve isn't smooth for another reason too: it's deliberately saw-toothed. Every 10th level is an easier "rest" level built with the previous band's conditions, and every 25th level uses the hardest candidate in its band.
Why three stars only needs 1.1× par
You earn three stars for finishing within 1.1× par, two stars within 1.5× par, and one star otherwise. Since nearly half the levels have a par that isn't guaranteed to be the minimum, demanding an exact match for three stars could be unfair. It also means that on a weighted-search level you might finish in fewer moves than par. If you do, you've beaten the computer.
Re-checked every time the game changes
Building the levels once isn't the end of it. Every time we change the code, the game's automated tests re-check:
- that every one of the 500 levels and 730 daily puzzles has exactly four pieces of each color;
- that replaying the saved solution move by move under the real game rules wins, and that its length equals par;
- that the saved seed regenerates exactly the same layout.
If a change to the rules ever made a level unsolvable, these tests would catch it immediately.
Tips for when you're stuck
- Empty bottles are your last card. Pouring a random color into an empty bottle sharply cuts your options. Use one only when it lets you gather a color.
- Finish nearly full bottles first. A bottle with four of one color closes and drops out of the puzzle — and it may be the key to a locked bottle.
- Treat small bottles as temporary storage. They can't hold a full color, so they have to end empty. Use them only to park pieces briefly.
- Uncover hidden pieces early. You can't plan around what you can't see.