I'm a noob at planning and I'm looking for help with numeric fluents. Here's a sample domain and problem that isn't working the way I think it should.
Domain:
(define (domain tequila)
(:requirements :typing :fluents)
(:types
bottle
)
(:functions
(amount ?b - bottle)
)
(:predicates
(bottle-finished ?b - bottle)
)
(:action drink
:parameters (?b - bottle)
:precondition (>= (amount ?b) 1)
:effect (decrease (amount ?b) 1)
)
(:action done-drinking
:parameters (?b - bottle)
:precondition (= (amount ?b) 0)
:effect (bottle-finished ?b)
)
)
and the problem:
(define (problem drink)
(:domain tequila)
(:objects
casamigos-anejo - bottle
)
(:init
(= (amount casamigos-anejo) 4)
)
; drink all the tequila
(:goal
(bottle-finished casamigos-anejo)
)
)
I'm running the files using editor.planning.domains. I expected that the plan would be "drink, drink, drink, drink, done-drinking" but the plan it finds is just "done-drinking". Can someone explain if I'm doing something wrong, or if it's working correctly and my expectation is wrong (I'm sure I'm thinking of it in procedural terms)? Thanks.