4

I'm trying to use Metric-FF (v2.1) to solve a classical planning problem. I noticed that my plans weren't optimal and started to play around with cost minimization. I realized that the planner doesn't seem to take the cost into consideration despite the cost-minimization being activated. I've created the following minimal example, with one predicate and two identical methods (besides their cost):

(define (domain metrictest)
    (:requirements :strips :action-costs)
    (:predicates (done ?x))

    (:functions (total-cost) - number)

    (:action do1
        :parameters (?x)
        :precondition (not (done ?x))
        :effect (and (done ?x) (increase (total-cost) 1))
    )

    (:action do2
        :parameters (?x)
        :precondition (not (done ?x))
        :effect (and (done ?x) (increase (total-cost) 5))
    )
)

And all I want to solve is:

(define (problem problem_1)
    (:domain metrictest)
    (:objects foo)
    (:init (= (total-cost) 0))
    (:goal (forall (?t) (done ?t)))
    (:metric minimize (total-cost))
)

Which results in do2 to be called despite do1 being the cheaper operation. If I change their position in the domain file, do1 is picked.

If you know any obtainable planner solving this correctly, I'd be happy use it.

markalex
  • 8,623
  • 2
  • 7
  • 32
Roper
  • 903
  • 1
  • 9
  • 17
  • 2
    As Metric-FF is over 13 years old already, I found out that "fast downward" (see www.fast-downward.org) is capable of minimizing the total cost correctly. While this does not answer why Metric-FF isn't capable of solving these kind of problems, it provides a working alternative. – Roper Aug 31 '16 at 18:19

0 Answers0