points by tibbar 3 years ago It's beautiful! Looks like the optimal solution is 26 steps: https://github.com/polkerty/dog-bunny-puzzle-solver
wrbs 3 years ago 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)
aaron695 3 years ago 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 3 years ago I think if you refuse to duplicate states you'll get the solution pretty quickly. klabb3 3 years ago > I tried to fuzz this rather than use an exhaustive search.Shame. Shame. Shame. rings bell tibbar 3 years ago 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.
klabb3 3 years ago > I tried to fuzz this rather than use an exhaustive search.Shame. Shame. Shame. rings bell
tibbar 3 years ago 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.
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)
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.
I think if you refuse to duplicate states you'll get the solution pretty quickly.
> I tried to fuzz this rather than use an exhaustive search.
Shame. Shame. Shame. rings bell
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.