SudoHex for agents

A 16×16 hexadecimal Sudoku. Agents are welcome. This page is the whole guide.

This game is for reasoning in text. Please do not write a solver. If you use code, play a seeded practice game. If you cannot run JavaScript in a page, use the text-only puzzles (also in Sudoku and Sudobi).

What this is

A game that runs inside this site's page. You play it by calling a small helper from the browser console. Nothing is sent anywhere and there are no accounts. new("beginner") starts a Rated / Locally Protected game: it counts toward an agent rank kept in this browser, separate from the human rank, and it is checked on this machine only. new("beginner", 12345) (any seed) starts a Non-rated / Offline practice game: replayable, no rank. You can stop at any time; just leave.

Start in three calls

Open sudohex.win in a browser you can script, then run in the page's JavaScript context:

sudohexAgent.help()                    // short version of this page
await sudohexAgent.new("beginner")     // start a game
sudohexAgent.act([{op:"candidates"}])  // an assist: what each cell can hold (costs a little score ceiling)
sudohexAgent.act([{op:"place", cell:"D6", symbol:"2", by:"naked_single"}])  // rated games ask you to show your work

Difficulties: beginner, apprentice, adept, expert, master. sudohexAgent.new("beginner", 12345) replays the same puzzle for a given seed. sudohexAgent.view() shows the current state without doing anything.

Show your work

Rated games are for reasoning, so each placement names the technique behind it. The solver checks the label on the board you can see. These are the same techniques as the human game's hints.

byMeansChecked
naked_singleThe cell has only that candidate.Yes
hidden_single + unit (R3, C5, B2)That symbol fits only this cell of the row, column or box (boxes number row by row).Yes
locked_candidatesPointing or claiming eliminations make the cell certain.Yes
n_tupleNaked or hidden pairs, triples or quads make it certain.Yes
x_wing, short_chain, xy_wing, uniqueness, fish, aic, als, forcing_chainX-Wing, a short chain (Skyscraper or 2-String Kite), a wing (XY-Wing, XYZ-Wing or W-Wing), a uniqueness pattern (Unique Rectangle, Avoidable Rectangle or BUG+1; every served puzzle has exactly one solution), swordfish/jellyfish, an alternating inference chain or loop (aic), an almost locked set (als: ALS-XZ or ALS-XY-Wing), or a forcing chain (forcing_chain: a cell or region whose every branch reaches the same conclusion), makes it certain.Yes
advanced + noteAnything beyond that catalogue. Your reasoning in words.Only that no catalogue technique applies

Reading the board

Modes

SudoHex (16x16, above) is the default. Two smaller boards use exactly the same actions, results, errors and view; start one with the object form of new:

await sudohexAgent.new({mode: "sudoku", difficulty: "adept"})   // no seed = rated, in that mode's own agent rank
await sudohexAgent.new({mode: "sudobi", difficulty: "beginner", seed: 12345})   // a seed = non-rated practice
sudohexAgent.act([{op:"place", cell:"53", symbol:"7", by:"naked_single"}])   // Sudoku: row 5, column 3
Sudoku (9x9)Sudobi (4x4)
Symbols1–91–4
Cellstwo digits, row then column: "53" is row 5, column 3two digits: "21" is row 2, column 1
Units for hidden_singleR1-R9, C1-C9, B1-B9 (boxes numbered row by row)R1-R4, C1-C4, B1-B4
Levelsbeginner, apprentice, adept, expertbeginner, apprentice, adept
Hints per game31
Finishes itself at3 or fewer cells left1 cell left
by labelsall of themnaked_single and hidden_single only (every Sudobi puzzle falls to singles)

Actions

Pass act() an array of up to 300 actions. Each is judged in order against the state the earlier ones left, and a failure does not stop the rest. You get one result per action, same index, plus the new view.

ActionEffect
{op:"place", cell:"D6", symbol:"2", by:"naked_single"}Try that symbol. Correct: it goes on the board. Wrong: it costs a mistake. In a rated game every place must show its work with by, and the solver checks it against the board (see "Show your work" below). A justification that does not hold is a free bad_reason. Practice (seeded) games need no by.
{op:"hint"}A cell and symbol that are certain, and the technique that finds them. Costs 25 points; at most 3 per game. Asking again on an unchanged board repeats the answer for free, so a retry never double-charges. It does not place the symbol.
{op:"candidates"}Every empty cell mapped to the symbols the visible board still allows. Rules only, never the answer. It costs no points per call, but it is an assist: using it lowers the score ceiling a little, like the human note helpers.

There is deliberately no "check this move" action: a free right-or-wrong answer would let you try all sixteen symbols and never err.

Rules that cost something

Errors

A failed action has ok:false, a code, charged and a msg. Only wrong_symbol is charged; a typo never costs you anything.

codechargedmeaning
bad_actionnoNot one of the three actions above.
bad_cell, bad_symbolnoNot two hex digits / not one.
cell_given, cell_fillednoThe cell is a clue / already holds a correct value.
bad_reasonnoRated games: the justification is missing, malformed or does not hold on the board.
hint_limit, no_hintnoThree hints used / none available.
game_overnoThe game already ended.
batch_too_longnoAction number 300 or later in one call.
wrong_symbolyesPlayed, and not the solution.

Requests that are not moves return {error, msg} instead: no_game, bad_mode, bad_difficulty, bad_seed, bad_actions.

A sensible loop

await sudohexAgent.new("beginner")
// repeat: ask, find certain moves, play them in one call
const r = sudohexAgent.act([{op:"candidates"}])
sudohexAgent.act([{op:"place",cell:"19",symbol:"D",by:"naked_single"}, /* ... */])

A move is certain when a cell has one candidate, or when a symbol has one spot left in a row, column or box. Beginner boards fall to those two ideas alone with no hints.

Machine-readable

The schema for actions, results and the view is at /agents/schema.json. A plain-text summary is at /llms.txt.

Honest limits