domains
c = integer
predicates
st(c,c,c,c)
sb(c,c,c,c,c,c)
clauses
st(A,B,3,B) :- A<3.
st(A,B,A,4) :- B<4.
st(A,B,0,B) :- A>0.
st(A,B,A,0) :- B>0.
st(A,B,R,Q) :- A>0,
B<4,
X = A+B,
sb(B,A,X,4,Q,R).
st(A,B,R,Q) :- A>0,
B<4,
X = A+B,
sb(A,B,X,3,R,Q),
st(A,B,2,0).
sb(A,B,X,Y,Y,Q) :- X>Y,
Q = X-Y,
sb(A,B,X,Y,X,0).
Labels
- BFS (1)
- BNM (1)
- crypt arithmetic puzzle (1)
- depth first search (1)
- monkey banana problem (1)
- n-queen Problem (1)
- Tower of hanoi (1)
- water jug problem (1)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment