# The Wolf, the Goat, and the Cabbage

**URL:** <https://racket.discourse.group/t/the-wolf-the-goat-and-the-cabbage/1366>\
**Category:** Show & Tell\
**Created:** [October 10, 2022, 10:43pm UTC](https://racket.discourse.group/t/the-wolf-the-goat-and-the-cabbage/1366 "2022-10-10T22:43:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexh](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/alexh/32/315_2.png) [@alexh](https://racket.discourse.group/u/alexh)\
**Post date:** [October 10, 2022, 10:43pm UTC](https://racket.discourse.group/t/the-wolf-the-goat-and-the-cabbage/1366/1 "2022-10-10T22:43:36Z")

</div>

I was always fascinated by relational programming, but I never had any real-world opportunities to use it myself, so I tried to use it to solve some simple puzzles. Below is my attempt to solve the "Wolf, Goat, and Cabbage" puzzle using [miniKanren](http://minikanren.org/).

> **[The Wolf, the Goat, and the Cabbage](https://alex-hhh.github.io/2022/09/wolf-goat-cabbage.html)**
>
> in which we revisit miniKanren and use it to solve a planning puzzle about ferrying some items safely across a river....

And if you don't want to read through an entire blog post, the program (with full unit tests) is available here:

> <https://gist.github.com/alex-hhh/53e81f0261c96234450379b2d8096aae>

Alex.
