% 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(disk1)=disk2,
   support(disk2)=disk3,
   support(disk3)=peg1;
maxstep : 
   support(disk1)=disk2,
   support(disk2)=disk3,
   support(disk3)=peg3.


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