% ILP-503 (Prof. Dr. Silvio do Lago Pereira)

% Estado: [A,B]

inicial([0,0]).

meta([_,2]).

ação(encher1,     [A,B],[3,B]) :- A<3.
ação(esvaziar1,   [A,B],[0,B]) :- A>0.
ação(despejar1em2,[A,B],[0,S]) :- A>0, B<4, S is A+B, S=<4.
ação(despejar1em2,[A,B],[R,4]) :- A>0, B<4, S is A+B, S>4, R is S-4.
