1

in PDDL I can define "sub" types like this:

(:types
  one two - parent other
)

one and two are also parent, other is distinct.

So like, the predicate (both ?x - parent) accepts ones and twos.

I want to do multi-level inheritance, I tried

(:types
  sprite fanta - fizzy water - drink
  food
)

I want sprite and fanta to be fizzy, and fizzy and water are both of the type drink.

So my predicate (pour ?x - drink) should accept sprite, but at the moment it doesn't.

How do I correctly set up this type tree?

object
├── drink
│   ├── fizzy
│   │   ├── fanta
│   │   └── sprite
│   └── water
└── food
theonlygusti
  • 11,032
  • 11
  • 64
  • 119

1 Answers1

1

I hope it's not too late to answer your question. This code should do what you want:

(:types
   food drink - object
   water fizzy - drink
   fanta sprite - fizzy)

Hope it helped! You can find a whole PDDL reference here.

LNaej
  • 11
  • 4