```Show HN: 逆向扫雷```
Show HN: Reverse Minesweeper

原始链接: https://sunflowersgame.com/

游戏难度由一个逐步求解网格的逻辑引擎决定,并根据所需的最高级推演进行分类。难度分为五个等级: * **简单 (基础):** 可通过单一线索独立求解。 * **中等 (子集):** 涉及对比两个线索以隔离数值。 * **困难 (重叠):** 利用共享格的边界进行推断。 * **极难 (假设):** 运用简短且可逻辑追踪的链式推导来识别矛盾。 * **疯狂 (极限):** 运用更长的链式推导和“双向”枢轴法,即通过验证两种可能性得出相同结论。 每个网格都会根据所运用逻辑技巧的深度和频率获得 0-100 分的评分,以确保严格的难度界限。预估求解时间通过为每种操作类型分配权重来计算。 生成器通过精简线索和执行关于“0”类方格的规则来控制复杂度。如果无法在 90 次尝试内达到要求的难度,系统将提供最接近的匹配项。

Hacker News 社区正在讨论一款名为“逆向扫雷”(Reverse Minesweeper)的新逻辑益智游戏(sunflowersgame.com)。与侧重于翻开方块的传统扫雷不同,该版本会直接显示所有数字线索,将游戏转变为纯粹通过推理来放置花朵的挑战。 开发者 pompomsheep 表示,该游戏旨在将重心从反应速度转移到逻辑搜索上。尽管用户对核心概念给予了赞赏,但反馈褒贬不一。一些玩家认为目前的难度过低,而另一些玩家则指出,系统会立即高亮显示错误,这削弱了玩家的自主感。开发者已针对反馈做出回应,解释称游戏目前仍在完善中,并计划引入类似主流数独应用的“错误限制”系统,以更好地平衡学习曲线与游戏挑战性。
相关文章

原文

How difficulty works

Every grid you generate is solved end-to-end by the same logic engine that powers the in-game hints. It plays through the whole puzzle one deduction at a time, always taking the simplest move available, exactly like a careful human, and records which reasoning techniques the grid forced it to use. There are five, and each tier is named after the hardest one the grid demands:

  1. Basic → Easy: a single clue settles its own squares: either it's already satisfied, so its remaining squares must all be empty, or it has exactly as many unknowns left as flowers it still needs.
  2. Subset → Medium: two clues compared, where every unknown one clue sees is also seen by the other. Subtracting one from the other settles the squares only the bigger clue sees.
  3. Overlap → Hard: two clues share some squares, and min/max bounds on how many flowers the shared region can hold settle the squares only one clue sees. Hard grids also always include subset moves.
  4. What-if → Extreme: cousin of Sudoku's forcing chains: hypothetically plant a flower (or a cross) in a square, follow the simple rules from there, and watch a clue break: too many flowers, or no way left to reach its number. The contradiction proves the square must be the opposite. Chains are capped at a few simple counting steps (MAX_WHAT_IF_FIRINGS), so every what-if is mentally trackable and no pencil marks are needed. Hints walk you through exactly which square to test and which clue breaks.
  5. Beyond the cap → Insane: the summit. Insane grids demand what-if chains longer than Extreme's cap (up to INSANE_CHAIN_FIRINGS counting steps), and the solver also wields the either-way technique, cousin of Sudoku colouring: try a pivot square both ways; neither hypothesis breaks anything, but both chains force the same value onto some other square, so it's proven with no contradiction at all. This is the one tier where keeping notes genuinely helps. Hints spell out both kinds: which square to test, and (for either-way) which squares both chains agree on.

The 0–100 score places a grid inside its tier's band (Easy 4–19, Medium 20–39, Hard 40–59, Extreme 60–79, Insane 80–100), positioned by its sub-metrics: how wide and forgiving the solve is for Easy, the count of forced subset or overlap moves for Medium and Hard, and, for Extreme, the total depth of the what-if chains rather than their count, since a short 1-step what-if plays much like an overlap move while a 4-step cascade is a different beast. For Insane, the combined work of both branches of every either-way pivot. Bands never overlap, so a 62 is always genuinely harder than a 40.

Estimated time simply adds up the work: about a second per square of routine marking, ~2s to spot each basic deduction, ~14s per subset, ~26s per overlap, ~15s plus ~10s-per-step for each what-if, and ~35s plus per-step costs for each two-chain either-way. The weights live in EST_TIME in the source if the estimates drift from real solve times.

Zero squares follow ZERO_CLUE_RULES: Easy and Medium carry one or two 0 tiles, Hard exactly one, Extreme and Insane none. The generator protects needed 0s during pruning, strips extras first, injects one if a grid comes up short, and rejects anything that still breaks the rules.

The sliders above tighten what a grid must contain before it's accepted. Each click tries up to 90 candidates; if none fits your settings, the closest match is served and flagged under the board: a sign to ease a slider off or move to a bigger board, where demanding grids are more common.

联系我们 contact @ memedata.com