Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Would be even cooler if the page procedurally generated a new puzzle every time it reloads. Not sure how you would go about procedurally generating nontrivial but possible puzzles; that could be an interesting computer science challenge.


sort by: page size:

Thanks for pointing this out, I didn't know about this. I will look into improving the puzzle generation function.

I feel like a more interesting piece of code would be one that generated random (but solvable) puzzles and showed what the minimum number of moves was to solve them.

I love these! I tried automating the creation of them a while ago[1] (refreshing the page creates a new one). I should probably revisit it though as the generated puzzles aren't tricky enough..

[1] http://padolsey.github.io/redoku/


This was a cool problem. What would be even more interesting is generating puzzles like these.

Did you try graphing how runtime scales as a function of puzzle size? (Assuming there are puzzles available of large sizes.) It would also be cool if your program could be used to generate new puzzles?

The puzzle generator is described in the following blog post: https://www.snellman.net/blog/archive/2019-05-14-procedural-...

I want to play more, 1 puzzle per day is satisfying for word puzzles but not for this kind of puzzle IMO

Maybe you can still have a hand-curated daily puzzle, but also have some procedural generation to have endless puzzles


How about some wonderful cryptic set of puzzles, where you provide website links that have new puzzles they have to solve before they can continue the puzzle.

This is cool! I once wrote a method for generating logical deduction problems:

https://github.com/shaungallagher/cheryls-murder/blob/master...

As with the procedural puzzle generator, it takes a bit of sifting to find puzzles that are both possible and challenging to solve. But it gets you most of the way there!


Yes I have a puzzle generator program, will post more soon

Super cool! Maybe a bigger board would be cool too :D

Would also love to hear about how you designed the algorithm for generating puzzles!


Hi,

Thanks for the feedback. These puzzles are randomly generated, the code for it will be open-source soon! Regarding your issue, which browser/operating system are you using?


Any chance you'd write a technical article on your algorithms? I'm in love with puzzle manipulation code. Seeing the sort of things you're doing would be a lot of fun.

It looks like an interesting type of puzzle for AI. I think a blog post comparing different engines and text length would be very interesting.

I wrote one in JavaScript a long time ago, again using a simple backtracking algorithm.

http://www.amrittuladhar.com/projects/sudokusolver/

EDIT: Just realized the "load puzzle" feature doesn't seem to work on Chrome, but it does in other browsers.


I always wonder how the puzzles for games like this are created.

Can this be done procedural? Or did you have people sitting there and come up with new puzzles one at a time?


Would be nice if you allowed users to define their own puzzle. I had to set a break point at the right location and call startNew([..my array]) to do so.

Do you think there'd be a way to generate the puzzles that make a case like this is impossible? Like with this puzzle it's a 50/50 gamble whether you get it all in one guess or not

Really fun idea and a great implementation. I have been trying to come up with programming puzzles for my own project https://www.dev-esc.com - an escape room for devs

My own “Show HN” is at https://news.ycombinator.com/item?id=28579191

andersource would you be willing to consider letting me incorporate something like a checkerboard puzzle?

Have you any metrics on average completion times etc? Striking the right balance between fun vs difficult has proved tricky for me.

next

Legal | privacy