0

I have a smart lamp which has the actions turn ON/OFF. The action turn on increases the brightness in the room, however, due to the current environment state I cannot definitely state how much it will increase the brightness. Is there a way to model this uncertainty in PDDL?

(define (domain home)
  (:requirements :typing :fluents)

  (:types
    phillipshue - lamp
  )

  (:predicates
    (lamp_powerstate_on ?l -lamp) 
  )

  (:functions 
    (brightness ?l - lamp)
  )

  (:action TurnOnLamp
    :parameters ( ?l - lamp)
    :precondition (and
      (not(lamp_powerstate_on ?l)) 
    )
    :effect (and
      (increase (brightness ?l) 1) (lamp_powerstate_on ?l) 
    )
  )
Mario
  • 1,631
  • 2
  • 21
  • 51
Mahda
  • 1
  • Have you tried to model it via [UncertainPy](https://uncertainpy.readthedocs.io/en/latest/index.html) which is an open-source Python toolbox tailored to perform [uncertainty quantification and sensitivity analysis](https://i.imgur.com/NDmIVNV.jpg) of neuroscience models? You might have a look to this [article](https://www.frontiersin.org/articles/10.3389/fninf.2018.00049/full) – Mario Sep 01 '19 at 08:40

2 Answers2

0

PDDL is deterministic, so you aren't going to be able to express probabilistic effects in PDDL. Work on uncertainty started with Probabilistic PDDL (see this paper that defines the language), and has continued with tracks up until the current 2018 competition. You can find the latest work and the protocols used from the 2018 competition page.

Nathan S.
  • 5,244
  • 3
  • 45
  • 55
  • Just a remark, many modern probabilistic planners use [RDDL](http://users.cecs.anu.edu.au/~ssanner/IPPC_2011/RDDL.pdf) as their input language instead of PPDDL because it simplifies the definition of some types of effects. In IPPC 2018, all participants used RDDL as their input language. – David Speck Sep 03 '19 at 11:31
  • Thank you for the answer. But I think in this case we cannot also use probabilistic effects, because we also don't know the interval beforehand. – Mahda Sep 06 '19 at 13:59
0

Is it necessary to model the light in the room as uncertain? If you want to model that light only increases, when the room is not fully lit, you could use a PDDL conditional effect. Example:

:effect (and 
    (when (< (room-light ?v) 20)
        (increase (brightness ?l) 30)
    )
    (when (> (room-light ?v) 90)
        (increase (brightness ?l) 10)
    )
)

But more generally:

What is it you are trying to model? Are you trying to decide how many light bulbs need to be lit to maintain proper lighting in the room? Perhaps you should not think about this as upfront planning, but rather as dynamic planning. The latter takes inputs from sensors and computes plan for the given situation. In each situation, you know exactly how much light there is in the room and the problem is always deterministic. Then when you start executing the plan, the response from the environment may not be what the plan assumed. At that point you would fail that plan, take a snapshot of the sensor inputs, formulate new initial state and re-plan again.

Jan Dolejsi
  • 1,389
  • 13
  • 25
  • It is not only the lights, but there could be different types of smart devices (and many from the same type) present in a smart home, and it won't be possible to measure the effect of an actuation, i.e. assuming we have currently 3 lamps in the room and one of the lamps is on and the shades is also open, how do we know how much the brightness level in the room will increase if we turn on lamp 2 which is in the corner of the room. We cannot turn the lamp on and see the effect and turn it off again because it will be strange for the user in a smart home. – Mahda Sep 06 '19 at 13:58
  • Do you guys know of a recent planner that is stable and that I can use which actually supports PDDL3.1. I have tried popf2 but it doesn't support negative-preconditions. But, I need to be able to handle numeric-fluents, conditional effects, durative actions. – Mahda Sep 06 '19 at 14:02
  • Try Optic - the successor to Popf: https://planning.wiki/ref/planners/optic – Jan Dolejsi Sep 06 '19 at 16:35