% turn off the warning for clauses not contiguous
:-style_check(-discontiguous).

%% some Blocks world test data -- intial states and goals to play with.
%% enter "test(strips, 3)" to call strips with initial_state 3 and goal state 3

init_state(1,[clear(a),clear(b),clear(c),ontable(a),ontable(b),ontable(c),handempty]).
goal(1,[on(a,b),on(b,c),ontable(c)]).

init_state(2,[clear(a),clear(b),clear(c),ontable(a),ontable(b),ontable(c),handempty]).
goal(2,[on(b,c),on(a,b),ontable(c) ]).

% susman anomaly
init_state(3,[clear(b),clear(c),ontable(a),ontable(b),on(c,a),handempty]).
goal(3,[on(a,b),on(b,c),ontable(c)]).

% Imposible goal
init_state(4,[clear(a),clear(b),ontable(a),ontable(b),handempty]).
goal(4,[on(a,b),on(b,a)]).

% invert a three tower
init_state(5,[clear(c),ontable(a),on(b,a),on(c,b),handempty]).
goal(5,[on(a,b),on(b,c),ontable(c)]).

% super trivial -- just pickup a
init_state(6,[clear(a),clear(b),clear(c),ontable(a),ontable(b),ontable(c),handempty]).
goal(6,[holding(a)]).

init_state(7,[clear(b), clear(c), ontable(b), ontable(a), on(c,a), handempty]).
goal(7,[on(a,b), on(b,c), ontable(c)]).

% impossible, of course.
init_state(8,[clear(a),clear(b),clear(c),ontable(a),ontable(b),ontable(c),handempty]).
goal(8,[on(b,c),on(c,a),on(a,b) ]).

init_state(9,[clear(b),on(b,a), on(a,d), on(d,c), ontable(c),handempty]).
goal(9,[on(a,b),ontable(b), on(c,d),ontable(d)]).

init_state(10,[clear(a),on(a, b), on(b,d), on(d,c), ontable(c),handempty]).
goal(10,[on(a,b),ontable(b), on(c,d),ontable(d),clear(a),clear(c)]).


init_state(11, [clear(a), clear(b), clear(c), ontable(a), ontable(b),
                ontable(c), handempty, ontable(paintSprayer(red)),
                ontable(paintSprayer(green)), ontable(paintSprayer(blue)),
                ontable(paintSprayer(white)), clear(paintSprayer(red)),
                clear(paintSprayer(green)), clear(paintSprayer(blue)),
                clear(paintSprayer(white))]).
goal(11, [on(a,b), color(a,red), color(b, blue)]).

init_state(12, [clear(a), clear(b), clear(c), ontable(a), ontable(b),
                ontable(c), handempty, ontable(paintSprayer(red)),
                ontable(paintSprayer(green)), ontable(paintSprayer(blue)),
                ontable(paintSprayer(white)), clear(paintSprayer(red)),
                clear(paintSprayer(green)), clear(paintSprayer(blue)),
                clear(paintSprayer(white))]).

goal(12, [color(a,red), color(b, blue), on(a,b)]).

init_state(13, [clear(a),color(a,blue), clear(b), clear(c), ontable(a), ontable(b),
                ontable(c), handempty, ontable(paintSprayer(red)),
                ontable(paintSprayer(green)), ontable(paintSprayer(blue)),
                ontable(paintSprayer(white)), clear(paintSprayer(red)),
                clear(paintSprayer(green)), clear(paintSprayer(blue)),
                clear(paintSprayer(white))]).

goal(13, [on(a,b),color(a,red)]).

init_state(14, [ontable(a), on(b,a), on(c,b), clear(c), handempty]).
goal(14, [clear(a)]).

