% For testing the TOWERS_OF_HANOI

% Load domain description
:- include 'toh.cc'.

% Basic test to see if valid states exist
:- query
maxstep :: 0;
label :: 0.

% Basic test to see if a valid transition exists
:- query
maxstep :: 1;
label :: 1.

% Try the queries above with finding all solutions
%  set(num,all).
% If the default solver has problems with this, try
%  set(solver,grasp).

% Look for a plan to move disks from peg1 to peg3
:- query
maxstep :: 0..10;
label :: 2;
0: support(d(1))=d(2),
   support(d(2))=d(3),
   support(d(3))=peg(1);
maxstep : 
   support(d(1))=d(2),
   support(d(2))=d(3),
   support(d(3))=peg(3).


% To check that a disk cannot be on a peg where
% there is a smaller disk.
:- query
maxstep :: 1;
label :: 3;
0: support(d(1))=d(3),
   support(d(3))=d(2),
   support(d(2))=peg(1).
