Show HN: Reverse Minesweeper
Introducing Sunflowers: A Twist on Minesweeper
I am thrilled to announce the launch of Sunflowers, a logic-driven puzzle game. While it may look familiar, it is essentially a reverse Minesweeper experience—instead of avoiding explosions, your goal is to carefully plant sunflowers.
🌻 How to Play
The objective is to populate the grid with sunflowers based on numerical clues.
- The Core Rule: Each number indicates exactly how many sunflowers exist in the surrounding eight squares.
- Controls:
Single-tap: Mark a square as empty.Click and drag: Quickly mark a sequence of empty squares.Tap a faded number: Automatically fill all remaining unknown squares around that clue.
- The Stakes: You have a limit of 3 lives. Every incorrectly placed sunflower counts as a mistake.
🧠 The Logic Engine & Difficulty Tiers
Unlike random generators, every Sunflowers grid is validated by a logic engine that mimics human reasoning. The engine solves the puzzle step-by-step, using the simplest possible deduction first. The difficulty tier is determined by the most complex reasoning technique required to solve it.
Logic Hierarchy
| Tier | Logic Technique | Description |
|---|---|---|
| Easy | Basic | A single clue is sufficient. It's either already full (remaining are empty) or needs exactly as many flowers as there are empty spots. |
| Medium | Subset | Comparing two clues where one's unknown squares are a total subset of the other's. Subtracting them reveals the status of the unique squares. |
| Hard | Overlap | Two clues share a region. By calculating the min/max possible flowers in that shared space, the outer squares are settled. |
| Extreme | What-if | Similar to Sudoku forcing chains. You hypothetically plant a flower; if it leads to a contradiction (too many flowers or impossible to reach the number), the square must be empty. |
| Insane | Either-way | The most complex logic. A "pivot" square is tested both ways. If both paths—despite being different—force the same result on another square, that result is proven. |
Note on Extreme/Insane: To keep the game mentally manageable without pencil marks, "What-if" chains are capped at
MAX_WHAT_IF_FIRINGS. Insane grids exceed this cap and utilizeINSANE_CHAIN_FIRINGS.
📊 Scoring and Tuning
The game assigns a score from 0–100 to place a grid within its specific tier band. These bands are strictly separated, meaning a score of 62 is roughly guaranteed to be harder than a 40.
Difficulty Bands
- Easy: 4–19
- Medium: 20–39
- Hard: 40–59
- Extreme: 60–79
- Insane: 80–100
Tuning Parameters
Users can adjust sliders to force specific logic requirements:
- Medium: Minimum 2 subset deductions.
- Hard: Minimum 2 overlap moves + 1 subset move.
- Extreme: Minimum 2 "what-if" moves with a chain depth of at least 2.
- Insane: Requires "either-way" pivots.
If the generator cannot find a perfect match after 90 attempts, it provides the closest possible candidate and flags it on the board.
⏱️ Time Estimation
The estimated solve time is a summation of the work required. The weights are stored in the source code under EST_TIME.
The formula for time can be represented as:
Where:
- = squares marked routinely
- = basic deductions
- = subset moves
- = overlap moves
- = what-if chains (with steps)
- = either-way pivots
🛠️ Technical Specifications
The "Zero Clue" Rules
The presence of 0 tiles is strictly regulated to maintain difficulty balance:
- Easy/Medium: 1 to 2 zero tiles.
- Hard: Exactly 1 zero tile.
- Extreme/Insane: No zero tiles allowed.
Infrastructure & Settings
- Hosting: Cloudflare Pages.
- Analytics: Google Analytics (basic traffic monitoring).
- Customization Options:
Dark modefor low-light play.Highlight finished cluesto track progress.Pencil modefor temporary, lighter marks.
Puzzle Access
You can play the Daily Puzzle, the Daily Master, or enter a specific Puzzle ID from the bank:
- Bank Range A:
1–5999 - Bank Range B:
10000–10049