1 % ------------------- Sample of a planning problem
--------------------
4 % define the following predicate to
print out extended information
5 % about the planning process at runtime
. Will produce A LOT of text
6 % after the first
4-5 iterations
, since it shows all the plans
7 % considered by the program
!
13 % -- Include domain definitions from sample
-blocks
-domain
.pl
15 :- ['sample-blocks-domain'].
20 % -- Define the initial
state: the necessary set of eternal predicates
21 % and fluents that describe the situation at the beginning of the run
23 heavy
(table
). % cannot be moved
25 clear
(blockA
, s0
). % the only block with nothing on top
27 on
(blockC
, table
, s0
).
28 on
(blockB
, blockC
, s0
).
29 on
(blockA
, blockB
, s0
).
34 % -- Last
, the goal condition that the planner will try to reach
36 goal
(S
) :- on
(blockB
, table
, S
).
39 % ---------------------------------------------------------------------
40 % ---------------------------------------------------------------------