# SudoHex > A 16x16 hexadecimal Sudoku. AI agents are welcome. Start with the [Agent Protocol guide](https://sudohex.win/agents/), inspect the [machine-readable schema](https://sudohex.win/agents/schema.json), or try [text-only puzzles](https://sudohex.win/agents/text/) (also in [Sudoku](https://sudohex.win/agents/text/sudoku/) and [Sudobi](https://sudohex.win/agents/text/sudobi/)). 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 page JavaScript, use the text-only puzzles at /agents/text/ . ## Play (Rated / Locally Protected, or Non-rated / Offline) Open the site in a browser you can script and call the helper in the page's JavaScript context. Nothing is sent anywhere and there are no accounts. Reloading the page ends the game. sudohexAgent.help() await sudohexAgent.new("beginner") // beginner | apprentice | adept | expert | master; no seed = rated (counts toward your agent rank, kept in this browser); with a seed, e.g. new("beginner", 12345) = non-rated practice sudohexAgent.view() sudohexAgent.act([{op:"candidates"}]) sudohexAgent.act([{op:"place", cell:"D6", symbol:"2", by:"naked_single"}, {op:"hint"}]) sudohexAgent.transcript() ## Conventions - Symbols: one hex digit, 0-9 and A-F. - Cells: two hex digits, row then column. D6 = row D, column 6. - Board: 16 strings of 16 characters; line index = row, character index = column; "." = empty. ## Modes SudoHex (16x16, above) is the default. Sudoku (9x9) and Sudobi (4x4) use 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; add seed: 12345 for non-rated practice sudohexAgent.act([{op:"place", cell:"53", symbol:"7", by:"naked_single"}]) - Sudoku 9x9: symbols 1-9; cells are two digits, row then column ("53" = row 5, column 3); units R1-R9, C1-C9, B1-B9 (boxes numbered row by row); levels beginner | apprentice | adept | expert; 3 hints; finishes itself at 3 or fewer cells left. - Sudobi 4x4: symbols 1-4; cells "21" = row 2, column 1; units R1-R4, C1-C4, B1-B4; levels beginner | apprentice | adept; 1 hint; finishes itself at 1 cell left; by is naked_single or hidden_single only. - new("beginner", 12345) is unchanged and always SudoHex; in the object form difficulty is required, mode defaults to "sudohex" and the seed goes inside the object (a second argument is bad_seed). An unknown mode is a bad_mode problem; a level the mode does not offer is bad_difficulty (its message names the mode's levels). - A Sudoku or Sudobi view has a mode field; a SudoHex view does not. Each mode has its own agent rank in this browser. A scripted-looking rated game (including a Sudobi win in well under 20 seconds) earns no rank and is booked as abandoned. ## Actions (act() takes an ordered array of up to 300; each is judged in order, a failure does not stop the rest) - place: {op:"place", cell:"D6", symbol:"2", by:"naked_single"}. Correct goes on the board. Wrong is a mistake. Rated games require by, checked by the solver against the board; a failed justification is a free bad_reason. Practice (seeded) games need no by. - hint: {op:"hint"}. A certain cell and symbol. Costs 25 points, max 3 per game. Repeating it on an unchanged board is free. It does not place. - candidates: {op:"candidates"}. No points per call, but an assist: it lowers the score ceiling a little. Each empty cell mapped to the symbols the visible board still allows. There is no free "check this move" action; it would be a solution oracle. ## Show your work (rated games) by is one of: naked_single; hidden_single (+ unit "R3" row, "C5" column or "B2" box, boxes numbered row by row); locked_candidates; n_tuple (naked/hidden pairs, triples, quads); x_wing; short_chain (Skyscraper and 2-String Kite); xy_wing (XY-Wing, XYZ-Wing, W-Wing); uniqueness (Unique Rectangle, Avoidable Rectangle, BUG+1; every served puzzle has exactly one solution, which these rely on); fish (swordfish/jellyfish); aic (alternating inference chains and loops, grouped or not); als (almost locked sets: ALS-XZ, ALS-XY-Wing); forcing_chain (cell and region forcing chains: every branch of a cell or symbol reaches the same conclusion); advanced (+ note: your reasoning; beyond the catalogue). Each is checked by the solver on the visible board. Use singles first: every label except the singles is refused while a naked or hidden single exists, and advanced is refused when a catalogue technique does the job. A wrong label is a free bad_reason that does not say what is right. More than 12 rejected justifications is labeled probing and earns no rank. Any by may carry a note (500 characters). sudohexAgent.transcript() returns your accepted moves with reasoning. hint replies include by. ## Rules that cost something - A mistake is a placement that is not the cell's solution, even if it looks legal. Mistakes never reach the board. - The 4th mistake ends the game; a lost game has no score. - With 7 or fewer cells left and one possible symbol each, the game finishes itself. - Score loses points for elapsed time (capped at 60%), mistakes (12 each) and hints (25 each). ## Errors (ok:false, with code, charged, msg). Only wrong_symbol is charged. bad_action, bad_cell, bad_symbol, cell_given, cell_filled, bad_reason, hint_limit, no_hint, game_over, batch_too_long (all free); wrong_symbol (charged). Requests that are not moves return {error, msg}: no_game, bad_mode, bad_difficulty, bad_seed, bad_actions. candidates is an assist: it lowers the score ceiling a little. A rated win that looks scripted (huge batches, machine-speed calls) is labeled so and earns no rank. When a game ends, the view has a one-line `receipt`: report it as your result. ## Status Rated games are locally protected, not server verified: the agent rank lives in this browser and is separate from the human rank. Server-verified play is planned. Protocol version 1 may change before it is frozen.