Hi Daniel,

I did this one just now:
https://en.wikipedia.org/wiki/Fox,_goose_and_bag_of_beans_puzzle

It looks like I can solve it, but I'm having trouble making my solution
fully recursive. Instead I had to create 8 fresh variables for the initial
state, the 6 intermediate states, and the final solution state. With that,
my solution comes back very quickly.

Do you want to see code, or do you want hints? I don't want to spoil it, if
you want to keep working through it.

I will say the final gotcha for me was in encoding the final solution. I
keep a list of which animals/items are on each side of the river, and while
I can give a list of animals/items of the initial state, I can't hardcode
the list on the ending state.  Instead I use a list with 3 fresh variables.
This ensures the farmer ends with all 3 items on the other side, but it
doesn't constraint the the order of the list to any particular order. Does
that make sense?

Let me know how I can help! Good luck!

Jon

On Mon, Jul 3, 2017 at 11:06 AM, Daniel S <[email protected]> wrote:

> Hello,
>
> anyone solved the River Crossing Puzzle (https://en.wikipedia.org/
> wiki/River_crossing_puzzle)
> with minikanren yet?
>
> bye
>
> Daniel
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "minikanren" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/minikanren.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"minikanren" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/minikanren.
For more options, visit https://groups.google.com/d/optout.

Reply via email to