My New Web Sudoku Technique is UnstoppableThe files are unavailable. This page is for historical interest only.Summary: It's an HTML Application that uses a naive algorithm to help you solve sudokus from Web Sudoku iteratively. If you want to do better, you can recompile the function it uses at any time. Sorry, but this only works on Windows (If I'm wrong, please tell me). My research indicates that Linux people don't like number puzzles (I'm joking). About Sudoku
It's like ultimate accounting!I played it twice, and it's exactly the kind of game you want a computer to play instead of you. I wanted to make a tutorial for people learning to program... which was a mistake. What was interesting was interactively debugging the algorithm. If this paragraph gets you warm and tingly, you'll love the rest of this article. Interactive Sudoku Solver
An HTA (HTML Application) is HTML + Javascript, but it has the same access as a real application that lives on your computer. That's why your browser might warn you about the possible risks of running it. If you're worried, you can always take a look at the source code, but there's nothing more dangerous than addictive pseudo-solving of sudoku. Iterative Sudoku AlgorithmI settled on a really simple algorithm, one that:
Basically it just handles the boring bits, which ends up changing the puzzle. For one thing, it solves most easy and medium puzzles on it's own; but on the harder puzzles, it frees you up to just try to find more interesting eliminations.
Can you do better?I hope so, I stopped trying to solve Sudoku early on (I've made a recursive solver, if you're the kind of person who cares about my coding skills). This changes the game though by removing only the most boring task, and makes the game more fun (at least for me). This algorithm sucks at beating the game (though it wins most easy games). If you want to do better click the "Switch View" button, make your changes and hit "Recompile". The function takes a 9 by 9 array p of 9-bit numbers, representing the possibilities of that spot. If you understand that, go on and change the function. Cross-site DHTMLNormally one website can't access another's content, there are good reasons for this (so I can't use javascript to open a window with paypal.com and read what you enter on that site). I often wish that I could turn that security feature off though, at least for say, http://127.0.0.1 a site a trust a great deal. HTML Applications are a Microsoft technology that amounts to nothing more than the operating system will trust a webpage with the extension .HTA more than a regular webpage. an iteration of my algorithmHere's my algorithm to pseudo-solve sudoku. It takes a binary representation of the possibilities for a square and rules out numbers based on the contents of the row, column and square. That's not always enough, a complete algorithm would either guess and recurse or check things like "this is the only place a 4 could go". But it turned out that an actual solver is pretty boring to code -- much like the game, it's just extreme accounting. |
What I've said lately Loading feeds
More of me on the web
|