Hacker News new | ask | show | jobs
by vunderba 54 days ago
Nice job. I'd seen similar things in the past but I had no idea this was an actual type of puzzle.

Your game has a bug which is relatively common in drag-and-drop games. If the viewport is smaller and I drag a match off-screen by accident, it can get stuck to the edge. Then it can become detached in such a way that makes it impossible to recover the match.

https://en.wikipedia.org/wiki/Matchstick_puzzle

2 comments

Thanks for trying this out. I'll fix the off-screen issue later.

I created this game because of an old news my wife shared with me, it was about The New York Times bought the Wordle game. I was then surprised that such a simple, old-style game caught the attention of a big company. I said "I'd rather play a matchstick puzzle", and it was that moment that inspired me to create a free online version with all the puzzles procedurally generated by my own hand-made solver (I like the sound of this :D). Personally, I like moving one and only one matchstick to solve a puzzle rather than 2 or 3 sticks, also I don't like those tricky solutions like negative number, rotation trick and etc. although they could be a very creative solution and let you think outside the box sometimes, IMO, it is just not elegant and sometime distracting to encourage people to think in a systematic way.

You made me chuckle a bit with the whole “hand-made solver” thing with discrete puzzles like this, since 99% of the time to create a new puzzle, you just start with a solved problem (arithmetic equality) and introduce a sequence of random valid moves to put it in a unsolved state.

I remember one of my freshman computer science assignments was to make a Rubik’s Cube game. That was when a lot of undergrads were first introduced to the idea of using a stack and then "unwinding" it to simultaneously build the problem + solution.

yeah, the solver behind Mathstick is pretty much like what you described: building the problem + solution simultaneously, besides you also need to collect the multiple solutions for the same question and information for further classifying the difficulty of a puzzle.

Just like "hand-made" pizza used as a response to the rise of frozen, factory-produced pizza and to establish authenticity against fast-food chains. Maybe "hand-made" will be used to emphasize a app/software is made by human rather than being vibecoded or completely AI generated in the future. Also, if you use the Puzzle Maker to create your own puzzle, it becomes a "hand-made" puzzle :)

Fix the off-screen issue. Now the previous stuck stick will be reset to the original place on your next drag. Thanks for pointing this out. And you probably need to refresh the browser to see the new update