Learning 100% Sudoku Accuracy with a Neural Network

Our AI team discovered a method to achieve 100% accuracy on Sudoku from data alone. We will continue to Apache 2.0 license the discoveries and some of the underlying system components, having started with configgle and sagent.

At rekursiv.ai, we’ve built an autonomous team of AI scientists who propose ideas, run experiments, learn from results, and repeat.

To the best of our knowledge, our system is the first to achieve 100% accuracy on Sudoku with a model trained only on input-output pairs 1 2. This same agentic system also raised the Pareto frontier on ARC-AGI in our companion blog post.

Why Sudoku?

We used Sudoku as a platform because it’s quick and small, but still surprisingly hard for ML. The quick iteration time of experiments allowed us to rapidly calibrate and improve the AI system over several generations, testing hundreds hypotheses in parallel in a matter of days.

Below we provide more details on how we got here, the discoveries the AI team made, and where we are headed next.

100% accuracy on Sudoku with a transformer

Sudoku is easily solved with inductive methods such as iterative deepening, which exhaustively searches the problem’s decision space. Yet models trained from data have difficulty learning the rules of Sudoku.

We started from Tiny Recursive Models (TRM), which reported 87.4% accuracy using an MLP-Mixer with a 7M model and 36 hours of training on an L40. We set an explicit goal of achieving 100% accuracy in 1 hour, then unleashed our AI scientists. The system launched multiple parallel research arms that saturated our cluster within minutes.

Sudoku accuracy across experiments

0 20 40 60 80 100 110 Time Accuracy (%) TRM 87.4%

Figure 1. Each point represents a completed Sudoku experiment. The red roofline traces the running-best single-model accuracy. Red diamonds mark inference-time improvements on previous checkpoints, while gray points are non-roofline measured runs. Crosses indicate failures.

In total, the AI team launched 684 experiments over 4 days, resulting in approx. 125,000 lines of code or about 180 lines per experiment. To ensure faster progress, each experiment was capped at 1 hour of training.

We additionally required the team use a transformer architecture rather than MLP-Mixer under the belief this would generalize better, despite the fact that initially the transformer reached 36% accuracy while MLP-Mixer reached 87% under the same training settings.

The team explored at least 16 broad research directions spanning the training loop and optimizer, data representation and augmentation, recursive architectures, and training/inference throughput. Most ideas did not improve the frontier, but the few that did shaped the next round. Over time, the experiments improved well past the baseline despite the tight time constraints.

After 2 days, the system achieved 100% accuracy using a novel algorithm paired with model ensembling. Instead of stopping there, we asked the system to find a solution without ensembles. After 2 more days, it returned several more methods for achieving 100% accuracy. We stress-tested the result on puzzles from the web and achieved 100% accuracy on 99,768 similarly difficult puzzles 3.

We detail some notable discoveries and inventions below:

  • QK normalization in attention
    • To our knowledge it was previously unknown how to make TRM+Transformer on Sudoku competitive with TRM+MLP-Mixer. The AI team’s analyst discovered transformer training was impeded by unstable attention gradients after examining the model’s activations. When paired with the Muon optimizer, it smoothed the unstable gradients, allowing the TRM transformer to converge 4× faster.
  • A novel board corruption method inspired by discrete diffusion
    • The model propagates a copy of the predicted board across ACT steps, similar to diffusion models.
    • At training time, 12 cells are replaced with random digits across ACT steps, and the model learns to repair this corruption. This improved accuracy by 3%.
  • A new inference algorithm that the team named “Hypothesis-Pinning Search (HPS)”
    • The algorithm selects digits that the model is least confident in predicting, pins them as ground truth, and attempts to generate a solution using TRM’s halt head as a verifier. This method boosted accuracy from 93% to 100%.

We were particularly impressed with the HPS algorithm; it vaguely reminded us of MAGVIT’s sampling procedure.

Hypothesis-Pinning Search (HPS)

Below is a visualization of the HPS algorithm in action. One early finding in the team’s analysis of board states was that the q-head which tells the model when to halt can be used as a perfect validator when paired with test-time augmentation (TTA). That is, the learned halt head for Adaptive Computation Time (ACT) classifies any board state as solved or unsolved with 100% accuracy. The team exploited this fact to increase the number of ACT iterations until the model found a correct solution. Below we visualize one particularly challenging example solved with this algorithm.

Visualization of the Sudoku Solver

cell confidencedigit changedpinned hypothesisconflicting digit
Speed

Figure 2. One difficult example solved by our model using Hypothesis-Pinning Search over multiple inference steps. The search tree traces rollouts through pinned hypotheses. The red q-head curve gives the halting logit used to determine when the search should stop.

