Usage stats from my puzzle app showed the daily Minesweeper lost in 2 of its 3 recorded games (a tiny sample, but the direction was clear), so I lowered the mine density from 16 % to 13 %. The obvious one-line change would have silently replaced every daily grid the app had ever shown, including today’s half-played one.
TL;DR — A daily puzzle that is generated on the device from a date-derived seed is defined by the seed and every generator parameter. Change a parameter and old puzzles change. Keep the old value for puzzles dated before a cut-over day: easy = day >= EASY_FROM.
The setup
The app shows one puzzle per game per day, and players can open past days from a calendar (the archive). Nothing is downloaded: each grid is generated on the phone from a seed computed from the date, so every player gets the same grid on the same day.
fun forRef(ref: PuzzleRef, hard: Boolean): MinesPuzzle {
val (w, h) = shapeFor(ref, hard) // 7×9 or 8×11 by weekday
return generate(Random(ref.seed * 31 + w * 100 + h), w, h, mineCountFor(w, h, hard), tricky = w * h > 63)
}
generate places the mines with that Random, opens a starting area, and retries until a deduction solver can finish the grid. Progress is saved per day: which cells are open, which are flagged. On load, the save is checked against the regenerated grid and dropped if it no longer fits.
What I expected
My first thought was that a lower density only affects the grids people get from now on. The seed is the same, so I assumed most of the layout would stay and only a few mines would disappear.
What actually happens
The mine count feeds the random draw: free.take(mineCount) picks from the same shuffled list, but the solver check that decides whether a candidate grid is kept now sees a different grid, so the retry loop can land on a different attempt. I measured it for the 30 days starting at the cut-over date, generating each grid with the old and the new density:
var subset = 0; var shared = 0; var newTotal = 0
for (day in Mines.EASY_FROM until Mines.EASY_FROM + 30) {
val ref = PuzzleRef.daily(Game.MINES, day)
val (w, h) = Mines.shapeFor(ref, false)
val old = Mines.generate(Random(ref.seed * 31 + w * 100 + h), w, h,
Mines.mineCountFor(w, h, false, easy = false), tricky = w * h > 63)
val new = Mines.forRef(ref, false)
val s = new.mines.indices.count { new.mines[it] && old.mines[it] }
shared += s; newTotal += new.mines.count { it }
if (s == new.mines.count { it }) subset++
}
println("subset=$subset/30 shared=$shared/$newTotal")
// subset=7/30 shared=95/306
On 7 days the new grid was the old one minus a few mines (the first attempt passed the solver both times). On the other 23 the layout was redrawn: overall only 95 of the 306 new mines sat where an old mine had been. Even the opened starting area matched on just 3 of the 30 days.
Without a gate, an update would have:
- broken today’s saved games: the save check rejects open cells that are now mines, so the player would start over (I checked this logic in the code, not on a device);
- replaced every archive grid, so a player who replays an old day gets a puzzle that does not match what they or their friends played;
- made the day’s grid differ between players on the old and the new app version, which breaks shared results and leaderboards for that day.

The fix
Make the parameter a function of the puzzle’s date, with the cut-over set to a day after the release:
val EASY_FROM: Long = LocalDate.of(2026, 10, 29).toEpochDay()
fun mineCountFor(w: Int, h: Int, hard: Boolean, easy: Boolean = true): Int =
Math.round(w * h * if (hard) 0.18 else if (easy) 0.13 else 0.16).toInt()
fun forRef(ref: PuzzleRef, hard: Boolean): MinesPuzzle {
val (w, h) = shapeFor(ref, hard)
val easy = (ref.day ?: Long.MAX_VALUE) >= EASY_FROM // free play (no date) gets the new rule
return generate(Random(ref.seed * 31 + w * 100 + h), w, h, mineCountFor(w, h, hard, easy), tricky = w * h > 63)
}
The existing tests over past days kept asserting the old mine counts (10 on 7×9, 14 on 8×11) and still pass, and new assertions pin the new ones (8 and 11).
Why it works
The date is already part of the puzzle’s identity, so it is the right key for the rule set too. Dates before the cut-over regenerate exactly as before. The new rule starts on a day nobody has played yet, so no save, archive or shared result refers to a grid that changes.
Not every difficulty change needs this. In the same update I gave a proverb game 4 tries instead of 3, and slowed the letter reveal of a timed word game. Those rules act during play and never feed the generator, so the puzzles stay identical and no gate is needed. The test is simple: does the value reach the code that draws the puzzle?
What I did not test
I chose the cut-over date before knowing when the update would reach players. If it ships later, the days in between get the new rule on updated phones and the old one on the rest, which is the same split, just shorter. I did not measure whether 13 % actually brings the loss rate down; the app has only a handful of daily players so far.
Facts
context: Daily puzzles generated on device from a date-derived seed, with saves and a playable archive
problem: Changing a generator parameter (mine density 16 % → 13 %) regenerates different grids for every past day too; 23 of 30 tested grids were redrawn, the other 7 lost mines
solution: Key the parameter on the puzzle date (day >= EASY_FROM uses the new value), with the cut-over after the release
verified_on: 2026-10-28
applies_to: Any seeded procedural generator whose output must stay stable per date or per seed
does_not_apply_to: Rule changes that never reach the generator (tries, timers, scoring)