/* Water jug problem Try changing the capacities or adding more jugs. */ jug(0,350). jug(0,500). empty@@ jug(X,Xmax) :- X>0 | jug(0,Xmax). fillUp@@ jug(X,Xmax) :- X0, Y0 | jug(X,Xmax), jug(Ymax,Ymax). moveAndEmpty@@ jug(X,Xmax), jug(Y0,Ymax) :- X>0, Y0