View the step-by-step solution to:

I need assistance with the below question from Artificial Intelligence -planning. I have formulated the domain and problem fr the blocksworld...

hey,... I need assistance with the below question from Artificial Intelligence -planning.. I have formulated the domain and problem fr the blocksworld scenario from my understanding.. but I dont think it is accurate..also I am not able to check the PDDL files using the validators provided.. would greatly appreciate some help as my assignment is due in tomorrow.
thanks

Scenario:
Suppose we have 5 slabs, A, B, C, D and E, arriving from the caster
in that order. The goal is to deliver two batches, one with slabs A and C (in that order, i.e.,
A on top of C) and the other with slabs B, D and E (in that order). The bu er has space for
two stacks, and the outgoing area has space for only one batch.
A possible plan for this problem is: pick up A and deposit it in the bu er; pick up B and
deposit in the bu er, in a new stack (i.e., not on A); pick up C and move it directly to the
outgoing area; move A from the bu er to the outgoing area and send of the rst batch; pick
up D and store it on top of B; pick up E and move it directly to the outgoing area; move D
from the bu er to the outgoing area; move B from the bu er to the outgoing area and send
o the second batch.

Write a PDDL domain speci cation for the problem, and write a problem speci cation for the small example described above. Make sure that your domain speci cation is adequately parameterised so that you can create problem instances of varying sizes, required for Task 2. To test your model, write down the plan described above (using, of course, the actions in your model) and check that the plan is valid, using the PDDL plan validator. (Of course
your model must also be syntactically correct, otherwise the validator will not accept it.) You should also make sure that some planner (e.g., FF) is able to solve your model of the example
problem (it is small enough that that should be possible, unless your model is unnecessarily complicated).
In modelling the problem, you should use only the STRIPS subset of PDDL. This means
actions should have only simple" preconditions (conjunctions of atoms, no negation) and
e ects. You may use PDDL's object typing mechanism if you wish.
like any source code, should be well commented. Describe the purpose of each predicate and
action, and explain how the precondition and e ects of each action realise that purpose.

; ; 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)
(arm-empty)
(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 unstack
:parameters (?ob ?underob)
:precondition (and (on ?ob ?underob) (clear ?ob) (arm-empty)(block ?ob))
:effect (and (holding ?ob) (clear ?underob)
(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))))

We need you to clarify your question for our tutors! Clarification request: Dear Student, It won't be possible... 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