aacfe3120a6a130a3f4e85f3fffdc80bca159093
River Crossing
Task
A farmer has five animals on one side. He needs to get all animals to the other side of the river. Unfortunately, he only has two spaces available on his boat and some animals cannot be left on their own. Find a series of boat crossings to get all animals to the other side.
Animals
- 2 Wolves
- 1 Fox
- 1 Chicken
- 1 Worm
Constraints
- Wolves eat foxes.
- Foxes eat chickens.
- Chickens eat worms.
Description
Solving an instance of the river crossing problem with Answer Set Planning.
26 KiB