Javascript Sudoku Solver



Friday afternoon I started to get a bit.. bored. For some reason I decided to cope with that by writing a sudoku solver in javascript. The logic is pretty minimalistic, so it won't solve the difficult sudoku puzzles, but for you normal "in the comics section of the newspaper" puzzles, it should nail the majority of them.

You can copy the html below if you want to include it on your webpage/blog/whatever for some reason:

<script type="text/javascript" src="http://sparxmind.com/sudoku.js"></script><noscript><a href="http://sparxmind.com/2007/09/16/javascript-sudoku-solver/">Javascript Sudoku Solver</a></noscript>

Tags: , , , , ,



Subscribe Did you like this post? Great! Subscribe to the sparxMind RSS Feed!

4 Comments »

  1. unlikelymoose (375 comments) said,

    pajama mamma! You just wrote a javascript at will like that? That'd take me much time to do. You are a javascripting foo'.

    September 17, 2007 @ 8:18 pm


  2. sparx (882 comments) said,

    It's a horrible habit.

    You should look at the source – it's a brilliant mess that makes almost zero sense. 🙂 If you didn't know it was supposed to solve a sudoku puzzle, it'd be almost impossible to tell.. actually, even knowing what it's supposed to do…
    Comments are your friend.

    September 17, 2007 @ 8:44 pm


  3. sparx (882 comments) said,

    There's also a cell spacing issue in Internet Explorer.. but I'm feeling lazy now, and it works fine in firefox.

    September 17, 2007 @ 8:45 pm


  4. unlikelymoose (375 comments) said,

    I am a Suduko professional. I do not appreciate you cheating at Suduko. Please reconsider the function of your Suduko program.

    June 9, 2009 @ 11:44 am


RSS feed for comments on this post

Leave a Comment