Skip to content

Commit

Permalink
process all st_xyz domains (admit strong solutions) AI-Planning#4
Browse files Browse the repository at this point in the history
  • Loading branch information
ssardina committed Sep 23, 2024
1 parent b32ace1 commit 0f8e07f
Show file tree
Hide file tree
Showing 31 changed files with 1,514 additions and 1,288 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,13 @@ These five come from the [FOND-SAT](https://github.com/tomsons22/FOND-SAT) repo/
- `chain-of-rooms`: from [Constructing conditional plans by a theorem-prover](https://jair.org/index.php/jair/article/view/10230/), JAIR 10 (1999), 323–352, as part of the QBFPLAN planner.
- `earth-observation`: ([J Aldinger & J Löhr, 2013)](https://gki.informatik.uni-freiburg.de/papers/aldinger-loehr-pcd2013.pdf)
- `puffbot-dialog`: domain generating the dialogue policy for building dialogue agents in the health-care setting. Reported in [Teixeira et. al SAC'21 paper](https://dl.acm.org/doi/10.1145/3412841.3441942) and [PhD thesis](https://iris.unitn.it/retrieve/handle/11572/361402/595412/phd_unitn_santos_teixeira_milene.pdf).
- `st_mapfdu`: from Thorsten Engesser on planning for implicit coordination. Strong cyclic plans exist, but it's the acyclic ones that are desired.

### From strong domains: `st_xyz`

These are domains that were designed to admit _strong_ solutions. Strong cyclic plans exist, but it's the acyclic ones that are desired. 😉

- `st_blocksworld`, `st_faults`, `st_first_responders`, `st_tiresworld`: domains from the 2008 IPC-6 FOND track that were modified to have _strong_ solutions by [Jicheng Fu et. al ICTAI'13](https://ieeexplore.ieee.org/document/6735234).
- `st_mapfdu`: from Thorsten Engesser on planning for implicit coordination; [AAAI'20](https://doi.org/10.1609/aaai.v34i05.6204).

## Catalogue Tool

Expand Down
8 changes: 4 additions & 4 deletions benchmarks/catalogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ def extract_instance_no(file_name):
)
for f in get_instances("st_mapfdu", regex=r"^p\d+.pddl")
]
sttires = [
st_tiresworld = [
(
"domain.pddl",
os.path.basename(f),
)
for f in get_instances("st_tires", regex=r"^p\d+.pddl")
for f in get_instances("st_tiresworld", regex=r"^p\d+.pddl")
]
tidyup = [
(
Expand Down Expand Up @@ -310,7 +310,7 @@ def extract_instance_no(file_name):
"st_faults": st_faults,
"st_first_responders": st_first_respondeners,
"st_mapfdu": st_mapfdu,
"st_tires": sttires,
"st_tiresworld": st_tiresworld,
"tidyup-mdp": tidyup, #
"tireworld": tireworld, #
"tireworld-spiky": tireworld_spiky, #
Expand Down Expand Up @@ -353,7 +353,7 @@ def extract_instance_no(file_name):
"st_faults",
"st_first_responders",
"st_mapfdu",
"st_tires",
"st_tiresworld",
],
"interesting": ["climber", "bus-fare", "river"],
"all": list(DOMAINS.keys()),
Expand Down
105 changes: 58 additions & 47 deletions benchmarks/st_blocksworld/domain.pddl
Original file line number Diff line number Diff line change
@@ -1,80 +1,91 @@
(define (domain blocks-domain)
(:requirements :non-deterministic :negative-preconditions :equality :typing)
(:types block location)
(:constants l0 l10 - location)
(:predicates
(on ?bm ?bf - block)
(clear ?x - block)
(on-table ?x - block)
(emptyhand)
(holding ?b - block)
(adjacent ?l1 ?l2 - location)
(at ?b - block ?l - location)
(faulty ?b - block ?l - location)
(:types
block location
)

(:constants
l0 l10 - location
)
(:predicates
(on ?bm ?bf - block)
(clear ?x - block)
(on-table ?x - block)
(emptyhand)
(holding ?b - block)
(adjacent ?l1 ?l2 - location)
(at ?b - block ?l - location)
(faulty ?b - block ?l - location)
)

(:action pick-up
:parameters (?b1 - block)
:precondition (at ?b1 l10)
:effect
(and (not (at ?b1 l10)) (oneof (holding ?b1) (and (clear ?b1) (on-table ?b1) (emptyhand) (not (holding ?b1)))))
:parameters (?b1 - block)
:precondition (at ?b1 l10)
:effect (and (not (at ?b1 l10)) (oneof
(holding ?b1)
(and (clear ?b1) (on-table ?b1) (emptyhand) (not (holding ?b1)))))
)

(:action pick-up-from-table
:parameters (?b - block)
:precondition (and (emptyhand) (clear ?b) (on-table ?b))
:effect (oneof (and (emptyhand) (clear ?b) (on-table ?b)) (and (holding ?b) (not (emptyhand)) (not (on-table ?b))))
:effect (oneof
(and (emptyhand) (clear ?b) (on-table ?b))
(and (holding ?b) (not (emptyhand)) (not (on-table ?b))))
)

(:action put-on-block
:parameters (?b1 ?b2 - block)
:precondition (and (holding ?b1) (clear ?b2))
:effect (oneof (and (on ?b1 ?b2) (emptyhand) (clear ?b1) (not (holding ?b1)) (not (clear ?b2)))
(and (on-table ?b1) (emptyhand) (clear ?b1) (not (holding ?b1))))
:effect (oneof
(and (on ?b1 ?b2) (emptyhand) (clear ?b1) (not (holding ?b1)) (not (clear ?b2)))
(and (on-table ?b1) (emptyhand) (clear ?b1) (not (holding ?b1))))
)

(:action put-down
:parameters (?b - block)
:precondition (holding ?b)
:effect (and (on-table ?b) (emptyhand) (clear ?b) (not (holding ?b)))
)

(:action pick-tower
:parameters (?b1 ?b2 ?b3 - block)
:precondition (and (emptyhand) (on ?b1 ?b2) (on ?b2 ?b3))
:effect (oneof (and (holding ?b2) (clear ?b3) (not (emptyhand)) (not (on ?b2 ?b3)))
(and (emptyhand) (on ?b1 ?b2) (on ?b2 ?b3)))
:effect (oneof
(and (holding ?b2) (clear ?b3) (not (emptyhand)) (not (on ?b2 ?b3)))
(and (emptyhand) (on ?b1 ?b2) (on ?b2 ?b3)))
)

(:action put-tower-on-block
:parameters (?b1 ?b2 ?b3 - block)
:precondition (and (holding ?b2) (on ?b1 ?b2) (clear ?b3))
:effect (oneof (and (on ?b2 ?b3) (emptyhand) (not (holding ?b2)) (not (clear ?b3)))
(and (on-table ?b2) (emptyhand) (not (holding ?b2))))
:effect (oneof
(and (on ?b2 ?b3) (emptyhand) (not (holding ?b2)) (not (clear ?b3)))
(and (on-table ?b2) (emptyhand) (not (holding ?b2))))
)

(:action put-tower-down
:parameters (?b1 ?b2 - block)
:precondition (and (holding ?b2) (on ?b1 ?b2))
:effect (and (on-table ?b2) (emptyhand) (not (holding ?b2)))
)

(:action init_pick-up
:parameters (?b1 ?b2 - block)
:precondition (and (emptyhand) (clear ?b1) (on ?b1 ?b2))
:effect (and (at ?b1 l0) (not (clear ?b1)) (clear ?b2) (not (emptyhand)) (not (on ?b1 ?b2)))
)

(:action move
:parameters (?b1 - block ?l1 ?l2 - location)
:precondition (and (at ?b1 ?l1) (adjacent ?l1 ?l2))
:effect (oneof (and (at ?b1 ?l2) (not (at ?b1 ?l1)))
(and (faulty ?b1 ?l2) (not (at ?b1 ?l1))))
)

(:action fix
:parameters (?b - block ?l1 - location)
:precondition (faulty ?b ?l1)
:effect (and (at ?b ?l1) (not (faulty ?b ?l1)))
)
)
:parameters (?b1 ?b2 - block)
:precondition (and (emptyhand) (clear ?b1) (on ?b1 ?b2))
:effect (and (at ?b1 l0) (not (clear ?b1)) (clear ?b2) (not (emptyhand)) (not (on ?b1 ?b2)))
)

(:action move
:parameters (?b1 - block ?l1 ?l2 - location)
:precondition (and (at ?b1 ?l1) (adjacent ?l1 ?l2))
:effect (oneof
(and (at ?b1 ?l2) (not (at ?b1 ?l1)))
(and (faulty ?b1 ?l2) (not (at ?b1 ?l1))))
)

(:action fix
:parameters (?b - block ?l1 - location)
:precondition (faulty ?b ?l1)
:effect (and (at ?b ?l1) (not (faulty ?b ?l1)))
)
)
Loading

0 comments on commit 0f8e07f

Please sign in to comment.