Ai 2 1
Ai 2 1
Lab Session:
2
Experiment 2
Number
Experiment Water jug problem
Title We are provided with two jugs: one having the capacity to hold 3 gallons of water and
the other has the capacity to hold 4 gallons of water. There is no other measuring
equipment available and the jugs also do not have any kind of marking on them. So,
the agent’s task here is to fill the 4-gallon jug with 2 gallons of water by using only these
two jugs and no other material.
Note : Assume, initially, both our jugs are empty.
Concept
# Example: Fill 4-gallon jug with 2 gallons using 3-gallon and 4-gallon jugs
water_jug_problem(3, 4, 2, 0)
Result
Conclusion The above mentioned problem can be solved by using aforementioned set of rules.