Currently, I implement an AI planner in PDDL to turn on and turn off a number of different devices in the house according to the information detected by multisensor. I do not know how to set one common goal for many tasks (like fan, light, door...) and also the turn on and turn off how we can set both to be true in the goal? The init state will be either turn on or turn off. It will be the same as one of the goals. Any suggestion to make a better goal in this cases?
(define (problem pb_smarthome)
(:domain smarthome)
(:objects
detected nodetected - motionsensor
hot cold - temperaturesensor
lighton lightoff -light
fanon fanoff -fan )
(:init (at-light nodetected lightoff)
(at-fan cold fantoff)
)
(:goal (and (at-light detected lighton)
(at-light nodetected lightoff)
(at-light hot fanton)
...... ))
)
(define (domain smarthome)
(:requirements :strips :typing)
(:type motionsensor temperaturesensor light fan - object)
(:predicates (at-light ?x - motionsensor ?y - light)
(at-fan ?x - temperaturesensor ?y - fan))
(:action turnlighton
:parameter (?x - motionsensor ?y - light)
:precondition (not(at-light ?x ?y))
:effect (at-light ?x ?y)
(:action turnlightoff
:parameter (?x - motionsensor?y - light)
:precondition (at-light ?x ?y)
:effect (not(at-light ?x ?y))
(:action turnfanon
:parameter (?x - temperaturesensor?y - light)
:precondition (at-light ?x ?y)
:effect (not(at-light ?x ?y))
.
.
.
)