2022-07-22 20:09:23 +02:00
2022-07-22 19:56:28 +02:00
2022-07-22 19:56:28 +02:00
2022-07-22 20:09:23 +02:00

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.
Readme 24 KiB