% For testing the Blocks World with painting (BW_PAINTING)

% Load domain description
:- include 'bw-painting.cc'.

% Basic test to see if valid states exist
:- query
maxstep :: 0;
label :: 0;
0: paintcolor(block3)=red.

% 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 reverse the order of blocks 
% in a tower, and change the color of block3 during
% the plan.
:- query
maxstep :: 7;
label :: 2;
0: support(block1)=block2,
   support(block2)=block3,
   support(block3)=table,
   paintcolor(block1)=white,
   paintcolor(block2)=white,
   paintcolor(block3)=white;
maxstep: support(block1)=table,
   support(block2)=block1,
   support(block3)=block2,
   paintcolor(block3)=red.

% Slightly more complicated than the previous query:
% Look for a plan to make a different tower.
:- query
maxstep :: 0..10;
label :: 3;
0: support(block1)=block2,
   support(block2)=block3,
   support(block3)=table;
maxstep: support(block2)=table,
   support(block3)=block2,
   support(block1)=block3.
