Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstalliTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
A Star Battle generator can only honestly promise a zero-guess puzzle if it checks three guarantees separately: the board has a legal intended answer, exactly one assignment satisfies the formal rules, and a declared set of human-style deductions completes that answer without branching. A uniqueness count proves the second guarantee and says nothing about the third.
What the generator has to encode
Star Battle, also known as Two Not Touch, is played on an N×N grid divided into N regions. Every row, every column and every region must contain exactly k stars, and no two stars may touch, including diagonally. Each star therefore rules out its eight neighboring cells.
Board sizes and star quotas are format choices, not game-wide rules. The sen-ltd/star-battle README uses the examples below, and they are conventions of that implementation only.
Recommended Free Tools
| Example format | Board | Stars per row, column and region (k) | Total stars (N × k) |
|---|---|---|---|
| 1-star | 8×8 | 1 | 8 |
| 2-star | 10×10 | 2 | 20 |
| 3-star | 14×14 | 3 | 42 |
Model each cell as one of three states: UNKNOWN, STAR, or EMPTY. Each row, column and region becomes an exactly-k constraint over its cells. Three propagation rules cover the basics, and each one makes only forced deductions:
#1 Best Overall
- Quota reached: if a row, column or region already holds k stars, every remaining unknown in it becomes
EMPTY. - Quota forced: if the stars already placed plus the remaining unknowns equal k, every unknown in that unit becomes
STAR. - Adjacency: placing a star marks its eight neighbors as
EMPTY.
Repeat these rules until no cell changes (a fixpoint) or a contradiction appears. A contradiction is any of the following: a unit with more than k stars, a unit whose stars plus unknowns fall below k, or a cell forced to be both a star and empty.
Three guarantees, kept separate
The title’s promise rests on three different checks. Each can fail on its own, so each needs its own test.
1. A valid intended solution
The generator starts from a legal star arrangement and keeps it. That stored arrangement is the answer the puzzle will be checked against. Its validity depends only on the arrangement itself: exactly k stars per row, column and region, with no touching stars.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →2. Exactly one formal solution
A complete solver counts the assignments that satisfy the formal rules. Zero means the board cannot satisfy the rules and is invalid. Two or more means the puzzle is ambiguous. A count of exactly one meets this guarantee and nothing more.
Rank #2
3. A zero-guess solve path
This guarantee concerns the solving method rather than the count. The board must be completed by a named set of deduction rules, without branching. Because “zero-guess” is always relative to that set, the rule set belongs in the product’s documentation.
The generation pipeline
The order below ties each guarantee to a specific stage. Steps 4 and 5 are deliberately independent: a deduction run that completes does not replace the uniqueness count.
- Choose parameters. Select N and k, plus any product requirements such as contiguous regions, region shape preferences, or a difficulty band. Do not present particular board sizes as mandatory.
- Generate a legal star solution. Place exactly k stars in each row and column while enforcing the no-touch rule. Then partition the N × k stars into N groups of k. Each group becomes the seed for one region.
- Grow regions around the seeds. Expand each seed through neighboring cells until every cell belongs to exactly one region. Growth adds cells and never moves a seed, so each region keeps its k stars. If contiguity is part of the format, reject any layout in which a region is disconnected.
- Run the deduction engine. Apply the declared rule set until the board is solved or stalled. Record the result without accepting or rejecting the board yet.
- Count solutions independently. Use a complete solver that stops after it finds two solutions. Accept only a count of exactly one. Propagation can prune the search, but the uniqueness proof must cover the entire remaining space.
- Check the intended answer and serialize. Confirm that the unique solver answer equals the stored arrangement from step 2. Validate region membership and connectivity, then write the puzzle and its solution in one consistent format. The sen-ltd/star-battle implementation re-solves each generated puzzle and compares the recovered stars with the drawn answer.
- Record a solve trace. Store which rule forced each star or elimination. The trace supports reproducible hints, debugging, and a transparent difficulty estimate.
Unique does not mean zero-guess
A uniqueness solver answers, “How many assignments satisfy the formal rules?” A logic solver answers a different question: “Can this board be completed using only these declared deductions?” A board can pass the first test and fail the second, so the two results have to be read together.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minute| Formal solution count | Declared rules complete the board? | Outcome for a zero-guess product |
|---|---|---|
| 0 | Not applicable | Invalid board. Discard it and check the encoding. |
| 2 or more | Not applicable | Ambiguous. Discard the board or regenerate it. |
| Exactly 1 | Yes, using direct inferences only | Accept as zero-guess under that rule set. |
| Exactly 1 | Yes, but only with enumerations or one-step hypotheticals | Accept only if the product’s definition permits that tier, and disclose the tier used. |
| Exactly 1 | No, the run stalls | Reject under the zero-guess promise. Alternatively, extend the rule set and publish the expanded definition. |
Choosing the deduction tier
The masonomara/star-battle production-rules document organizes human-style deductions into tiers. Those tiers are a project design rather than a formal standard, but they give a precise vocabulary for defining what “zero-guess” means in your own product.
Direct inferences
Quota extremes and neighbor elimination are direct. A single rule applied to the current marks produces a forced result. A product that allows only direct inferences has the strictest definition, and it is the easiest to verify by replaying a trace.
Tiling and counting enumerations
Enumerations compare the places where a unit’s remaining stars can fit with the cells of other units. Line/region overlap counting is one example: when the possible positions for a line’s remaining stars all lie within one region, the overlap can justify eliminations elsewhere. Each enumeration rule must be written out precisely, because an informal version can quietly prove more than the rule allows.
Single-assumption hypotheticals
A hypothetical rule assumes one cell is a star (or empty), propagates the assumption, and eliminates it if a contradiction follows. It is useful, but it reasons about a guess and then checks it. A board that needs this step is not pure direct propagation, so describing it as zero-guess without qualification would overstate the method.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Searching for the unique count
Run propagation first, and branch only when it stalls. Pick an unknown cell and explore two subtrees: the cell as a star, and the cell as empty. Propagate inside each branch, and stop the whole search as soon as a second complete solution appears.
Rank #4
Choosing the branch cell from a constrained line with few remaining unknowns is one useful heuristic. It can reduce search time in practice, but it does not change the correctness condition. Solver runtime is a cost the generator pays. It says nothing about how hard the puzzle is for a person.
Measuring difficulty without overclaiming
Difficulty is a design choice. No validated, cross-implementation Star Battle difficulty scale is established, so no formula should be presented as the accepted one. Report transparent axes instead:
- the strongest deduction tier the solve needs: direct, enumeration, or hypothetical;
- the number of forced stars and eliminations in a deterministic solve trace;
- the length of the accepted solve path;
- uniqueness-search effort, labeled as generator-side cost rather than player difficulty.
Reference implementations and what they show
Four public projects illustrate these ideas. Each one is an implementation example. None is evidence of performance on arbitrary boards.
sen-ltd/star-battle
A TypeScript implementation. Its README describes three sets of exactly-k units (rows, columns and regions), eight-way adjacency, propagation to a fixpoint, a backtracking uniqueness count, and a generator that places stars first and then grows regions. It ships a small set of solver-verified boards.
Best Value
masonomara/star-battle
Its production-rules document is the clearest statement of a human-oriented deduction hierarchy among these projects. Use its tier names to define your own rule set, not as an industry standard.
MelodyLucien/starbattle
A browser-based generator with region partitioning, a uniqueness check that stops after two solutions, and print-friendly output. Its README reports generation timings for selected configurations. Those figures are self-reported by the project and have not been independently benchmarked, so they should not be used as general performance claims.
smjw/StarBattle
A student project covering generation, solving and difficulty assessment. Its overview does not describe a difficulty formula, so treat it as a source of ideas rather than a method to copy.
Troubleshooting common failures
| Symptom | Likely cause | Fix |
|---|---|---|
| Uniqueness count returns zero | The constraint encoding or region assignment is wrong | Check per-unit star quotas and the no-touch rule against the stored arrangement before counting. |
| Count returns two or more | The clues do not determine a single arrangement | Discard the board or regenerate the region layout. Sound deductions cannot remove a second valid solution. |
| Unique, but the deduction run stalls | The declared rules lack a needed deduction | Reject the board under the zero-guess promise, or add the tier and disclose the expanded definition. |
| Unique solution differs from the stored arrangement | The board has a different valid answer than the one generated | Discard the board. Do not edit the stored answer to match the solver. |
| A region is split into separate pieces | The growth step produced disconnected cells | Reject the layout when contiguity is part of the format. |
| Uniqueness check runs slowly | The search branches on arbitrary cells | Branch only after propagation stalls, and prefer cells in lines with few unknowns. |
The Bottom Line
Phrase the promise precisely: the board has exactly one solution under the formal rules, and the named deduction tiers complete it without guessing. Publish the tier alongside the solve trace rather than using “zero-guess” on its own.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

