4 ms·
Hi! I'm the author, didn't expect this to be posted here yet. I was still somewhat working on it, so please bear with me when you find anything weird. You can g
by TN1ck 2y ago
Hi! I'm the author, didn't expect this to be posted here yet. I was still somewhat working on it, so please bear with me when you find anything weird. You can give me any feedback here.
- Yawrehto 2y agoGreat article, no comments. I know the angry/dissatisfied people tend to give lots of feedback, but I really enjoyed your article and playing around with it.
- jcynix 2y agoI'll second that: great article and description of the problem space. Love it. Once upon a time I programmed a solution finder for the game https://en.wikipedia.org/wiki/Ricochet_Robots https://en.wikipedia.org/wiki/Ricochet_Robots because a gaming magazine had monthly problems to solve. But I wasn't allowed to run my program until my wife found a solution manually first ;-)
- alexworks 2y agoYour article is fantastic. I really like the way you present information, especially with the interactive examples. I've been playing a lot with the logic programming language, Prolog. Sudoku is a popular "hello world" for it. If you haven't used Prolog before, here's an example of a Sudoku solver. It uses Prolog's Constraint Logic Programming over Finite Domains library -- CLP(FD) -- a form of CSP. https://swish.swi-prolog.org/example/clpfd_sudoku.pl https://swish.swi-prolog.org/example/clpfd_sudoku.pl The relation on line 8 basically encodes the rules of Sudoku verbatim. Logic programming is cool (at least to me) because relations can be run in any direction with any number of variables. I wonder how writing a Sudoku puzzle generator would differ in a language that had first-class support for CSP.
- nhatcher 2y agoSuch a beautifully written blog! I have no comments so far, but I will read it through tonight again. I wrote a Sudoku solver using a SAT solver compiled to wasm (it is just a simple exercise TBH): https://www.nhatcher.com/hats/sudoku.html https://www.nhatcher.com/hats/sudoku.html https://www.nhatcher.com/post/on-hats-and-sats/ https://www.nhatcher.com/post/on-hats-and-sats/
- TN1ck 2y agoThank you and all the others here for the kind words, means a lot:) And the WASM solver is super cool, definitely useful for generating them as you have to do quite a lot of iterations!
- moffkalast 2y agoHey well if you insist, I did find something weird: numpad number entry doesn't work.
- TN1ck 2y agoThanks! That's what happens if you only use keyboards without a proper numpad, will fix soon. Edit: Should be fixed now.
- moffkalast 2y agoTIL the G915 doesn't have a proper numpad. Maybe it's some hack to reduce dimensionality for wireless transmission over that proprietary lightspeed protocol thing. Seems like it's fixed now though, thanks :)
- ashish01 2y agoIs there a way to download the problems via an API, or have them available in a file like https://norvig.com/top95.txt https://norvig.com/top95.txt? It would make a great dataset for benchmarking different solver approaches.
- TN1ck 2y agoThanks for asking, I made the data that I used for the analysis available as JSON here: https://github.com/TN1ck/tn1ck.com/tree/main/lib/sudoku https://github.com/TN1ck/tn1ck.com/tree/main/lib/sudoku.
- SushiHippie 2y agoReally love the UI! Though the color of the inserted numbers and the highlight color of the current selected number are nearly the same, would be great if they were much more distinct.
- TN1ck 2y agoThanks for the feedback, changed the color to orange for the highlight.
- SushiHippie 2y agoThanks for the quick fix! Another thing I noticed is that the wrong entry highlight sometimes highlights multiple correct numbers as incorrect and some static numbers will vanish. Before: https://ibb.co/Dtk3YXT https://ibb.co/Dtk3YXT After: https://ibb.co/mvJWC1f https://ibb.co/mvJWC1f (Also now red and orange are a bit too similar ^^, maybe introduce the color blue?)
- rustystump 2y agoFantastic work. You have many other hidden gems on your site I'd recommend people read too.
- tugberkk 2y agoThis should be an academic paper, great writing.