Lurker News

Comments (464) 216 threads

Earlier comments
wrbs#
Got the same.

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)

aaron6953 replies#
Nice.

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.

ajkjk#
I think if you refuse to duplicate states you'll get the solution pretty quickly.
klabb3#
> I tried to fuzz this rather than use an exhaustive search.

Shame. Shame. Shame. rings bell

tibbar#
This can be a useful approach when you have a very large number of states (as long as you also don't revisit states). In this case, there are few enough states to just BFS the fastest way directly.
going_ham3 replies#
This puzzle is so cool because it revolves around casual graphs in classical planning problem! One can use heuristics based search to come up with optimal solutions. I really like this innovative approach to the design.

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

7thaccount1 reply#
I'd love to see the formulation for this problem written out in proper form that can be fed to a solver like MiniZinc or CPLEX or whatever type of solver can handle it.
7thaccount1 reply#
It looks like Hakan K (has a super cool website where he solves all kinds of optimization problems for fun) was able to solve it using the Picat language in a very small amount of code with a solution (not sure if optimal):

http://hakank.org/picat/dogbunny_puzzle.pi
His website is a treasure trove for these kinds of problems and worth studying.

hakank3 replies#
The solution is 26 steps and that should be the optimal solution.

Continue this thread — 3 replies

jonnycomputer1 reply#
Yeah the edge with two conditions was a little confusing;

(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.

convolvatron1 reply#
some kind of visual gate or a schematic-toggle-switch kind of thing would help
PebblesRox#
Or just one label that says "Somebody on bone and flower."

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!

quantumfan1738#
I didn't have a problem with that edge.
socialismisok3 replies#
I thought I had to keep the dog and rabbits separate, which really stumped me for a bit.

It would be neat if the conditional statements emphasized and deemphasized based on whether their condition was currently met.

taberiand1 reply#
I made the same assumption and didn't even try putting the dog and rabbits together, but I completed the puzzle (at least I'm pretty sure I didn't overlap them, there was a lot of back and forth)
kxjabzjej3 replies#
I find it amusing that this is driven by the particular visualisations of the characters. I.e. if it were a chicken and a rabbit would you have also made this assumption?
krallja#
I didn't even realize two animals could be on the same node at all until I needed to get both rabbits to the carrot.
justsomehnguy1 reply#
For me it's a variant of a classical "move a wolf, goat and cabbage across the river", where you can't have some of them on the boat together, because it would be eaten.

Continue this thread — 1 reply

taberiand#
If it was a chicken and rabbit I think I would have tried to overlap them
LeoPanthera#
I did keep them separate, but still solved it.
Yajirobe3 replies#
How do I interact with the website? It's just a static image for me
elrobinto#
On mobile Firefox for me after a while I worked out it was drag and drop on the characters
mathieuh#
I’m on iPhone but it’s just tap-and-drag for me
jez#
I had the same problem. I was trying to click on things but not drag. Maybe if one of the animals is clicked but not dragged, it could expand and immediately get small, as if it had been dragged 0 pixels?
gorgoiler3 replies#
I love it. Fantastic.

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!

schoen1 reply#
> 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.

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.

011000111 reply#
> saw that it would be necessary

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.

marcushill4 replies#
It is necessary to stack the rabbits on each other at the carrot, no?

Continue this thread — 4 replies

benj1111 reply#
>Can you think of a way to re formulate the puzzle so that you can express the rules without words?

I'm imagining Haskell with emojis now.

benj111#
And I thought I had a sick and twisted mind...
mypalmike#
> formulate the puzzle so that you can express the rules without words?

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.

Load more comments