<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Corbin</title>
    <description>The latest articles on DEV Community by Corbin (@sudoku_online).</description>
    <link>https://dev.to/sudoku_online</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3689803%2Fbce7a1bb-9081-42f1-8e94-e10d21b94f1f.png</url>
      <title>DEV Community: Corbin</title>
      <link>https://dev.to/sudoku_online</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sudoku_online"/>
    <language>en</language>
    <item>
      <title>Building a Browser Only Sudoku Solver</title>
      <dc:creator>Corbin</dc:creator>
      <pubDate>Mon, 05 Jan 2026 04:41:28 +0000</pubDate>
      <link>https://dev.to/sudoku_online/building-a-browser-only-sudoku-solver-4b58</link>
      <guid>https://dev.to/sudoku_online/building-a-browser-only-sudoku-solver-4b58</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ze1ef003c9tumeuq8mg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ze1ef003c9tumeuq8mg.png" alt="screenshot of Sudoku solver" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ea022fhfr219a7hfqsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ea022fhfr219a7hfqsk.png" alt="screenshot of Sudoku solver" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sudoku looks simple, but checking whether a puzzle is valid, has one solution, or is genuinely difficult turns out to be more complicated than it first appears.&lt;/p&gt;

&lt;p&gt;I wanted a small tool that could answer a few basic questions without relying on a server or external libraries. Everything runs directly in the browser as a static page.&lt;/p&gt;

&lt;p&gt;This post walks through how the analyzer works and why a few design choices mattered.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Puzzle input&lt;/strong&gt;&lt;br&gt;
The tool accepts a single 81 character string.&lt;/p&gt;

&lt;p&gt;Digits 1 to 9 represent givens.&lt;br&gt;
Dots or zeros represent blanks.&lt;/p&gt;

&lt;p&gt;Example input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4.....8.5.3..........7......2.....6.....8.4......1.......6.3.7.5..2.....1.4......
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This format is common, compact, and easy to share, which makes it practical for links and testing.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Validity checking comes first&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before doing anything, the grid is checked for basic Sudoku rule violations.&lt;/p&gt;

&lt;p&gt;Each row, column, and 3 by 3 box is scanned for duplicate values using simple sets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function isValidGrid(grid) {
  const seen = new Set();
  for (let r = 0; r &amp;lt; 9; r++) {
    for (let c = 0; c &amp;lt; 9; c++) {
      const v = grid[r][c];
      if (!v) continue;
      const key = `${r}-${c}-${v}`;
      if (seen.has(key)) return false;
      seen.add(key);
    }
  }
  return true;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This step filters out invalid puzzles early and prevents unnecessary solver work later on.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Using logic to estimate difficulty&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Difficulty is estimated using basic human style techniques rather than brute force.&lt;/p&gt;

&lt;p&gt;The solver applies a small set of logical steps.&lt;/p&gt;

&lt;p&gt;Naked singles&lt;br&gt;
Hidden singles&lt;br&gt;
Naked pairs&lt;/p&gt;

&lt;p&gt;Each time a technique is applied, it is recorded. The hardest technique required becomes the difficulty indicator.&lt;/p&gt;

&lt;p&gt;This approach is not perfect, but it is explainable and consistent, which mattered more to me than an opaque rating.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Counting solutions without freezing the page&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Counting solutions requires backtracking, which can get expensive very quickly.&lt;/p&gt;

&lt;p&gt;Running that on the main thread can lock up the browser, especially for open puzzles with few givens.&lt;/p&gt;

&lt;p&gt;To avoid this, the uniqueness check runs inside a Web Worker with a strict time limit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const worker = new Worker("worker.js");
worker.postMessage({ puzzle, maxSolutions: 2, timeLimitMs: 900 });

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If more than one solution is found, the worker stops early.&lt;br&gt;
If the time limit is reached, the result is reported as unknown instead of freezing the interface.&lt;/p&gt;

&lt;p&gt;This keeps the page responsive even for difficult inputs.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Why keep everything static&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Keeping the project browser only has a few practical advantages.&lt;/p&gt;

&lt;p&gt;No server costs&lt;br&gt;
No setup required&lt;br&gt;
Easy to host on GitHub Pages&lt;br&gt;
Simple to inspect or fork&lt;/p&gt;

&lt;p&gt;It also makes sharing puzzles easier since the full state can live in the URL.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Demo and source&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can try the live version here:&lt;br&gt;
&lt;a href="https://sam-perry-usa.github.io/Sudoku-Analyser/" rel="noopener noreferrer"&gt;https://sam-perry-usa.github.io/Sudoku-Analyser/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The full source code is available on GitHub:&lt;br&gt;
&lt;a href="https://github.com/Sam-Perry-usa/Sudoku-Analyser" rel="noopener noreferrer"&gt;https://github.com/Sam-Perry-usa/Sudoku-Analyser&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Related&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you enjoy logic and number puzzles, you might also like &lt;a href="https://www.sudoku4adults.com" rel="noopener noreferrer"&gt;Sudoku4Adults&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>sudoku</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Corbin</dc:creator>
      <pubDate>Fri, 02 Jan 2026 11:54:05 +0000</pubDate>
      <link>https://dev.to/sudoku_online/-2iho</link>
      <guid>https://dev.to/sudoku_online/-2iho</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/sudoku_online" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3689803%2Fbce7a1bb-9081-42f1-8e94-e10d21b94f1f.png" alt="sudoku_online"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://gg.forem.com/sudoku_online/my-first-game-online-sudoku-1k7" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;My first game - Online Sudoku&lt;/h2&gt;
      &lt;h3&gt;Corbin ・ Jan 2&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#gamedev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#sudoku&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#puzzlegames&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#indie&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>gamedev</category>
      <category>sudoku</category>
      <category>puzzlegames</category>
      <category>indie</category>
    </item>
    <item>
      <title>My first game - Online Sudoku</title>
      <dc:creator>Corbin</dc:creator>
      <pubDate>Fri, 02 Jan 2026 11:51:28 +0000</pubDate>
      <link>https://dev.to/sudoku_online/my-first-game-online-sudoku-1k7</link>
      <guid>https://dev.to/sudoku_online/my-first-game-online-sudoku-1k7</guid>
      <description>&lt;p&gt;I have been learning / building an &lt;a href="https://www.sudoku4adults.com/" rel="noopener noreferrer"&gt;online Sudoku Puzzle&lt;/a&gt; website as my first game dev project, and it  has been challenging for myself to say the least. &lt;/p&gt;

&lt;p&gt;Sudoku4Adults offers multiple puzzle difficulties, smart hints that actually explain the next move instead of giving the answer away, and helpful features like color cell shading, auto pencil, and dark mode for longer sessions. Each puzzle also shows its hardest technique indicator and SE ranking, which is great if you enjoy tracking progress or improving your solving skills.&lt;/p&gt;

&lt;p&gt;Every puzzle has its own shareable URL, so it is easy to send a challenge to a friend. The goal was to keep the experience clean, focused, and satisfying with minimal distractions.&lt;/p&gt;

&lt;p&gt;If you enjoy Sudoku, feel free to check it out at&lt;br&gt;
&lt;a href="https://www.sudoku4adults.com/" rel="noopener noreferrer"&gt;https://www.sudoku4adults.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More features and refinements are always on the way, so this is just the beginning 😊 Let me know if you can think of any features that I should add.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>sudoku</category>
      <category>puzzlegames</category>
      <category>indie</category>
    </item>
  </channel>
</rss>
