nextupprevious
Next: Using XOR-constraints to avoid Local Optimal States Up: The GRT Planning System Previous: Eliminating Irrelevant Objects

4.2  Numerical Representation of Resources

In this section, we present an enhanced Strips formalism, where resources are represented by numbers, instead of atoms. The work has been motivated by the mystery domain, but it is suitable for any domain with resources. Moreover, it can easily be extended to cover domains where reasoning with numbers is required.

Grt supports an explicit representation of resources in the most natural format, i.e. the numerical format. According to this, resources are distinguished from other types of objects and are separately declared using the following statement:

(:resources R1 R2 ... RN )

where Ri are the various resources. Furthermore, declarations of the following form are added to the initial state description :

(amount R1 V1) (amount R2 V2) ... (amount RN VN)

denoting the initial quantity of each resource. Moreover, it is allowed for resources to participate in relations with other atomic facts. Finally, action definitions are enhanced, so as to declare explicitly the consumed resources.

As an example, we consider the mystery domain, which comprises some cities, connected via edges, some packages that have to be transferred from their initial locations to their destinations and some trucks. In the beginning, each city has an amount of fuel. For a truck to travel from a city c1 to an adjacent city c2, c1 must have at least one unit of fuel. After the journey, the fuel of c1 is decreased by one.

In the original domain representation, the different fuel quantities are represented by relations of the form[1]:

(fuel fuel0) (fuel fuel1) (fuel fuel2)etc.

while the orderings between these quantities are represented by relations as follows:

(adjacent_fuel fuel0 fuel1) (adjacent_fuel fuel1 fuel2) etc.

and the initial amount of resources in each city as:

(city_fuel city1 fuel3) etc.

Finally, the actions that consume resources, e.g. moving a truck, are of the following form:

(:action move
:parameters (?tr ?c1 ?c2 ?f1 ?f2)
:precondition (and (truck ?tr) (city ?c1) (city ?c2) (adjacent_cities ?c1 ?c2) (fuel ?f1) (fuel ?f2) (at ?tr ?c1)
(adjacent_fuel ?f1 ?f2) (city_fuels ?c1 ?f2))
:effect (and (not (at ?tr ?c1)) (not (city_fuel ?c1 ?f2))
(at ?tr ?c2) (city_fuel ?c1 ?f1)))

In order to have an idea of how resources are represented in Grt, let us consider the strips-mysty-x-1 problem of the mystery domain. This problem has 6 cities, so 6 resource objects are declared:

(:resources r1 r2 r3 r4 r5 r6)

The resources are related with their corresponding cities:

(city_fuel city1 r1) (city_fuel city2 r1) ... (city_fuel city6 r6)

Propositions are added to the initial state, denoting the initial availability of each resource:

(amount r1 1) (amount r2 2) ... (amount r6 3)

Finally, action move is defined in a way that separates the resource requirements from the precondition and the effect lists:

(:action move
:parameters (?tr ?c1 ?c2 ?f)
:precondition (and (truck ?tr) (city ?c1) (city ?c2) (at ?tr ?c1) (adjacent_cities ?c1 ?c2) (city_fuel ?c1 ?f))
:effect (and (not (at ?tr ?c1)) (at ?tr ?c2))
:resources (amount ?f 1))

Table 2 shows the number of ground facts and ground actions for the first five problems of the mystery distribution, for the two alternative resource representations. As it is clear from this table, through the numerical representation of resources there is an important reduction in the number of ground facts, which is more considerable in the case of ground actions. What is even more important is that the size of the problem in the atom-based representation can grow illimitably, if more levels of resource availability are added, whereas in the numerical representation the size of the problem remains constant.

 

Problem

Atom representation

Numerical Representation

ground facts

ground actions

ground facts

ground actions

 

 

 

 

 

strips-mysty-x-1

101

150

56

48

strips-mysty-x-2

359

3596

310

1200

strips-mysty-x-3

277

1676

230

816

strips-mysty-x-4

178

210

144

168

strips-mysty-x-5

299

2325

269

1032

Table 2: Size of the problem (number of ground facts and actions)
for the two alternative resource representations.

 

nextupprevious
Next: Using XOR-constraints to avoid Local Optimal States Up: The GRT Planning System Previous: Eliminating Irrelevant Objects

Ioannis Refanidis

14-8-2001

 



[1] In the Aips-98 competition, different predicate and object names have been used; however, in this paper we have translated them into more meaningful ones for simplicity.