new to PDDL Planning

205 views
Skip to first unread message

neyti...@gmail.com

unread,
Sep 8, 2017, 2:13:16 PM9/8/17
to Fast Downward
Dear all,

I am trying to solve a  learning process as a planning problem using PDDL. So, far I have achieved to represent a simple domain and a problem in order to generate a desired plan. One of the actions defined in the model is:

Domain:

(define (domain r)
....
(:action study_lm
    :parameters (?ct - lmType ?cf - lmFormat ?st - studyTopic ?sl - studyLevel ?sc - studylm ?sp - studyPrerequisits)
    :precondition (and 
                 (availableStudylm ?sc ?ct ?cf)
                  )
    :effect(and 
                (studyLearningMaterial ?sc ?st ?sl)
            )
)


and a part of the problem:


(define (problem u1) (:domain r)
...
(:goal (and
        (studyLearningMaterial slm1 algorithms bloom4)

)))

which tends to say that a particular user who is willing to learn "algorithms" can learn them as the materials related to that topic will be listed, BUT what if I want to put as a prerequisite to learn "java" before going to the "algorithms" topic? 


Since I am new in this part, I am having troubles continuing to model a more complex approach of my idea.

Could someone help me to add two more features in the example above (the prerequisites and the duration).

I would appreciate you help very much.

Thank you in advanced. 

Patrik Haslum

unread,
Sep 11, 2017, 2:52:56 AM9/11/17
to fast-d...@googlegroups.com, neyti...@gmail.com

Hi,

The easy way to do what you want is using quantified preconditions.

From your example, I'm guessing (studyLearningMaterial ?sc ?st ?sl)
means something like "the student has completed content ?sc on topic ?st
to level ?sl".

Adding the condition

(forall (?prec - studylm ?pret - studyTopic ?prel - studyLevel)
(imply (is-prereq ?prec ?pret ?prel ?sc ?st ?sl)
(studyLearningMaterial ?prec ?pret ?prel)))

to the precondition of your study action enforces that
(studyLearningMaterial ?prec ?pret ?prel) must already be true for every
content/topic/level that has been specified a prereq. For example, if
you wanted (studyLearningMaterial slm1 algorithms bloom4) to require
(studyLearningMaterial somelm java bloom4) as a prereq, then you would
add (is-prereq somelm java bloom4 slm1 algorithms bloom4) to the initial
state. (The predicate is-prereq is static, meaning it is not changed by
any action.)

The idea is probably easier to follow if you look at a simpler example:
Suppose you have partially set of tasks (for example T1, .., T5) and a
partial order of precedence constraints (for example T1 < T4, T2 < T3,
T3 < T4 and T3 < T5). Use a predicate (done ?task) to represent if a
task has been done, and (precedes ?prec ?task) to represent the
precedence order. The action that does a task can be written

(:action do
:parameters (?task)
:precondition (forall (?tprime) (imply (precedes ?tprime ?task) (done
?tprime)))
:effect (done ?task)
)

The initial state would include (precedes T1 T4), (precedes T2 T3),
(precedes T3 T4), and (precedes T3 T5), and the goal is (and (done T1)
(done T2) (done T3) (done T4) (done T5)). Note how actions (do T1) and
(do T2) have effectively no precondition, since those tasks have no
precedences.

If you want to avoid quantified preconditions (they're not supported by
a lot of planners, though I think FD should be fine with them), you need
to have a different action for each number of prereqs (so one action for
subjects with no prereqs, one for subjects with one prereq, and so on),
so that you can make the parameters of the prereq subject (?prec, ?pret,
?prel above) parameters of the action.

Hope that is of some help,
/P@trik
> --
> You received this message because you are subscribed to the Google
> Groups "Fast Downward" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to fast-downwar...@googlegroups.com
> <mailto:fast-downwar...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

neyti...@gmail.com

unread,
Sep 14, 2017, 7:58:59 AM9/14/17
to Fast Downward

Hi Patrik,

Thank you for your time and your effort.

I am trying both of the logics but it seems that the planners are not appropriate, because for the moment being I am using the JavaFF planner as well as the solver.planning.domains, which surprisingly is generating errors.


Thank you in advanced!

Christian Muise

unread,
Sep 14, 2017, 9:32:28 AM9/14/17
to Fast Downward
Hello,

If you'd like to try and diagnose things further on the solver(.planning.domains) side, feel free to post a message here (this google group typically focuses on just the FastDownward planning system):

Further, if you'd like to share your working copy of the domains, you can paste them to the online editor ( editor.planning.domains ), and then use the Session->Save functionality to generate a read-only link (would also allow others to see the full domain and run it against the remote solver.

Cheers,
Christian


> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Fast Downward" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fast-downwar...@googlegroups.com.

neyti...@gmail.com

unread,
Sep 15, 2017, 7:56:24 AM9/15/17
to Fast Downward
Hi Christian,

I am going through the solver group and post the links that you suggested.

Thank you for your time.

Best Regards.
> For more options, visit https://groups.google.com/d/optout.

neyti...@gmail.com

unread,
Sep 15, 2017, 9:13:17 AM9/15/17
to Fast Downward
Hi,

Please find under this link dhe domain and problem:

http://editor.planning.domains/#edit_session=kYnazKi6wXzKKx7

Thank you.




On Thursday, September 14, 2017 at 3:32:28 PM UTC+2, Christian Muise wrote:
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages