6942aeeb4f3bd3761393213c25725e2206642a05
[ker1415-1.git] / sample-blocks.pl
1 % ------------------- Sample of a planning problem --------------------
2
3
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!
8
9 debug(on).
10
11
12
13 % -- Include domain definitions from sample-blocks-domain.pl
14
15 :- ['sample-blocks-domain'].
16
17
18
19
20 % -- Define the initial state: the necessary set of eternal predicates
21 % and fluents that describe the situation at the beginning of the run
22
23 heavy(table). % cannot be moved
24
25 clear(blockA, s0). % the only block with nothing on top
26
27 on(blockC, table, s0).
28 on(blockB, blockC, s0).
29 on(blockA, blockB, s0).
30
31
32
33
34 % -- Last, the goal condition that the planner will try to reach
35
36 goal(S) :- on(blockB, table, S).
37
38
39 % ---------------------------------------------------------------------
40 % ---------------------------------------------------------------------