At step 227 above, the model found a near-solution with only 3 conflicting digits, which caused a spike in the q-head logit. However, it was not enough to reach the threshold, so the search continued until it found the correct answer. We see a latching effect where the model no longer changed its answer once it was very confident that it had reached the solution.

We can also visualize how often the model needs to go beyond its configured budget of 32 ACT steps. In 95% of puzzles, the model halted early.

Inference Steps by Puzzle

Figure 3. Puzzles are ranked by total inference work, from most to least. Total steps sum every ACT step across all HPS rollouts for each of the 422,786 puzzles.

Of 422,786 evaluation puzzles, 274,421 (64.9%) were solved in one forward pass, and 391,771 (92.7%) were solved within eight. Although the hardest examples required hundreds of HPS rollouts, early halting made the algorithm 1.4× faster than running a fixed 32-step budget for all puzzles. Because the model chooses pinned hypotheses using its logit probabilities, HPS efficiently explores counterfactuals.

After finding one route to 100%, the AI team invented two more distinct methods:

  • A similar halting procedure from SIC, applied at inference time across 16 independent rollouts with random initialization of the z latent, boosted accuracy from 95% to 100%.
  • A standalone 0.8M transformer classifier can serve as a perfect Sudoku verifier and, when paired with HPS, also achieves 100% accuracy. Classification loss alone did not work, and the team found that an additional discrete diffusion masking objective was required.

Several discoveries from this campaign, including the Muon recipe and feedback-and-repair training, later transferred to our ARC-AGI campaign.

Limitations

The 100% result is specific to Sudoku-Extreme and the related 99,768-puzzle stress test described above. It does not imply that HPS transfers unchanged to other domains. In our ARC-AGI experiments, for example, literal branching HPS did not improve accuracy, although its feedback-and-repair mechanism did.

What’s next

Broadly speaking our primary objectives are to:

  1. Understand and overcome the limits of autonomous science.
  2. Produce useful artifacts for the community.

In the coming weeks, our primary focus is to expand our system across harder and more varied challenges.

If you feel inspired to help, email [email protected].

If you’d just love to chat, drop us a line at [email protected].

As we release more of our system we’ll also be setting up a platform for realtime discussion and sharing of results. Our goal is to accelerate knowledge discovery and that starts with building a community of scientists, engineers, and hackers (both human and AI).

Citation

To cite this post:

@misc{rekursivai2026pushingsudoku,
  author = {Kondratyuk, Dan and Dillon, Joshua V.},
  title = {Pushing the Limits of Autonomous {ML} Science: Sudoku},
  year = {2026},
  month = jul,
  publisher = {rekursiv.ai},
  url = {https://rekursiv.ai/blog/100-percent-accuracy-on-sudoku/}
}

References

  1. Adaptive Computation Time for Recurrent Neural Networks, arXiv:1603.08983.
  2. Generative Recursive Reasoning, arXiv:2605.19376.
  3. Lattice Deduction Transformers, arXiv:2605.08605.
  4. Less is More: Recursive Reasoning with Tiny Networks, arXiv:2510.04871.
  5. MAGVIT: Masked Generative Video Transformer, arXiv:2212.05199.
  6. Muon: An optimizer for hidden layers in neural networks, technical note.
  7. Probabilistic Tiny Recursive Model, arXiv:2605.19943.
  8. Query-Key Normalization for Transformers, arXiv:2010.04245.
  9. Speed is Confidence, arXiv:2601.19085.
  10. Structured Denoising Diffusion Models in Discrete State-Spaces, arXiv:2107.03006.

Appendix: selected benchmark results

These tables compare the main small recursive-model results and the most relevant visual or test-time-training systems discussed above.

Sudoku-Extreme

Method Params Accuracy
Ours (HPS) 7M 100.0%
LDT 0.8M 99.96%
PTRM 7M 98.8%
SIC 7M 97.2%
GRAM 10.9M 97.0%
TRM 7M 87.4%

Accuracy is whole-grid exact accuracy on Sudoku-Extreme. LDT’s row uses the authors’ corrected full-evaluation estimate rather than the original 100% claim.

  1. Specifically the Sudoku-Extreme benchmark. 

  2. Lattice Deduction Transformers originally reported 100% on Sudoku-Extreme, but the authors later corrected it to 99.96%

  3. We evaluated on AI Escargot, Inkala 2010, Arto Inkala’s 2012 puzzle, Golden Nugget, MagicTour Top 1,465, forum-hardest, Sudoku Explainer 11+, and Royle 17-clue catalogs, achieving 100% on all 99,768 puzzles. 

Join us → Return to the blog