Live data from Hacker News

The Miracle Sudoku [video]

youtube.com

61–70 of 150 posts

Re: The Miracle Sudoku [video]

#61
post #53

How on earth do you create a puzzle like that? Coming up with the rules it's presumably simple to generate solutions with a computer program, but how do you then work out the cells which need to be filled in order to not only minimally describe a single correct solution, but also leave a reasonable deductive pathway to that solution? I think that's what boggles me most about this, the deductive pathway that's been cr…

There is a pattern in the solution: Consecutive numbers are separated by one field and enumerated horizontally from the left to the right, wrapping around the edges, i.e. ..._4_3_2_1.

Every line of the solution has the same sequence of numbers, shifted by 4 places to the left relative to the line above it.

This makes me believe the construction is based on a clever observation and repetition of a pattern.

Re: The Miracle Sudoku [video]

#62
post #58

How do know if a certain puzzle is impossible (ie malformed)?

That is a "decision problem": Does this puzzle have a solution?

For Sudoku, that's easy to verify. That makes it an NP-problem. But for Sudoku, finding a solution is very difficult, so difficult that we say it's NP-Complete. So the only way to verify that a Sudoku can be solved, is really to try a bruteforce (potensially sped up with guesses/backtracking) and then find out if you cannot continue because of a broken constraint somewhere.

Re: The Miracle Sudoku [video]

#63
post #36

Earlier quoted context omitted.

Sure you can, just brute force your way to ensure there is only a single solution. You can try all combinations and count how many reached to the end and check if count == 1. Generating sudokus while all you have a sudoku solver seems an interesting challenge. Sounds like it can be done though, just a matter of creating random boards by adding one digit at a time that doesn't break rules and check if # of solutions i…

That doesn't guarantee you that you generate a Sudoku solveable without backtracking. The human techniques are all about forward actions only, never guesses.

Hmm I don't get what you mean. For a valid sudoku there shouldn't be any guessing involved? So during any stage of solution, there should be always a single move that is the only option option move solution forward?

But even then humans do "moves" like "if i put that number here then that eliminates all other possibilities, that leaves us only that other number", which is kinda like guessing. So even if there are no single so human also tries if a valid move will block all future valid moves. A brute force algorithm does just that, except that it has a much larger memory and computation speed so it can think that at 9x9 depth to find a perfect solution

Re: The Miracle Sudoku [video]

#65

Earlier quoted context omitted.

I recently started increasing playback speed on many videos I watch. It's really hard at first, but I quickly got used to it, to the point where I now use an addon to increase playback speed to 3-6x where appropriate. When there's something complicated, or something I want to enjoy and savior, I jump back and slow down. This is an incredible time saver. I got inspired to do this by observing a blind programmer use a…

which addon are you using for speedup?

Add a bookmarklet. You add a bookmark, and then you replace the URL with one of these:

Interactive variable-rate:

  javascript:void%20function(){document.querySelector(%22video%22).playbackRate=parseFloat(prompt(%22Set%20the%20playback rate%22))}();
One-click (I have half a dozen of these):

  javascript:void%20function(){document.querySelector(%22video%22).playbackRate=2.7}();
These work on any non-iframe HTML5 video player. I'm pretty sure you can edit to work on audio too, but that's less frequently useful. I guess this version of the code only works on the first video in a page; that has never limited me, but it's easy to fix by changing to `querySelectorAll` and using a `.map` (or `.forEach`) with anonymous function. The bookmarklet technique doesn't work on iframes (like embedded players often are), but only because of browser security restrictions, so if you open the dev console (ctrl-shift-i), you can choose from

1) just load the iframe itself, or

2) run the JS code yourself in the browser console, where the browser's security rules don't stop you

If you're an even modestly competent web developer, you can solve novel UX problems on any website you use moderately often, or in this case UX problems with HTML elements that appear on many many websites.

I agree with the grandparent poster. I watch nearly everything at 1.5x to 3x speed (anything where the timing/tempo isn't itself part of the subject matter). Perhaps I should up my game and go for the "3x-6x" GP claims, because still some content is just too damn slow. Basically the clearer the enunciation of the speaker, the faster you can watch it. Pause and rewind as necessary (e.g. on YT it's space to pause and left arrow to back up 5 seconds).

Re: The Miracle Sudoku [video]

#67

Any other puzzles with deep deductive reasoning where one can get better at through playing. One comes to mind: hexcells, any others?

I also asked this question in another thread here, got some responses and included my tips: https://news.ycombinator.com/item?id=23245258

Re: The Miracle Sudoku [video]

#68
post #24

I almost didn’t watch that’s because who cares about someone solving a sudoku puzzle, but that was brilliant. That’s one happy solver; it was worth it just for the absolute joy he gets from it. Amazingly quick solving too. Good to watch him develop extra strategies during the process.

Agree! I was very sceptical even opening the video. And then, 25 minutes later…

Re: The Miracle Sudoku [video]

#69

Using my CL based sudoku solver [1], I got the following solution. The solution is valid but different from what is shown in the video. IIRC, a sudoku board can have multiple solutions but anyone out here can explain why so? I am no sudoku expert or enjoying solving sudokus anyways! [1] https://github.com/dmsurti/sudoku ``` (setf board #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0…

The first line of your result fails the orthogonal adjacent rule of this puzzle eight times!

Re: The Miracle Sudoku [video]

#70

Using my CL based sudoku solver [1], I got the following solution. The solution is valid but different from what is shown in the video. IIRC, a sudoku board can have multiple solutions but anyone out here can explain why so? I am no sudoku expert or enjoying solving sudokus anyways! [1] https://github.com/dmsurti/sudoku ``` (setf board #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0…

Your sudoku solver is solving a different puzzle altogether from the one posed in the video. Sudoku puzzles also don't normally have multiple solutions. The smallest known Sudoku satisfying that constraint have 17 clues. Offering only two clues is possible here because of the additional placement constraints.
Post reply on HN