Show HN: I may have created a new type of puzzle
dogbunnypuzzle.com
dogbunnypuzzle.com
I'm also immediately kind of addicted to this....I really like it.
The one thing that annoys me is that I can't see what a symbol is if the dog/bunny is on it because it's covered up. It's hard to remember when there's so many. Some transparency or slight design adjustment would fix this easily.
Should have been a "back" button or smth!
That being said, not sure what the transition labels mean. "Somebody at bone", "Somebody at carrot" or "nobody at bone" means nothing to me. I suspect there's another game that I don't know about that would provide the context.
Had these hints been there I'd have been bored rather quickly.
Don’t get me wrong, there is still a place for games with mystery and obscure mechanics etc, but it doesn’t make sense for most games to be like that. It’s just an unnecessary way to keep away players that would otherwise love the game.
Play through portal with developer commentary, that's a masterpiece on how to use hints well without players even realizing.
Things like how hallways are structured, where light is shining, etc.
Reinforcing the rules of the puzzle when you try to violate one is a good idea.
Same, so I tried, and it was very obvious that it didn't work, so, and. Discovering that was, to me, part of the whole experience that makes it rewarding.
In a similar vein, when both dog and bunny are on one field, I can't choose which one to pick up.
Overall, yeah. It has the feel of a clever, loveable game... how it comes together.
Great work. I love these postings. Very artistic.
One option is that a subtle version of the location image pops up next to the location space if it is occupied
Right now you could only move the upper one.
I recognize that this is a really bad idea from a usability/discoverability perspective, but wouldn't it be charming!
Great feedback! Yes, I am the "Land of Lisp" guy
Sorry about the potential epilepsy trigger- that was the fastest way I could think of to code a quick "reward effect", I will do something different in the next version. I didn't really expect anyone to care enough to solve the puzzle lol.
Now that I know people like the puzzle, I will build out the website and post regular puzzles, follow my Twitter @lisperati for updates.
[1]Well compared to me anyway
1) I thought that, obviously, rabbits and dogs couldn't occupy the same space, lest the dog attack the rabbit, causing a lose-condition
2) I assumed that only one animal could occupy a node.
The game, until the last move, is winnable with those extra rules.
But yes, I never thought about rule 2 until I got the dog and one rabbit in place and hadn't won.
farmer, fox, chicken, and grain, and only three of them can fit in the rowboat
foxes eat chickens and chickens eat grain would be a nice type of constraint OP could add to the puzzles
This instance of the puzzle is also easy enough to actually solve this way. Wouldn't work nearly as well with 25 nodes, 5 rabbits and 3 dogs...
Second, is she available for lessons?? :)
Though, sheepishly, I wouldn't have even mustered the energy had I not seen that someone's kid solved it in two minutes.
If I'd had to think about it without interaction... I'd probably never get it.
I do a lot of graphical work, and have to make things fit / function and the only way to do that is hack it, and then clean it up so it looks planned.
He started with furious swiping right off the bat. I started by reading everything and thinking through moves in my head without even trying to swipe.
I think we ended up solving it in about the same amount of time. Interesting that the rapid iteration method and the measured thoughtful method yielded similar results.
I effectively solved the question of "wtf is this?" and the puzzle at the same time.
But after that I really wanted to play again!
I've played kinda similar things before, such as Baba is You.
Yeah I'd love to see more of these. Now I wanna make one myself.
The one issue he had was whenever he'd try to move a rabbit from boat to house, he'd accidentally trigger the browser back function because he was starting too close to the edge of the screen. Then the puzzle would be reset when he navigated back to the page.
This caused a lot of frustration because he could be careful when he was thinking about it, but then he'd get absorbed in the puzzle and forget to swipe carefully.
Now I'm imagining a version where the animals get antsy and start hopping around on their own if you take too long to make a move.
This was a popular thing to do in ye olde commodore 64 days, because you could cycle the background color easily in basic, and nobody thought yet that a video game could trigger epilepsy
(honestly, I'm a bit skeptical about this theory even today, but will defer to the typical opinion on this matter, not being an epilepsy expert)
Granted there is the blue feedback if you are on the flower, but it’s confusing when you are trying to plan ahead.
edit: Fun puzzle though!
Suggestions:
- Mark uncrossable paths with (an 'X' in the middle of the line) OR (red) to make it clearer that the path cannot be currently crossed.
- Mark paths with fulfilled conditions (as green OR with the 'X' removed)
- Mark fulfilled conditions with (a tick symbol OR green) and unmet flags with (a cross ('X') OR red) to make the fulfillment state of conditions obvious.
(edits because I can't use emojis in HN comments.)
Perfect illustration of how hard game design is.
1. It was good enough that I finished. This is success! Good job!
2. It took me too long to realize characters could occupy the same space, and the game doesn't draw characters occupying the same space very well.
3. The flashing lights at the end are too fast, slow them way down and it will still look good. You'll probably only have to change a number in your code.
Re: 2, it seems intentional when two occupy the same space, 1 of them gets priority and has to be moved first? Ideally, you could pick which 1 of the 2 you could move, but removing this choice makes the puzzle harder.
Re: 3, I don't like the flashing lights/colors at all. Putting a "You win" or "Congrats" <div> somewhere prominent on the page is probably enough. Flashing colors is very painful on the eyes.
I solved it in under 15 minutes or so (multitasling and I didn't time myself) .. and at no point did I even attempt to have two characters on the same space or pass through each other .. other than the final goal of two bunnies on the carrot.
Clearly:
* I'm to dumb to have tried !!
* It can be solved with with a "only ever one character on an intermediate non goal tile" .. although that is probably a slighty longer fiddlyier way of doing things.
If you want to train novices up to solve very difficult puzzles of this style (or whatever style), start with very simple puzzles and build your way up in a sequence of steadily increasing difficulty, introducing only about one new trick at a time.
The tricky part of this puzzle is getting the rabbits down from house to tree. In order to move anyone from the top area to bottom area, you need to have someone in the bottom area shuffling back and forth, and also someone else in the top area.
Specifically, you need to get one rabbit to the bone (dog must be at carrot) then move the dog back to the flower so the other rabbit can go down to the tree. Once one rabbit is in the bottom area the dog can move to the top area to help get the other rabbit down.
Took me about 2 minutes to figure out what to do, and then another few minutes of dragging stuff around to execute. But again, I have been doing a lot of puzzles with my kid recently, so this kind of thing is top of mind.
I never said this isn’t a fun tricky-but-not-too-tricky one-off puzzle for out-of-practice adult puzzle solvers. (It has one key trick that someone who doesn’t do very many puzzles might take a while to figure out.) I only said it was pretty easy for me personally.
I further claimed that if you want to train complete novices (I am thinking of my 6 year old here, or his less experienced 6-year-old friends) to solve very hard variants of this puzzle, you should start with easy puzzles and introduce one new trick at a time. If your goal is not to train novices to solve hard puzzles, then feel free to disregard this advice.
There are some fun harder tricks that you can throw into this genre of puzzle (not included in this particular example) that if you tried presenting to my 6 year old would completely stump him. But after working his way up methodically he could be taught to notice and solve them.
I don’t know too much about puzzle video games (web or otherwise), but we have this week been playing the recently released game Railbound which is pretty fun and has some quite tricky puzzles.
d
You’d think that it would be part of game theory, but all the game theory I’ve seen deals with multiplayer games, but it seems like a cooperative total information n-player game is essentially the same as a one player puzzle. So maybe g.t. generalizes in this way.
There are 200 ways of doing this (if you don't distinguish between the 2 bunnies when they're on the same tile, 420 if you do).
If you merge together moves involving the same animal there are only 4 (with length 15).
https://gist.github.com/wrbs/5824e9b17c55b5ad3d8467f93e12ed8... (svg graph of the 4)
I tried to fuzz this rather than use an exhaustive search.
So random animals walk randomly.
It gets stuck. So I added if no animal moves after 100 attempts, restart.
But it seems to get stuck all the time. So it loops around mostly and eventually falls to the stuck position.
I have to think about this, is the entropy such that you'll never practically escape by randomly walking?
I feel like if I add more conditions it just becomes an exhaustive search with billions+ of times the extra calculations.
Shame. Shame. Shame. rings bell
However, one edge from house to tree wasn't clear at first because, I thought of it as logical or while it was about logical and. Other than that, pretty awesome work!!
Edit:: Scrolling down the comments someone seems to already implemented a graph search. That is pretty quick: https://news.ycombinator.com/item?id=32885309
http://hakank.org/picat/dogbunny_puzzle.pi
His website is a treasure trove for these kinds of problems and worth studying.
For those of us that are not experts, how is this sort of problem generally classified? I've seen others on here say classical planning, but I wasn't sure if that is correct.
(1) and
(2) or
(3) At bone to go up, at flower to go down [or the converse?]
Was able to figure it out through experimentation, but the signage doesn't make it obvious.
This gives me the idea to make variations of this puzzle to play with my 5yo using pencil and paper. It would be a fun way to teach the difference between AND and OR.
Plus I'll get to see the puzzles he comes up with, once he realizes he can make his own!
It would be neat if the conditional statements emphasized and deemphasized based on whether their condition was currently met.
Can you think of a way to re formulate the puzzle so that you can express the rules without words?
Also, the dog / rabbit dynamic (as used in the classic dog/duck/grain river crossing puzzle) made me think that I had to chase the rabbits with dog, or that dogs and rabbits couldn’t share a node. Different animals might be better — rabbit and mouse, perhaps? Or even different coloured rabbits and different coloured carrots?
The words thing though — that’s what you should work on next, I think. Good puzzles like this are word-free in the puzzle itself (Stephen’s sausage roll, English country tune).
It would take this puzzle from great to excellent. Good luck. More please!
Yes, I assumed first that no two animals could share a node at all until I was near the end (and saw that it would be necessary), and I still assumed that rabbits and the dog couldn't share a node ("the dog will eat the rabbit!") because of the river crossing thing, until someone in this very comment thread mentioned an unsolvable state that involved getting the dog a rabbit on the same node.
FYI It's not necessary to solve the puzzle.
Also it seems to have issues on FF/Linux because when I did stack a dog and a rabbit I could only then select the dog.
I'm imagining Haskell with emojis now.
https://gist.github.com/Erk-/be3ef032d31734b6f835edd9a9685af...
Perhaps just a picture of the state icon (or one with a slash through it) and have it "light up" when the condition is satisfied.
It's like the Wolf, goat and cabbage problem
https://en.wikipedia.org/wiki/Wolf,_goat_and_cabbage_problem
I wonder if this just gets localised to typical staple, typical predator and its prey?
I guess cabbage and wolf is eastern Europe / Germany?
It was an abstract simulation of the course of a human life: units of "time" spawned regularly in the middle of a black screen. These gravitated towards the cursor and had to be guided to text spaced around the screen: play, grow, work, etc., which all needed to be regularly tended to, with more and more "responsibilities" appearing as time went on.
Some day there'll be an AI search engine for 'tip-of-my-tongue' media. But what will have grown faster? The ability to catalogue things in the world, or the depth of obscurity of things that can be catalogued?
Edit: got it, remembered the dev's domain: https://faedine.com/games/spendyourtime/
I'm a sucker for graph and topology puzzles, so this was very enjoyable to me. I loved that you could clearly sense progress mounting with each step.
The flashing lights at the end could use a bit of calming down though.
Fantastic prototype, is what this smells like : p
I also found it took a while to understand the rules, which I enjoyed, but others may not.
You could add a restart button to encourage experimentation, or flash preconditions red when blocking passage to communicate rules more clearly, or start off with a simple puzzle that illustrates one rule then allow people to level up to more complex puzzles with additional rules.
Nice job.
3. Profit.
1. Create http://www.dogbunnypuzzle.com/ and post to HN
-1. be Conrad Barski 0. Create http://www.dogbunnypuzzle.com/ 1. post to HN
I wrote an automatic solver for the puzzle in Scala and open-sourced in GitHub. : https://github.com/yusungsim/dogbunnysolver Check it out!
I expect there would be existing solutions for (de)serializing the generic graph. One tricky thing (I think) is to encode the connection rules in some parsable format.
I'm planning on extending the connection rule to propositional logic and find some fancy way to efficiently en(de)code the PL formula.
Maybe I should spend some more nights to refactor my ugly code :P anyway thanks for the reply!
Thanks for unlocking an ancient memory. I'll have to see if I can track down my old copy of this book.
Edit: Unsurprisingly it appears I'm not the first to have thought of this, at least: https://tlo.mit.edu/technologies/making-screens-safe-those-p...
Edit: also, I expected OR rather than AND on the double constraint
1. Like other people I found the UX a bit confusing (figuring out that two animals can occupy the same spot, picking which one of them to move etc.)
2. This one seems hard for a first level, if it's addressed to a general audience. Even figuring out that some edges are directed is not obvious if you don't know about graphs in advance. You should build a tutorial for non-HN people.
3. Are there other levels?
4. Lights are flashing way too fast at the end. A text message would also be nice.
Otherwise a great job! Playable and fun once you get into it. Would totally play again :D
(Well obviously it's not and you were joking, but let's say you were not, for the sake of argument.)
Humans do this differently from machines. We look for strategies and have smarts to on-the-fly develop and refine heuristics that rapidly allow us to intuitively do branch-and-bound like algorithms and in the end solve this even though we brute force very litte, if at all.
That's why it took so long for machines to surpass us at chess or similar. It's a different approach. That's what makes machines better at certain things and humans at others. And there is a lot to be gained by trying to have machines also try human-like approaches to problems (strategy-developing rather than brute force).
You don't actually gain anything by unrolling everything ahead of time; it'd actually be worse because you'd store all the memory and wouldn't stop when you get to the solution. And you can't really factor the state space into subproblems.
Anyway, for this puzzle BFS would work, but classical planning in general gets astronomically exponential fast. It's a neglected field, not yet thawed from the last AI winter.
Great little puzzle, thanks for making this and sharing it.
I like the lack of instructions, it makes it fun to explore the rules. In fact, unique rules per game might be interesting to discover.
The UI is perfect, keep it simple and focused on play. Though, I agree with other comments that the final flashing lights should be slower.
A move count and leader board for time to complete and fewest moves to complete would make this social-ish.
Maybe hints for harder puzzles?
I could see this going a long way, so many variations to explore!
Two puzzles from Logical Adventure of the Zoombinis are very close, though.
The first is Captain Cajun’s ferryboat, which you can see at https://youtu.be/_JlMcs_2xes. The constraint is that all zoombinis you seat on the boat must share at least one trait with at least one of their neighbors. It doesn’t really impose spatial dependencies of movement like your puzzle does though.
For one that does, but by taking on a cartesian grid, you can look to Bubblewonder abyss https://youtu.be/vx1yFKVdq9o, which on its hardest difficulty adds many, many rules to moving between nodes based on traits, plus re-use toggles (so if a node is visited twice, it goes two different places, “capture” triggers of glowing colored particles that holds one Zoombini captive, and a “release” button that lets it go.
It took me a minute to figure out the rules, but I was able to with some experimentation. I think the lack of explicit instructions adds to the charm.
There’s lots of other elements you could add to these puzzles to spice them up, eg, wolves that try to eat the rabbits, or streets which are blocked at a certain frequency by cars.
Some feedback: - needs a reset button! And maybe a sad-rabbit ‘you failed’ notification if you get stuck. - it already looks good, some cute animations would go a long way if you decide to work on the presentation - you could make it a little more obvious what moves are available when you pick up a dog/rabbit, the shift from white to blue didn’t always ‘grab’ my eye and sometimes I didn’t notice a move was available. Again, a simple animation would help - overall I like the minimalism though, so I don’t think you need to go overboard with visual improvements :)
You could change the page title from "React App" to something more appropriate.
- consider writing key rules on the page. I've had an incorrect assumption that the dog and the bunny cannot occupy the same square.
- displaying a restart button would be useful once there are no legal moves left (for ex. all characters stuck at the yacht)
Edit: seems like there are quite a few more situations like that. I am just gonna consider it "You Lose" -- when you are forced to refresh the page.
It took me a while to realize you could put two animals on the same node as the animals are large enough to cover the entire node, which normally means they can't overlap. It also wasn't immediately obvious how multiple conditions on the same vertex interact, i.e. whether it's an either/or or and. This was a problem for me because I couldn't initially see the covered symbols and thus didn't know one condition was already met.
The only real problem, as others have pointed out, is the strobing effect. If you want an easy option that's safer and more pleasant consider simply adding confetti: https://www.kirilv.com/canvas-confetti/
[0]: I don't like thinking too many moves ahead so I often found myself having to run the same animal in circles to activate a condition I had overlooked. Again, this is a me problem. It's why I don't like chess.
- good difficulty level. Needed to do a lot of doubling back to solve it.
- Rules we’re easy to figure out for the most part. It would help to add more visual cues about (dis)allowed paths. Ie, given the node occupancy right now, which paths are valid?
- it took me a minute to figure out that valid destination nodes highlighted when I started dragging an animal. Maybe make the invalid nodes red too.
- I assumed that animals couldn’t share nodes. I didn’t try that for a bit, which slowed me down a lot. Wasn’t clear how to chose the “bottom” animal on a node. I also assumed that even if the rabbits were allowed to share a node, a dog and a rabbit could NOT share a node because the dog would eat the rabbit.
- overall a nice example of complexity emerging from a simple rules, which is what you need for a puzzle.
- it’s annoying that you can’t see the node label for occupied nodes
- obvious stats to track include overall time to solve and moves to solve.
Where it gets complicated is that each creature will in a straight line move up, down, left, or right as far as they can until they hit a wall. You can't stop in the middle of the floor and turn, although there are arrows on the floor that will redirect them, and even teleport pads. Each tiny also acts as an obstacle to other tinies, so you can place them in a particular location to force another tiny to stop short so they can be moved in a different direction some distance from a wall (similar to your conditional graph edges).
Congrats! This is really good.
Unsure if it's a new "type" of puzzle. Virtually any game with multiple characters, buttons and doors plays like this, and can be reduced to a similar graph.
Despite that, I don't want to discourage you. Originality doesn't matter that much. Keep making puzzles like these.
It was so funny to suddenly go from noisy bunch of us to each person quietly studying the problem followed by the occasional “wth??”
They all want to know if this is going to be a daily thing now.
The only question mark we have is whether the game will be fun on a regular basis since so much of the fun (and satisfaction) actually came from figuring out the rules of the game in the first place :D
Having two conditions on the same edge was confusing because being on different sides reads like an OR. And it's too my personal preference that it be entirely pictoric (eg. the same tiny tree but drawn inside a little circle through the edge as forming a part of it, or the same but crossed out for the bone). That way AND vs OR would be easy to read too, depending on weather the icons go along the edge for AND (eg in two little circles, or maybe a bigger one split across), or the icons are on the sides of the edge (with the circle being cut by the edge)
That having been said, and I apologize for raining on the parade, but I do not think it is a new type of puzzle. It's basically a visual representation of a state machine. I believe the classic "Get the farmer across the river with his wolf, goat, and cabbage" puzzle is the same sort of puzzle and could be represented in a similar way.
If there is some aspect of it that I have failed to take into account that makes it unique, I'd very much like to know!
And again, thank you for sharing this; it was fun ^_^
Nothing happened when I reached the win condition though. Shrug.
You might consider updating the meta tag that handles the Open Graph text preview image. Right now the text preview image of your website on an iPhone is the React logo.
https://developer.apple.com/library/archive/technotes/tn2444...
Another possibility is a "hover" state when when you mouseover a node with 2 animals, they animate quickly into a side-by-side orientation so you can easily pick which one you want to interact with.
Do you have an automated solver or a way to procedurally generate games? You could produce one a day and get the next wordle going.
Work it into a randomly generated daily puzzle and you might have something!
I believe it's easily possible to make puzzles where you can move into a subgroup that doesn't include the solution. Where that's possible you really want to solve the whole thing mentally before moving any pieces.
This seems like a visualized version of the logic problems on the LSAT (and used to be on the GRE?).
Nicely done!
- It's not clear that you can drag the characters.
- Tried to scroll and thought something was wrong when it wasn't working.
- Looks like you can also drag the main map image at least on Firefox which makes it slightly more confusing for those without much experience with React or programming in general.
- The rabbits looked scared or sad I thought the puzzle had something to do with that, it doesn't.
The snapping is great. The tweening is great. I guess this is uses draggable? It could have gone wrong a thousand ways but its a great success in terms of usability (I'm on mobile)
in terms of the puzzle itself I found it a bit confusing, but I'm sure you'll figure it out. it takes real initiative to just code a thing and try things out
Note: it doesn’t work on mobile.
(Once you beat it, google Heroes of Sokoban 2 and 3 for more levels)
A minor issue: It would be nice if nodes could be skipped.
E.g. initially, the dog is on the tree and can move to the carrot in two steps. It is required to make both steps and drop the dog on the well. I would prefer if I could put the dog directly on the carrot, or if I could put the dog on the carrot after hovering the dog over the well.
Not sure if it’s an issue on iPhone or my IQ, but I can’t figure out what the rules are. I highlight an animal but can’t move it on what seems a bidirectional edge (no nodes light up). But sometimes can. I assume that should work always but it’s not for me.
Also initially assumed I had to keep them separate, but comments here said no.
Some edges are one-way (marked with an arrow).
Some edges are only open when an animal is (or is not) on a certain space, as indicated by the text on that edge.
More than one animal may share a node at the same time.
By the way, on Firefox/Android a bunny flew away to never return when I was dragging it from the boat.
I did like the presentation, however! I think it has potential for a series of escalating difficulty.
Only counter-intuitive aspect I figured out only after finishing the first play was that animals, even dog and bunny, can occupy the same spot. But since it's possible to finish the game without doing that (except the final move) it's kinda moot point.
I'd argue 2048 is harder to learn and that was a popular game.
Both have to be occupied at the same time; it’s not directional.
I'd like to see these be autogenerated, that seems like a fun problem to solve.
Or maybe even sokoban
Also feels similar to the problem of getting a fox, a chicken, and a sack of grain across a bridge.
The man needs to cross the river with a wolf, goat and a cabbage. Wolf would eat goat, goat would eat cabbage, boat has only room for two.
Every kid in Russia knows that puzzle, although your implementation is quite good.
But once I got it, it was super fun to play. I wonder if you can algorithmically generate these puzzles and have human's curate them based on factors (joy, difficulty, visual appeal etc).
Thanks for sharing. :)
One thing that I would definitely change is getting stuck. There shouldn’t be a state that you can’t get out of.
Really stoked
2. Would help to say "Somebody at bone AND Somebody at flower". I first interpreted it as OR and thought it was broken when it wouldn't let me move.
Nice work! Any feedback I would give is in other comments.
It's just a diagram showing labels and lines? But nothing moves, and I don't see any rabbits or dogs.
I checked developer tools, and there are no messages.
Not really sure what it's supposed to do.
Great game!!
The front end is boring JavaScript, because I use react relay a lot on other projects, which is not clojurescript compatible
The symbols are very hard to make out when the animals are on them. If this is intentional, then cover them entirely.
Idea: rabbit grab an object (e.g. a key) and needs it to reach a cell.
(I solved it without doing so because I assumed that was a constraint.)
Suggestions: if you run HakanK's program in this thread(or have your own), you can determine the optimal # of moves and use that to score folks. It would be cool to be able to compare against my friend group that does daily games like this to see who got closest to the optimal number and who got the lowest time. I really enjoyed it!
Edit: I don't care about leaderboards and would never suggest a login. Just something definitive that I could screenshot amongst friends.
Also, it is always more helpful to state the actual issue.
Edit: Same in Chrome on ios for me.
Maybe some mobile release soon?
Nice one!
SEIZURE WARNING: Once you win, there is a lot of flickering.
I beat it. It's a neat puzzle, but why the tremendous upvotes for this?
I wonder - am I more likely to vote for something interactive like this game? I.e. does the fact that I was actively playing rather than simply passively reading put me in a more active state of mind?
Make one new puzzle a day like Wordle and I'll get addicted for sure :)
I agree i don't think i have seen constraint as a game quite like this before
It would be nice to show how many steps were taken to solve it.
looks like there's some problem with the hosting
Nice work!!
Edited: typo, with -> wish