Sudoku Format
Puzzle Format
Standard Puzzle Format (Classic Sudoku)
This is the standard format for classic Sudoku, used in many Sudoku games.
Rules:
1-9, each represents a given number.represents an empty cell
Example 1:
67..4..524....1....53.87.91....12.85.2...46..7.5...21..47.3.52.5.62.8.499.....378
Extended rules (may not be valid in other Sudoku games):
0also represents an empty cellSpace,Tab ('\t'),Newline ('\n')andCarriage return ('\r')are ignored
Example 2:
670040052400001000053087091000012085020004600705000210047030520506208049900000378
Example 3:
67..4..52
4....1...
.53.87.91
....12.85
.2...46..
7.5...21.
.47.3.52.
5.62.8.49
9.....378
JSON Puzzle Format
Note: This puzzle format is only valid in this game
Parameter type
Possible values:
- classic
Optional, default value is classic
Parameters m, n
m and n represent the width and height of a box respectively. For example, the most commonly used is m=3, n=3
Optional, both default values are 3
Parameter numbers
This is a string array, each string represents a row of given numbers. If a cell has no given number, fill in .
Classic Sudoku Puzzle JSON Example
{
"id": "69367c1bf66145eb8f6fc7c87a0fd828",
"numbers": [
"......16.",
"1........",
".3...7...",
"..1..4..9",
"..5...61.",
".67.312..",
".2.......",
".53.2.7.4",
"4..5..9.."
]
}
State Format
Standard State Format (Classic Sudoku)
This format is used to represent the current state of the Sudoku board, not the initial puzzle content. The state contains information about given, filled, and candidate numbers. This format can be used in many Sudoku software and games.
.----------------.----------------.----------------.
| 5 2 78 | 3 1479 479 | 789 18 6 |
| 6 78 9 | 2 17 5 | 3 148 147 |
| 1 3 4 | 78 6 789 | 2 5 79 |
.----------------+----------------+----------------.
| 7 45 2 | 1 8 3 | 59 6 49 |
| 8 45 6 | 457 4579 479 | 1 2 3 |
| 3 9 1 | 6 45 2 | 57 47 8 |
.----------------+----------------+----------------.
| 9 178 5 | 478 2 478 | 6 3 17 |
| 2 178 378 | 9 37 6 | 4 178 5 |
| 4 6 378 | 578 357 1 | 78 9 2 |
.----------------.----------------.----------------.
Number filling:
- There should be no spaces between candidate numbers in the same cell, and candidate numbers in different cells are separated by spaces
- Candidate numbers in different boxes are separated by |
Format limitations:
- If a cell has only one candidate number, it cannot be distinguished from filled and given numbers, so only one candidate number is considered as filled.
- Cannot represent empty cells, that is, cells with no filled, given, or candidate numbers.
Note:
- In text input boxes, some similar formats are also valid, please try them yourself.
Hodoku’s similar format (can be used in this game):
.-------------.----------------.---------------.
| 5 2 78 | 3 1479 479 | 789 18 6 |
| 6 78 9 | 2 17 5 | 3 148 147 |
| 1 3 4 | 78 6 789 | 2 5 79 |
:-------------+----------------+---------------:
| 7 45 2 | 1 8 3 | 59 6 49 |
| 8 45 6 | 457 4579 479 | 1 2 3 |
| 3 9 1 | 6 45 2 | 57 47 8 |
:-------------+----------------+---------------:
| 9 178 5 | 478 2 478 | 6 3 17 |
| 2 178 378 | 9 37 6 | 4 178 5 |
| 4 6 378 | 578 357 1 | 78 9 2 |
'-------------'----------------'---------------'
Sudoku Explainer State Format
Sudoku Explainer’s special format (can be used in this game):
....5.....2.............78...3......1..4..7.9...4..7.9......7891......8......6........6.........78.........9.2.......1.....7......5......3......1..4...8.1..4..7..1..........3.........4...........78......6.........789.2...........5..........7.9......7.....45.....2.......1...............8...3..........5...9.....6......4....9.......8....45.........6......45.7.....45.7.9...4..7.91.........2.........3........3..............91.............6......45.....2...........5.7.....4..7.........8.........91.....78.....5.......4..78..2..........4..78......6.....3......1.....7...2.......1.....78...3...78.........9..3...7.......6......4.....1.....78.....5.......4..........6.....3...78.....5.78...3.5.7..1..............78.........9.2.......
Partial Puzzle Format
JSON Partial Puzzle Format
Parameter map
The JSON content of the initial puzzle
Parameters beginNumbers, endNumbers
The number content in the beginning and ending states, with the same format as numbers in map
Parameters beginCandidatesTable, endCandidatesTable
The candidate number content in the beginning and ending states, with the same format as the standard state format, but excluding the content of filled cells
Parameter givenHints
Predefined hints to be displayed during the solving process, each hint is a string, which is the trait string of the hint.
Example
{
"id": "cd7486d5561c4a92bc8f7e293abf8ae3",
"map": {
"id": "d6bacb69b20c46d8800dc32caa406903",
"numbers": [
".2.47..9.",
"......3.6",
"..3......",
"2....876.",
".9..61...",
".4.....39",
".8.7.....",
"..913....",
".6...9.7."
]
},
"beginNumbers": [
".2.473.9.",
"...8..3.6",
"..36....7",
"23.94876.",
".9.361...",
".4...7.39",
".8.7.691.",
"..91346..",
".6..89.7."
],
"beginCandidatesTable": [
".----------------.----------------.----------------.",
"| 568 0 568 | 0 0 0 | 158 0 158 |",
"| 4579 157 457 | 0 19 25 | 0 245 0 |",
"| 4589 15 0 | 0 19 25 | 2458 2458 0 |",
".----------------+----------------+----------------.",
"| 0 0 15 | 0 0 0 | 0 0 15 |",
"| 578 0 578 | 0 0 0 | 2458 2458 2458 |",
"| 168 0 168 | 25 25 0 | 18 0 0 |",
".----------------+----------------+----------------.",
"| 34 0 24 | 0 25 0 | 0 0 345 |",
"| 57 57 0 | 0 0 0 | 0 28 28 |",
"| 134 0 124 | 25 0 0 | 45 0 35 |",
".----------------.----------------.----------------."
],
"endNumbers": [
".2.473.9.",
"...8..3.6",
"..36....7",
"23.94876.",
".9.361...",
".4...7.39",
".8.7.691.",
"..91346..",
".6..89.7."
],
"endCandidatesTable": [
".----------------.----------------.----------------.",
"| 568 0 568 | 0 0 0 | 158 0 158 |",
"| 4579 157 47 | 0 19 25 | 0 245 0 |",
"| 4589 15 0 | 0 19 25 | 2458 2458 0 |",
".----------------+----------------+----------------.",
"| 0 0 15 | 0 0 0 | 0 0 15 |",
"| 578 0 578 | 0 0 0 | 2458 2458 2458 |",
"| 168 0 168 | 25 25 0 | 18 0 0 |",
".----------------+----------------+----------------.",
"| 34 0 24 | 0 25 0 | 0 0 345 |",
"| 57 57 0 | 0 0 0 | 0 28 28 |",
"| 134 0 124 | 25 0 0 | 45 0 35 |",
".----------------.----------------.----------------."
],
"givenHints": [
"AETS7EQQOqmOAAMgAAQAAI4y0X9nGjgm"
]
}