-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for modified floor-tile domain (#11)
* floortile first draft * floortile domain support and tests
- Loading branch information
Showing
15 changed files
with
3,336 additions
and
1,150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
;; Modified from: https://github.com/AI-Planning/pddl-generators/blob/main/floortile/domain.pddl | ||
|
||
(define (domain floor-tile) | ||
(:requirements :typing :action-costs) | ||
(:types | ||
robot tile color - object | ||
) | ||
|
||
(:predicates | ||
(robot-at ?r - robot ?x - tile) | ||
(up ?x - tile ?y - tile) | ||
(right ?x - tile ?y - tile) | ||
(painted ?x - tile ?c - color) | ||
(robot-has ?r - robot ?c - color) | ||
(available-color ?c - color) | ||
) | ||
|
||
(:action change-color | ||
:parameters (?r - robot ?c - color ?c2 - color) | ||
:precondition (and (robot-has ?r ?c) (available-color ?c2)) | ||
:effect (and (not (robot-has ?r ?c)) (robot-has ?r ?c2) | ||
) | ||
) | ||
|
||
(:action paint-up | ||
:parameters (?r - robot ?y - tile ?x - tile ?c - color) | ||
:precondition (and (robot-has ?r ?c) (robot-at ?r ?x) (up ?y ?x)) | ||
:effect (painted ?y ?c) | ||
) | ||
|
||
(:action paint-down | ||
:parameters (?r - robot ?y - tile ?x - tile ?c - color) | ||
:precondition (and (robot-has ?r ?c) (robot-at ?r ?x) (up ?x ?y)) | ||
:effect (and (painted ?y ?c) | ||
) | ||
) | ||
|
||
(:action paint-right | ||
:parameters (?r - robot ?y - tile ?x - tile ?c - color) | ||
:precondition (and (robot-has ?r ?c) (robot-at ?r ?x) (right ?y ?x)) | ||
:effect (and (painted ?y ?c) | ||
) | ||
) | ||
|
||
(:action paint-left | ||
:parameters (?r - robot ?y - tile ?x - tile ?c - color) | ||
:precondition (and (robot-has ?r ?c) (robot-at ?r ?x) (right ?x ?y)) | ||
:effect (and (painted ?y ?c) | ||
) | ||
) | ||
|
||
; Robot movements | ||
(:action up | ||
:parameters (?r - robot ?x - tile ?y - tile) | ||
:precondition (and (robot-at ?r ?x) (up ?y ?x)) | ||
:effect (and (robot-at ?r ?y) (not (robot-at ?r ?x))) | ||
) | ||
|
||
(:action down | ||
:parameters (?r - robot ?x - tile ?y - tile) | ||
:precondition (and (robot-at ?r ?x) (up ?x ?y)) | ||
:effect (and (robot-at ?r ?y) (not (robot-at ?r ?x))) | ||
) | ||
|
||
(:action right | ||
:parameters (?r - robot ?x - tile ?y - tile) | ||
:precondition (and (robot-at ?r ?x) (right ?y ?x)) | ||
:effect (and (robot-at ?r ?y) (not (robot-at ?r ?x))) | ||
) | ||
|
||
(:action left | ||
:parameters (?r - robot ?x - tile ?y - tile) | ||
:precondition (and (robot-at ?r ?x) (right ?x ?y)) | ||
:effect (and (robot-at ?r ?y) (not (robot-at ?r ?x))) | ||
) | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
__all__ = ["blocksworld", "gripper", "rover_single", "floortile"] | ||
|
||
from . import oracle | ||
|
||
from . import blocksworld | ||
from . import gripper | ||
from . import rover_single | ||
from . import floortile | ||
|
||
ORACLES: dict[str, oracle.Oracle] = { | ||
"blocksworld": blocksworld.BlocksworldOracle, | ||
"gripper": gripper.GripperOracle, | ||
"rover-single": rover_single.RoverSingleOracle, | ||
"floor-tile": floortile.FloorTileOracle, | ||
} |
Oops, something went wrong.