Star battle solver

Paint the regions of your star battle puzzle, choose how many stars go in each row, column and region, and get the solution or one explained step at a time.

Paint with region

Pick a region letter, then tap or drag over its cells. Every cell needs a region, and a grid of size n has n regions. Keyboard: arrow keys move, a letter key paints the selected cell with that region.

Solver

Paste or copy the regions as text

This star battle solver works on the grid you are stuck on. Choose the size and the number of stars, paint each region with its letter, and press Solve to see every star, or Next step to get one deduction at a time with its reason. It also tells you if the regions you painted allow more than one answer, or none.

The rules

The grid is divided into as many regions as it has rows. Place stars so that every row, every column and every region holds the same number of stars: one in the small puzzles, two in the classic 10 by 10, sometimes three in larger grids. Two stars may never touch, not even diagonally.

How to enter a puzzle

  1. Pick the size and the number of stars.
  2. Choose a region letter in the palette and tap or drag over its cells. Repeat for each region. Cells that are not painted yet are hatched.
  3. Press Solve or Next step. If a region is missing or in two pieces, the solver says which.

You can also paste the layout as text, one line per row with a letter for each cell, which is quicker for a large grid.

How the solver works

Each cell is a star, empty, or unknown. The solver uses the deductions people use: a star empties the eight cells around it; a row, column or region with all its stars empties its other cells; one that has exactly as many open cells as stars it still needs gets them all; a cell that touches every open cell of a region needing one star cannot be a star; and a region whose open cells all lie in one row or column takes that line's remaining stars, so the rest of the line is empty. When those stall, it tries a star in a cell and, if that leads to a row, column or region that can no longer be filled, marks the cell empty. To prove the answer is the only one, it then searches the remaining cells, and every answer is checked against the rules. On small grids its solution counts are tested against a brute-force count of every star placement.

Worked example

In a 1-star puzzle, suppose region A covers only three cells of row 2. Its star must be in row 2, and row 2 has only one star, so every other cell of row 2 is empty. Now suppose region B has just two open cells left, side by side. Its star is in one of them, so the cells above and below that pair, which touch both, can never hold a star. These two patterns, applied over and over, solve most published puzzles.

Solving tips

  • Start with the smallest regions; they have the fewest places for their stars.
  • Look for regions that sit inside a single row or column.
  • Any 2 by 2 block of cells holds at most one star. In 2-star puzzles, split two neighboring rows into 2 by 2 blocks and count: the four stars they need often have only one way to fit.

For more grid logic of the same kind, try binairo, which balances 0s and 1s in every row and column, or slitherlink, which draws one loop around the numbers.

Want a fresh grid instead? Play star battle online: new puzzles at three levels and a puzzle of the day, each checked by this solver.

Solver tested . Found a problem? Tell us.

Questions

How many stars go in each region?

It depends on the puzzle: usually 1 star in grids up to about 8 by 8 and 2 stars in the common 10 by 10 grids. The number is the same for every row, column and region. Choose it above the grid.

Can stars touch diagonally?

No. In star battle, stars may not touch at all, not side by side and not at a corner. That is what the dots around each star in the solution show.

Why does the solver say a region is in separate pieces?

Each region should be one connected area. A stray cell painted with the wrong letter usually causes this; repaint it with the letter of the region it belongs to.

What sizes are supported?

Grids from 4 by 4 to 14 by 14 with 1, 2 or 3 stars. The grid must be big enough for the stars to fit without touching, so the solver accepts 2 stars from 7 by 7 and 3 stars from 11 by 11.

Does my puzzle need exactly one solution?

No. The solver works on any layout. If the regions allow several answers it shows two and marks the cells that differ; if none fit, it says so. Published puzzles have exactly one answer, so either result usually points to a cell painted with the wrong region.