You will be asked to submit a specification of the Star Puzzle in PDDL; in order to do so, you would need to use a planner that solves problems specified in that description language. I recommend using the online planner: http://editor.planning.domains/#
The textbook gives an example problem in the Air Cargo Domain. This can be written in PDDL in two pieces:
The Domain Definition File (cargo-domain.pddl)
;; STRIPS domain of the Air cargo transport
(define (domain air-cargo)
(:requirements :strips)
(:predicates (In ?obj ?place)
(At ?obj ?place)
(Cargo ?obj)
(Plane ?obj)
(Airport ?obj))
(:action LOAD
:parameters (?c ?p ?a)
:precondition (and (At ?c ?a) (At ?p ?a)
(Cargo ?c) (Plane ?p) (Airport ?a))
:effect (and (not (At ?c ?a)) (In ?c ?p)))
(:action UNLOAD
:parameters (?c ?p ?a)
:precondition (and (In ?c ?p) (At ?p ?a)
(Cargo ?c) (Plane ?p) (Airport ?a))
:effect (and (not (In ?c ?p)) (At ?c ?a)))
(:action FLY
:parameters (?p ?from ?to)
:precondition (and (At ?p ?from)
(Plane ?p) (Airport ?from) (Airport ?to))
:effect (and (not (At ?p ?from)) (At ?p ?to)))
)
;; STRIPS Instance problem for the Air cargo transport
(define (problem pb1)
(:domain air-cargo)
(:objects C1 C2
P1 P2
SFO JFK)
(:init
;; types
(Cargo C1) (Cargo C2)
(Plane P1) (Plane P2)
(Airport SFO) (Airport JFK)
;; locations
(At C1 SFO) (At C2 JFK) (At P1 SFO) (At P2 JFK))
(:goal
(and (At C1 JFK) (At C2 SFO))))
Point your browser to http://editor.planning.domains/#. Download the two PDDL files above and then use the File | Load menu option to load both of these PDDL specifications. You can modify those files directly in that interface.
To solve the problem, click the Solve menu option. Make sure the domain is the cargo-domain.pddl file, and the instance is the cargo-instance.pddl file. Then click Plan. This should produce a new entry in the editor list (on the left pane) that says "Plan (I)". It will give you a sequence of actions that solves the problem.
Specify the four-post Towers of Hanoi problem described above: describe the domain (in PDDL), and make planning instances (in PDDL) with 4, 5, and 6 disks. If your specification is correct, the planner should output a valid plan to solve the problem.
You can get 80% of the credit, if your description for N disks has Ω(N²) statements. To get full credit, your PDDL description for N disks should have O(N) statements.
We have a #pa7-pddl-hanoi channel in slack. We'll be using the canvas upload procedure as in previous cases: zip up the 4 PDDL files (domain + instance_4/5/6) and submit that.
The deadline for submission is 3 May. 2022.
You may discuss this openly with your friends and classmates, but are expected to write your own code and compile your submission independently. If in doubt about whether a resource you used should be included in the list of resources, err on the side of caution and include it.
Academic Integrity: "An Aggie does not lie, cheat, or steal, or tolerate those who do." For additional information please visit: http://student-rules.tamu.edu/aggiecode
Getting Help: You are not alone! If you find yourself stuck on something, contact the TA for help. Office hours are there for your support; please use them. If you can't make our office hours, let us know and we will schedule more. We want these projects to be rewarding and instructional, not frustrating and demoralizing. But, we don't know when or how to help unless you ask.