View the step-by-step solution to:

Assignment 3: Planning COMP3620/COMP6320 2010 Introduction In this assigment, you will model a planning problem in PDDL (the Planning Domain Denition...

Hi james,

I've attached the assignment sheet as requested.. need help with the first part of it.. in the modelling process.. i've typed in below my answer to the question.. but I have not tested it as I am not able to .. and I need help in checking if the answer i've got is right and correcting it. Thanks

; ; This is the 'blocksworld domain'
; ; As per the requirement specificaton, we have the states:
; ; caster, buffer and output.
; ; Blocks A, B , C, D & E come in from the caster in that order
; ; and they are required to be sorted in the order as specified
; ; by the blocksworld problem and sent to the output.
; ; Blocks cannot be unstacked or removed once place in the output.

(define (domain blocksworld-1)
(:requirements :strips)
(:predicates (block ?x)
(place ?z)
(clear ?x)
(on-output ?x)
(on-buffer1 ?x)
(on-buffer2 ?x)
(on-caster ?x)
(holding ?x)
(on ?x ?y))

(:action pickup_caster
:parameters (?ob)
:precondition (and (clear ?ob) (on-caster ?ob) (arm-empty)(block ?ob)(place caster))
:effect (and (holding ?ob) (not (clear ?ob)) (not (on-caster ?ob)) (block ?ob)
(not (arm-empty)) (place arm)))

(:action pickup_buffer1
:parameters (?ob)
:precondition (and (clear ?ob) (on-buffer1 ?ob) (arm-empty)(block ?ob)(place buffer1))
:effect (and (holding ?ob) (not (clear ?ob)) (not (on-buffer1 ?ob))(block ?ob)
(not (arm-empty)) (place arm)))

(:action pickup_buffer2
:parameters (?ob)
:precondition (and (clear ?ob) (on-buffer2 ?ob) (arm-empty)(block ?ob)(block ?ob) (place buffer2))
:effect (and (holding ?ob) (not (clear ?ob)) (not (on-buffer2 ?ob)) (block ?ob)
(not (arm-empty)) (place arm)))

(:action putdown_buffer1
:parameters (?ob)
:precondition (and (holding ?ob)(block ?ob) (place arm))
:effect (and (clear ?ob) (arm-empty) (on-buffer1 ?ob)
(not (holding ?ob)) (place buffer1)))

(:action putdown_buffer2
:parameters (?ob)
:precondition (and (holding ?ob)(block ?ob) (place arm))
:effect (and (clear ?ob) (arm-empty) (on-buffer2 ?ob)
(not (holding ?ob))(place buffer2)))

(:action putdown_output
:parameters (?ob)
:precondition (and (holding ?ob)(block ?ob) (place arm))
:effect (and (clear ?ob) (arm-empty) (on-output ?ob)
(not (holding ?ob)) (place output)))

(:action stack_output
:parameters (?ob ?underob)
:precondition (and (clear ?underob) (holding ?ob)(block ?ob) (place arm))
:effect (and (arm-empty) (clear ?ob) (on ?ob ?underob)
(not (clear ?underob)) (not (holding ?ob)) (place output)))

(:action stack_buffer1
:parameters (?ob ?underob)
:precondition (and (clear ?underob) (holding ?ob)(block ?ob) (place arm))
:effect (and (arm-empty) (clear ?ob) (on ?ob ?underob)
(not (clear ?underob)) (not (holding ?ob)) (place buffer1)))

(:action stack_buffer2
:parameters (?ob ?underob)
:precondition (and (clear ?underob) (holding ?ob)(block ?ob) (place arm))
:effect (and (arm-empty) (clear ?ob) (on ?ob ?underob)
(not (clear ?underob)) (not (holding ?ob)) (place buffer2)))

(:action unstack_buffer1
:parameters (?ob ?underob)
:precondition (and (on ?ob ?underob) (clear ?ob) (arm-empty)(block ?ob)(place buffer1))
:effect (and (holding ?ob) (clear ?underob)(place arm)
(not (on ?ob ?underob)) (not (clear ?ob)) (not (arm-empty)))

(:action unstack_buffer2
:parameters (?ob ?underob)
:precondition (and (on ?ob ?underob) (clear ?ob) (arm-empty)(block ?ob)(place buffer2))
:effect (and (holding ?ob) (clear ?underob)(place arm)
(not (on ?ob ?underob)) (not (clear ?ob)) (not (arm-empty)))



; ; This s the 'blocksworld' problem specification.
; ; For our problm, we have five blocks: A, B, C, D
; ; and E. We are to form two stacks one at a time in
; ; the output. A, C and B, D, E.

(define (problem blocksworld-2)
(:domain blocksworld-1)
(:objects caster, buffer1, buffer2, output, A, B, C, D, E, arm)

(:init (place caster)
(place buffer1)
(place buffer2)
(place output)
(place arm)
(block A)
(block B)
(block C)
(block D)
(block E)

(:goal ((and(on_output C) (stack A C)) (and(on_output E) (stack D E) (stack B D))))
Assignment 3: Planning COMP3620/COMP6320 2010 Introduction In this assigment, you will model a planning problem in PDDL (the Planning Domain Defi- nition Language ) and try solving it with various planning systems. Resources A number of planning tools have been installed on the course account. Linux executables are available in /dept/dcs/comp3620/bin/ on the DCS student system. Add this directory to your PATH as follows: setenv PATH $ { PATH } :/dept/dcs/comp3620/bin You should then be able to run the installed programs in that shell window. If you want to compile and run them on another platform, source code archives for some of them can be found on the course wattle page ( view.php?id=5204 ). The tools provided are: parser : A PDDL syntax checker. Run with input files as arguments. validate : A PDDL plan validator. Run with domain file, problem file and plan file as argument. (You may also want to use the -v option, to get more detailed information.) pddlcat : A tool for doing many things with PDDL. Some possible uses are: pddlcat <domain file> <problem file> : Parse the input files and write them back out. This can be used as a syntax check. Note, however, that pddlcat accepts only a subset of the full PDDL language. (Any valid file that uses only the STRIPS subset, plus negations and equality, should be accepted.) pddlcat -ins [-p] <domain file> <problem file> : Produce a grounded do- main/problem, i.e., instantiate predicate and action schemas with objects in all (type-correct) ways. The default output is a short summary (giving number of atoms/actions, etc); with the -p option, the grounded domain/problem is printed. pddlcat -remove -prep [-p] <domain file> <problem file> : Produce the grounded problem as above, but apply preprocessing techniques (relevance and reachability analysis) to reduce the size of the grounded problem. This may be useful as a debugging tool, particularly if planners claim your problem to be un- solvable. pddlcat -val <domain file> <problem file> <plan file> : Validate the plan. Note that the pddlcat validator may not always agree with validate .
Background image of page 1
You can add -v N , for N = 0 ,..., 5, to get less or more trace printing. ff : A planner, using heuristic state-space search. To run: ff -o <domain file> -f <problem file> . run-lama : A planner, also using heuristic state-space search. To run: run-lama <domain file> <problem file> <plan file> . There is another version, called run-lama-iterative : this version does not stop af- ter finding a plan, but keeps searching for a better (shorter or less costly) plan until interrupted by a time-out or control-C. vhpop : A planner, of the partial-order causal link variety. To run: vhpop [options] <domain file> <problem file> . Among the options are a variety of choices of heuristics. You will probably need to choose something other than the default to have any hope of finding a plan. You can try -h ADD WORK -f MW . See the README file in the source package for more options. satplan : A planner, based on the planning-as-SAT paradigm. To run: satplan -domain <domain file> -problem <problem file> -solver siege (run without arguments for more options). The -solver option specifies which SAT solver to use: siege is the only one installed in the course directory. hsp0 : A planner, based on heuristic backwards (regression) search. To run: hsp0 -seq -bfs [-ipc] <domain file> <problem file> . Unlike the other heuristic search planners above, this planner (when invoked with the above options) produces guar- anteed optimal (meaning shortest) plans. However, it is typically much less efficient than the non-optimal planners. (The -ipc option produces the output plan in a format that should be acceptable to the PDDL plan validator.) You can also try using options -3 or -lmc : both cause the planner to use stronger, but computationally more expen- sive, heuristics. Thus, this may result in fewer nodes being expanded in the search, but also in slower node expansion; the combined effect on total runtime varies with the problem. The following resources may also be helpful: A short tutorial on writing PDDL specifications can be found at http://users.cecs. ~ patrik/pddlman/writing.html . It also contains some links. A number of example domain and problem files are provided in /dept/dcs/comp3620/ public/pddl_examples . For example, in a shell window, you should be able to run: ff -o <path> /slidetile.pddl -f <path> /eight01x.pddl (where “ < path > ” is the complete absolute path to the examples directory, i.e., /dept/dcs/ comp3620/public/pddl_examples ). This runs the FF planner on an instance of the 8-puzzle. If the planner is successful (which it should be), it produces a solution (plan) in a file called eight01x.pddl.soln in your current working directory. To check the plan using the plan validator, run validate -v <path> /slidetile.pddl <path> /eight01x.pddl eight01x.pddl.soln The output should indicate that the plan is correct.
Background image of page 2
Show entire document

Top Answer

We need you to clarify your question for our tutors! Clarification request: Dear Student,... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online