******************* Water Bucket Puzzle ******************* .. tags:: large, game, math, puzzle In this solitaire puzzle game, you must use three buckets (three-liter, five-liter, and eight-liter buckets) to collect exactly four liters of water in one of the buckets. Buckets can only be emptied, completely filled, or poured into another bucket. For example, you can fill the five-liter bucket and then pour its contents into the three-liter bucket, leaving you with a full three-liter bucket and two liters of water in the five-liter bucket. With some effort, you should be able to solve the puzzle. But can you figure out how to solve it with the minimal number of moves? .. collapse:: water_bucket_puzzle.py .. literalinclude:: water_bucket_puzzle.py :language: python :linenos: https://inventwithpython.com/bigbookpython/project81.html