Replies: 2 comments 2 replies
-
I would like to mention that when using the older Java-based RDDLSim, we developed a parser that extracted state and action fluents from a DBN (graphviz file), but it did not capture non-fluents. While generating a DBN graphviz file and parsing it to obtain state-fluent dependencies is an option, this approach is slower and overlooks non-fluents. A more efficient and complete solution would be to utilize functions from the RDDLgrounder (or a similar class) in pyRDDLGym to manage both state and non-fluents (SF and NF) during or immediately after grounding the CPF. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the late reply. I think the most streamlined way to handle dependencies with non-fluents is to convert them to state-fluents. Specifically, change your non-fluent pvariables to state-fluent pvariables with no-op transitions, e.g. non-fluent-var' = non-fluent-var; On the issue of performance, unfortunately I do not see how you can achieve this correctly without going through the xadd compilation. The XADD should be asymptotically the best we can currently do time complexity-wise. |
Beta Was this translation helpful? Give feedback.
-
Hi authors,
First of all congratulations on building this great repo. I need a bit of help in below scenario,
Problem Description:
I need to write a function that extracts all grounded state-fluents, non-fluents, and ground actions that affect a particular state-fluent's next state. In general, such state-fluents and actions can be extracted from the DBN/cpf. But I am not sure how to extract the non-fluents.
To take an example, let's see the domain
AcademicAdivisin_mdp_2014
(given at link) Here we have below cpf for a state-fluentpassed'(?c)
:What is needed:
Now, I want to write a function
get_sfnfac(sf)
that takes in a state-fluent as input and returns all state-fluents, actions and non-fluents that can possibly affect its next state.Considering instance 1 of this domain (given at link,
get_sfnfac(passed___CS11)
should return:{passed___CS11, takeCourse___c11, PRIOR_PROB_PASS_NO_PREREQ___CS11, PRIOR_PROB_PASS___CS11}
as it CS11 has no prereqs.
get_sfnfac(passed___CS21)
should return:{passed___CS21, takeCourse___c21, , PRIOR_PROB_PASS_NO_PREREQ___CS21, PRIOR_PROB_PASS___CS21, PREREQ(CS11, CS21), PREREQ(CS12, CS21)}
as CS21 has two prereqs CS11 and CS12.
What I have tried so far:
I have tried to look at files in
pyRDDLGym/core/parser/
but couldn't find a direct function that I can use.Any pointers are appreciated.
Thanks,
Vishal
Beta Was this translation helpful? Give feedback.
All reactions