Sudoku, Star Battle, Takuzu, Futoshiki & Nonogram Generator
Pricing
from $20.00 / 1,000 puzzle generateds
Sudoku, Star Battle, Takuzu, Futoshiki & Nonogram Generator
Generates original sudoku, Star Battle, Takuzu, Futoshiki, Nonogram and English logic grid (zebra) puzzles, each proven to have exactly one solution and graded by technique or size. JSON, optional SVG, printable worksheets, or a 6x9 / 8.5x11 paperback interior PDF with answer key.
Pricing
from $20.00 / 1,000 puzzle generateds
Rating
0.0
(0)
Developer
Ars Technis
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a month ago
Last modified
Categories
Features
Share
Generate original logic puzzles on demand, with answer keys:
- Sudoku: the classic 9x9 puzzle. Fill every row, column and 3x3 box with the digits 1 to 9.
- Star Battle: place one crown (or star) in every row, every column and every outlined region, so that no two crowns touch, not even diagonally. Grids from 6x6 to 10x10.
- Takuzu (also called Binairo or binary puzzle): fill the grid with 0 and 1 so that no row or column has three equal digits side by side, every row and column has as many 0s as 1s, and no two rows or two columns are alike. Grids 6x6, 8x8, 10x10 and 12x12.
- Futoshiki (inequality puzzle): fill an N x N grid with the digits 1 to N, each exactly once in every row and column, so that every inequality sign between two neighbouring cells holds. Grids 5x5, 6x6 and 7x7.
- Nonogram (also called Picross or Griddlers): shade cells so that each row and column shows its clue's runs of shaded cells, in order, with at least one empty cell between runs. Grids 5x5, 10x10 and 15x15. The patterns are random, not hidden pictures.
- Logic grid (also called zebra puzzle or Einstein riddle; puzzle type
logic-grid): a short story, three or four people, and English clues such as "The child who plays tennis carries the red bag." Each person has exactly one item from every group; readers mark yes and no in a grid. easy = 3 people and 2 groups, medium = 4 people and 2 groups, hard = 4 people and 3 groups. PDF output as US Letter sheets only.
Every puzzle this Actor returns is:
- Proven unique. An exhaustive search confirms exactly one solution before the puzzle is delivered (for Nonogram it branches on any cell full line logic leaves open, so every possibility is covered; for logic grids every possible assignment is tried).
- Solved by a fixed set of techniques. A human-style logic solver finishes every puzzle, and the techniques it uses set the grade (for Star Battle and Futoshiki hard and expert, also the number of lookaheads). Logic grids are the exception: their grade is the grid's size (below).
- Graded by technique, not by counting clues (logic grids by size):
- Sudoku: easy puzzles are solved with singles only, medium also with pointing/claiming, hard with pairs and triples, expert with X-wing or swordfish. The sudoku solver never uses trial and error.
- Star Battle: easy = singles and covers (a cell that sees every candidate of a row, column or region is ruled out), medium adds region/row counting sets, hard uses a counting set of three or more regions (or rows or columns), three or more counting steps in one puzzle, or one lookahead (most hard solutions use no lookahead), expert uses two or more lookaheads (up to 18 in a test sample). A lookahead is a one-step trial: assume a crown, follow singles and covers, and rule the cell out if a row, column or region is left empty. Easy and medium Star Battle solutions use no lookahead, hard ones at most one, and expert ones two or more of these short trials.
- Takuzu: easy = pairs only (two equal digits side by side, or with one gap, force the opposite digit next to or between them), medium adds counts (a line with half its cells of one digit takes the other digit everywhere else), hard adds line completion (a cell takes the same digit in every valid way to complete its line: no three in a row, balanced, not a copy of a finished line), expert adds a one-step lookahead (suppose a digit, follow the other techniques, rule it out on a contradiction).
- Nonogram (easy, medium and hard only): easy = simple boxes and spaces (compare each run's leftmost and rightmost place in its line, given what is known), medium = full line logic (every arrangement of a line that agrees with what is known), hard adds one-step lookaheads. Each line step is forced, so a grid the solver finishes has exactly one solution; an exhaustive count confirms it before delivery. Answer keys show the shaded grid without its clues.
- Futoshiki: easy = singles (a cell with one candidate, a digit with one place in a row or column) and inequality bounds, medium adds pairs or triples, hard solutions use one or two lookaheads, expert solutions three or more.
- Logic grid (easy, medium and hard only): easy = 3 people and 2 groups, medium = 4 people and 2 groups, hard = 4 people and 3 groups. Every one is solved with grid logic alone (see "Logic grid puzzles" below).
- Well-shaped Star Battle regions. Every region has at least 3 cells (so no region gives its crown away) and covers at most 28% of the grid, at every size and grade. Region numbers and letters are assigned at random, so they say nothing about where the crowns are.
- Fresh. It is generated in your run, and puzzles never repeat within a run. Set a
seedif you want the same puzzles again.
Who it is for
- Newsletters, blogs and apps that want a daily logic puzzle without licensing fees
- Teachers and activity-sheet makers who need printable logic puzzles with answer keys
- Puzzle book creators who want a print-ready paperback interior (6x9 or 8.5x11 in) with graded puzzles and an answer key, to pair with their own cover
- Worksheet creators who need graded content with solutions
- Game developers who want a stream of verified levels as JSON
- AI agents that need a puzzle, its solution and a picture of it in one call
What you get
One dataset item per puzzle.
Fields for every puzzle:
| Field | Meaning |
|---|---|
index, id | Position in the run, and a stable 12-character ID |
type | sudoku, star-battle, takuzu, futoshiki, nonogram or logic-grid |
size | Grid size N (sudoku is always 9; for a logic grid, the number of people) |
difficulty | easy, medium, hard or expert |
techniques | How often the solver used each technique (for a logic grid, how many grid cells each step settled) |
solutionText | The solution as strings (when includeSolution is on) |
svg, solutionSvg | Ready-to-embed SVG images (only when svg is on; off by default) |
Sudoku only:
| Field | Meaning |
|---|---|
grid | 9x9 array, 0 = empty cell |
gridText | The same as 9 strings, . = empty |
clues | Number of given digits |
solution | The full 9x9 solution |
Takuzu only:
| Field | Meaning |
|---|---|
grid | N x N array of givens 0 or 1, null = empty cell |
gridText | The same as N strings, . = empty |
clues | Number of given digits |
solution | The full N x N solution |
Nonogram only:
| Field | Meaning |
|---|---|
rowClues | Each row's runs of shaded cells, left to right ([] = empty row) |
columnClues | Each column's runs, top to bottom |
solution | N x N array, 1 = shaded |
solutionText | # = shaded, . = empty |
Futoshiki only:
| Field | Meaning |
|---|---|
grid | N x N array of givens, 0 = empty cell |
gridText | The same as N strings, . = empty |
inequalities | Each sign as {"smaller": [row, column], "larger": [row, column]} of two neighbouring cells |
clues | Number of given digits |
solution | The full N x N solution |
Star Battle only:
| Field | Meaning |
|---|---|
regions | N x N array of region numbers 0..N-1 (assigned at random; a number says nothing about the crown's row or column) |
regionsText | The same grid as strings, one letter per region (A, B, C, ...) |
solution | [row, column] of each crown |
solutionText | * = crown |
With pdf on, the run also saves puzzles.pdf to its key-value store. The link is in the OUTPUT record as pdfUrl. Choose the layout with pdfLayout:
sheets(default): US Letter worksheets with a rules page, two large puzzles per page (logic grids: one per page, with the story, clues, grid and answer table) and all solutions at the back (the answer key; left out whenincludeSolutionis off). Fonts are embedded (IBM Plex Sans), so a title in Latin, Greek or Cyrillic letters prints, symbols such as № included, and a long title wraps onto up to three lines.book-6x9orbook-8.5x11: a paperback book interior:- a title page and a "How to play" page, then one puzzle per page with its number, size and difficulty, then the solutions (4 per page at 6x9, 6 per page at 8.5x11)
- page numbers, grayscale, an even page count, and fonts embedded (IBM Plex Sans)
- no bleed, with every mark inside the margins: the inside (gutter) margin follows the page-count table in KDP's paperback guidelines (0.375 in up to 150 pages, 0.5 in up to 300, and so on), and the top and outside margins are 0.5 in or more. The page numbers sit in the bottom margin, at least 0.35 in from the bottom edge (KDP asks for 0.25 in); the puzzles and text above them stay 0.5 in or more from it
OUTPUT.pdfPagesgives the page count, which you need for your cover's spine width. KDP paperbacks need at least 24 pages, so ask for 20 puzzles or more with answer keys on (includeSolution), or 22 or more without them. The 500-puzzle maximum stays under KDP's limit of about 828 pages.- The cover is yours to make. You may sell books made from the puzzles you generate (see "Rights" below).
Sudoku example (shortened; a real output, seed 7, medium):
{"index": 1,"id": "6640c2d99dfa","type": "sudoku","size": 9,"difficulty": "medium","clues": 30,"gridText": [".......1.", "2..48...5", "5941.7...", "3162...5.", ".........", ".5...1923", "...5.6374", "7...43..2", ".4......."],"solutionText": ["687352419", "231489765", "594167238", "316294857", "972835641", "458671923", "829516374", "765943182", "143728596"],"uniqueSolution": true}
Star Battle example (shortened; a real output, puzzleType star-battle, seed 7, size 6, easy):
{"index": 1,"id": "53430ec9f1e4","size": 6,"difficulty": "easy","regionsText": ["AAACCC", "ADADEC", "ADDDEE", "BBFFFE", "BFFFFE", "BBBFFF"],"solutionText": ["....*.", "*.....", "..*...", ".....*", "...*..", ".*...."],"uniqueSolution": true}
Input
| Field | Default | Notes |
|---|---|---|
puzzleType | sudoku | sudoku, star-battle, takuzu, futoshiki, nonogram or logic-grid |
count | 10 | 1 to 500 puzzles |
sizes | per type | Star Battle: any of 6, 7, 8, 9, 10 (default 8). Takuzu: any of 6, 8, 10, 12 (default 8). Futoshiki: any of 5, 6, 7 (default 5). Nonogram: any of 5, 10, 15 (default 10). (Sudoku is always 9x9; logic-grid ignores sizes, its difficulty sets the grid.) |
difficulties | ["easy","medium","hard"] | Any of easy, medium, hard, expert (nonogram and logic-grid: easy, medium, hard) |
includeSolution | true | |
svg | false | Adds SVG images to each item (about 1.5 to 21 KB each; measured: Takuzu 6x6 puzzle about 1.5 KB, Star Battle 6x6 about 2.9 KB, 10x10 with crowns about 8.8 KB, sudoku solution about 11 KB, Takuzu 12x12 solution about 18 to 19 KB, logic grid about 4 to 9 KB, hard logic grid solution about 21 KB) |
palette | color | Star Battle SVG colours: color or grayscale |
pdf | false | Adds puzzles.pdf |
pdfLayout | sheets | sheets, book-6x9 or book-8.5x11 (see above; logic-grid: sheets only) |
title | Sudoku Puzzles / Star Battle Puzzles / Takuzu Puzzles / Futoshiki Puzzles / Nonogram Puzzles / Logic Grid Puzzles | Up to 80 characters, printed on the PDF's first page (the title page in a book interior) |
seed | empty | Same seed + same settings = same puzzles |
Puzzles cycle through every combination of the sizes and difficulties you pick.
Pricing
You pay per delivered puzzle (see the pricing tab), once: the Actor charges one puzzle event per puzzle, and Apify's default per-dataset-item event is removed from the pricing, so you are not billed a second time for the same item. (If that default event were ever priced, the Actor would bill each puzzle through it alone and skip its own event.) Each puzzle has a limit of 90 seconds of CPU time; one that cannot be finished within it is skipped and not charged. The limit counts CPU time, not waiting time, so a low memory setting slows a run down but does not cause skips. If you set a maximum cost per run that covers fewer puzzles than you asked for, the Actor makes only as many as it covers, and the PDF holds all of them.
Speed (CPU time per puzzle, measured): sudoku easy to hard takes under a second and expert about 4 s on average (at most about 10 s). Takuzu easy to hard takes under about 1.5 s up to 10x10 and about 0.1 to 3 s on average at 12x12 (at most about 5 s); expert takes about 2 s on average at 10x10 (at most about 5 s) and about 7 s at 12x12 (at most about 11 s seen). Futoshiki takes about 0.1 to 4.5 s on average at 5x5 and 6x6 (at most about 13 s seen) and about 2 to 11 s at 7x7 (at most about 26 s seen, for medium). Nonogram easy takes well under a second; medium takes about 0.3 s on average at 5x5, 0.7 s at 10x10 and 2.5 s at 15x15 (at most about 10 s seen); hard about 0.7 s at 5x5, 1 s at 10x10 and 3 s at 15x15 (at most about 24 s seen in 60 runs). Star Battle up to 8x8 takes well under a second; 9x9 and 10x10 take about 0.5 to 2.5 seconds on average, and 10x10 expert about 2 to 5 s (at most about 18 s seen), far below the 90 s limit. More memory gives more CPU and faster runs.
Logic grid puzzles
Every logic grid puzzle is checked before delivery:
- Exactly one solution: every assignment of the groups' items to the people is tried.
- Solvable by grid logic alone: a solver that only marks the clues, uses "one yes per row and column of each box", and carries yes and no across boxes fills the whole grid.
- No spare clue: without any one clue, a second solution exists.
- No repeats: within one run, no two puzzles are the same puzzle with other names or items.
Logic grid only, besides the fields for every puzzle:
| Field | Meaning |
|---|---|
people | Number of people (3 or 4) |
groups | The groups in grid order, each {name, values}; the first is the people's names |
title, story | The scene and the story that introduces the people and groups |
clues, clueSentences | The number of clues, and the clues in order |
solverRounds | Rounds of the grid solver (a rough measure of difficulty) |
solutionTable | With includeSolution: one object per person, {Name, <group>: <value>, ...}; solutionText gives the same as one line per person |
Rules (for your readers)
Sudoku: fill every row, every column and every 3x3 box with the digits 1 to 9, each exactly once.
Star Battle:
- Place one crown in every row, every column and every outlined region.
- Two crowns may never touch, not even diagonally.
Tip for solvers: mark every cell that cannot hold a crown with a dot. When you place a crown, dot its row, its column, its region and the eight cells around it.
Takuzu:
- Fill every cell with 0 or 1.
- No row or column has three equal digits side by side.
- Every row and every column has as many 0s as 1s.
- No two rows are the same, and no two columns are the same.
Futoshiki:
- Fill every row and every column with the digits 1 to N, each exactly once.
- Every sign between two cells must hold: the open side faces the larger digit.
Nonogram:
- Shade cells so that each row and each column shows its clue: the lengths of its runs of shaded cells, in order.
- Runs are separated by at least one empty cell.
Rights
The puzzles are generated in your run by this Actor's own code. You may use, print, publish and sell the puzzles you generate, including in commercial products. There is no attribution requirement.
How it works
Sudoku: a random full grid is drawn first. Clues are removed in symmetric pairs while the solution stays unique and the grade stays within the level you asked for.
Star Battle: a random crown placement is drawn first. Regions are grown around it (each to at least 3 cells, none past 28% of the grid) and then repaired cell by cell, within the same limits, until the intended placement is the only solution. To reach a wanted grade, single border cells are then moved between regions, keeping each move only if the puzzle stays unique, logic-solvable and within the region limits. A human-style logic solver then solves the puzzle, and the hardest technique it uses sets the grade. Before delivery each puzzle is checked again, independently, including its region shapes.
Takuzu: a random valid full grid is drawn first. Digits are removed one at a time in random order, each removal kept only while the logic solver still finishes the puzzle within the level you asked for; a puzzle is delivered only if its final grade is exactly that level and an exhaustive search confirms exactly one solution.
Futoshiki: a random Latin square is drawn first, with every inequality sign between neighbouring cells. Digits and signs are removed one at a time in random order, each removal kept only while the logic solver still finishes the puzzle within the level you asked for; a puzzle is delivered only if its final grade is exactly that level and an exhaustive search confirms exactly one solution.
Nonogram: a random pattern is drawn (no picture), its clues are read off, and the puzzle is delivered only if the line solver finishes it at exactly the level you asked for; each line step is forced, so the finished grid is the only solution.
The Actor is plain Python code; it calls no AI model and no external service.
