Yes, but only if the generator checks three separate guarantees: the board has a valid intended solution, the formal rules allow exactly one solution, and a declared set of human-style deductions finishes the board without assuming anything. Only the third justifies the term zero-guess. A uniqueness counter alone does not establish it, because a board can have one formal solution and still stall under a limited rule set. Star Battle, also called Two Not Touch, is the target format throughout.
The rules the generator must encode
A Star Battle board is an N×N grid divided into N regions. Each row, each column, and each region must contain exactly k stars, and no two stars may touch, including diagonally. A star therefore rules out its eight neighboring cells. Publishers vary board sizes and star counts. The reference implementation discussed below uses 1-star 8×8, 2-star 10×10, and 3-star 14×14 boards as its own conventions, not as requirements of the puzzle.
As an Amazon Associate I earn from qualifying purchases.
Cell states and the constraints behind them
Represent every cell as one of three values: UNKNOWN, STAR, or EMPTY. Every row, column, and region is an exactly-k constraint, and every placed star propagates to its eight neighbors.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteThree forced deductions
Each of the following rules follows from the constraints alone, so none of them is a guess.
#1 Best Overall
- Quota reached: if a line or region already holds k stars, every remaining unknown in it becomes
EMPTY. - Quota forced: if the placed stars plus the remaining unknowns equal k, every unknown in that line or region becomes
STAR. - Neighbor elimination: a newly placed star sets its eight neighbors to
EMPTY.
Apply the rules repeatedly until no cell changes (a fixpoint) or one cell is required to be both a star and empty (a contradiction). On a 2-star board, for example, if a row holds one star and exactly one unknown remains, that unknown must be a star, because 1 + 1 = 2.
Building the answer first, then the puzzle
Generation runs in a fixed order. The stored answer comes first, because every later check measures the board against it.
- Choose parameters. Select N and k, then add any product requirements, such as contiguous regions, a preferred region shape, or a target difficulty band. Keep these as your own settings rather than as rules of Star Battle in general.
- Place a legal star layout. Put exactly k stars in each row and each column so that no two touch. A simple method is row-by-row backtracking: for each row, try cells whose column is not yet full and that do not touch an existing star, and step back when a row cannot be completed.
- Grow regions around the stars. Give each group of k stars its own region label, then grow each region through adjacent unassigned cells until every cell has a label. Stars never move, so each region keeps exactly k stars. The growth order is the main control over region shape.
- Run the deduction engine. Start from an all-
UNKNOWNboard that shows only the regions, and apply the declared rule set until the board is solved or stalls. - Count solutions independently. Run a complete solver that stops after it finds two solutions. This check is separate from the deduction engine.
- Verify the intended answer. Confirm that the unique solution equals the stored layout and that every region is connected if your format requires contiguity. Then serialize the puzzle and its solution in one fixed format.
- Record a solve trace. Store which rule forced each star and elimination, and in what order. The trace supports hints, debugging, and difficulty reporting.
Unique does not mean zero-guess
Three checks answer three different questions, and a generator needs all of them.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #2
| Check | Question it answers | How it is run | Failure means |
|---|---|---|---|
| Formal validity | Does the stored layout obey every rule? | Verify quotas, the no-touch rule, region membership, and connectivity where required | The board is invalid; regenerate it |
| Uniqueness | How many assignments satisfy the formal rules? | Complete search that stops at two solutions | 0 means no solution; 2 means the board is ambiguous |
| Logic solvability | Can the declared deductions finish the board? | Propagate and apply the allowed tiers until the board is solved or stalls | A stall means the board is not zero-guess under your definition |
A board can pass the uniqueness check and fail the logic check. Such a board is unique but not zero-guess, and the second result is the one that matters for a zero-guess promise.
Choosing which deductions count
Name the strictest tier your product can honestly promise. Deduction tiers differ in how much they assume:
| Tier | Typical pattern | Counts toward zero-guess? |
|---|---|---|
| Direct inference | Quota reached, quota forced, neighbor elimination | Yes, under any definition |
| Enumeration | Exhaustive case analysis over the arrangements of a line or region, with no assumed cell value | Only if your definition allows it; state that in the product description |
| Single-assumption hypothesis | Assume one cell is a star, propagate, and look for a contradiction | No under a strict definition; if you allow it, disclose that the solver branches once |
Uniqueness counting without confusing it with difficulty
The uniqueness counter is a complete search. It propagates first and branches only when propagation stalls: it tries a cell as a star, then as empty, and recurses on each. A fully assigned board that passes the checks counts as one solution. Pruning is allowed only when it cannot discard a real solution, so the final count must cover the whole remaining search space.
One documented heuristic chooses the unknown in the line with the fewest remaining cells. That ordering can reduce search time but does not change what the count means.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
function count_solutions(state, limit = 2):
state = propagate(state) // all quota and adjacency rules
if contradiction(state): return 0
if fully_assigned(state): return 1
cell = choose_unknown(state) // e.g. unknown in the line with fewest unknowns
total = 0
for value in [STAR, EMPTY]:
total += count_solutions(assign(state, cell, value), limit - total)
if total >= limit: break
return total
Measuring difficulty without overclaiming
None of the public projects examined publishes a validated difficulty scale, so any score you show is a design choice. Report these axes separately rather than collapsing them into one number:
- The strongest deduction tier the solve needed.
- The number of forced placements and eliminations in the deterministic trace.
- The length of the accepted solve path, in steps.
- The search effort of the uniqueness counter, which is generator cost rather than player difficulty.
Label every score with the rule set and version that produced it, so a reader can reproduce it.
Rank #4
What the public implementations show
Four public repositories cover parts of this pipeline. Each is useful as a reference, but none establishes how a generator performs on arbitrary boards.
sen-ltd/star-battle
A TypeScript implementation with three sets of exactly-k units, eight-way adjacency, propagation to a fixpoint, backtracking uniqueness counting, and a generator that places stars and then grows regions. Its README describes a small bundled set of solver-verified boards and a test that re-solves generated puzzles and compares the recovered stars with the drawn answer. That is a useful self-check, but it covers only the boards it bundles.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11masonomara/star-battle
A production-rules document that organizes human-style deductions into direct inferences, tiling and counting enumerations, and hypothetical deductions. Its vocabulary helps define what each tier means in your own product, but it is one project’s design rather than a formal standard.
Best Value
MelodyLucien/starbattle
A browser-based generator with region partitioning, a uniqueness check that stops after two solutions, and print-friendly output. Its README gives generation timings for selected configurations. Those figures are self-reported and have not been independently benchmarked, so they do not support a general performance claim.
smjw/StarBattle
A student project covering generation, solving, and difficulty assessment. Its overview does not describe a difficulty formula in enough detail to reuse, so build the scoring from the axes above.
Quick Recap
Failure modes and recovery
- The uniqueness counter returns 0. The stored layout or the region map breaks a rule. Check quotas, the no-touch rule, and region membership on the stored answer, and regenerate if any check fails.
- The counter returns 2 or more. The region map admits an alternative layout. Move a non-star boundary cell from one region to a neighboring region, keeping both regions connected, then recount. Confirm that the stored answer is still the unique solution.
- The counter returns 1, but the deduction engine stalls. The board is unique but not zero-guess under your declared rules. Regenerate the regions, or, if your product allows a hypothetical tier, change the stated definition and label the board accordingly.
- The engine completes with a different layout from the stored answer. With a unique solution and sound rules, a completed solve must match it, so a mismatch points to a bug in one rule. Compare each rule’s output against the solve trace to find it.
- A region becomes disconnected after an edit. Reject the edit if your format requires contiguous regions, and check connectivity after every boundary change.
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.




