-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boolean-valued fluents and RDDL-style boolean & numeric interoperability #91
Comments
Hi @mejrpete, I will get back to you in more detail by next week but just some quick notes:
I think that our @gfrances and me have been discussing as well whether or not we want to support "type conversions", in fact, we were thinking of doing some changes on how we manage sorts and how expressions are checked for equivalence. |
@miquelramirez well, that is embarrassing! You are absolutely right that Regarding "type conversions" --- I definitely understand that's a relatively significant undertaking regarding the structure of Sorts. In terms of RDDL specifically I would definitely be interested in Boolean/Integer interoperability for practical reasons. That is actually the main feature that I was looking into when I realized I should reach out to you all to see if you already had a direction you were interested in. I noticed that the benchmarks you pointed to in #90 had primarily real-valued fluent modeled with functions, so I imagine that it would make sense to approach boolean-valued action and state fluents in a similar way. I think the main barriers to doing that would be to ensure first that Boolean values from the boolean sort interacted properly with logical expressions and also the more general issue of whether type conversion could be implemented in such a way that the arithmetic-with-booleans patterns that are standard in many RDDL domains would be supported. Thanks a lot! I know that some of these questions are far from trivial. I appreciate the discussion! I'm really hoping that I'm going to be able to leverage |
No need to apologize @mejrpete ! Nothing of this is documented :) Feedback on these features is very welcome, as I pretty much got them in to support the modelling of RDDL domains in the style you suggest, but I haven't really had time to work on them very much. Looking forward to someone to give them a good bang for their buck. One important thing is that in @gfrances and me have had some back and forth about whether we should ditch the concept of predicate and stick with Boolean functions, and IIRC we concluded to stick with predicates for clarity when it comes to deal with STRIPS and PDDL. Let us know if the features we have at the moment work for you, any feedback you have, or improvements in the modeling interfaces you may want to propose, is greatly appreciated. |
Thanks @mejrpete for your comments. I am not 100% sure that the workarounds mentioned by Miquel would be enought to have proper support for the kind of RDDL expressions discussed above:
So a question here would be whether transitioning to a more SMT-like representation where atoms just happen to be terms that take values within a {0, 1} domain would solve most of the issues with representing RDDL domains. A related question would be if there would be disadvantages to such a transition. If the answers to the above are "Yes" and "Not too many", then looks like supporting RDDL would be a reasonable argument in favor of switching to a representation that is agnostic about the textbook distinction between functions and predicates, more in line with the APIs of, say, most SMT solvers, then treat True and False equivalently to 0 and 1, etc. As Miquel says, we've discussed this change a number of times (last of which here) but never found compelling enough reasons to do the refactoring within our limited set of use (mostly PDDL-based) cases. Of course I don't think this would be a trivial change, but wouldn't be opposed to creating a new branch to explore this if there are good use cases for it. |
@miquelramirez @gfrances thank you both for your detailed replies! I believe (based on the information above and a bit of quick testing) that @gfrances is correct that the workarounds mentioned above fall short of allowing for modeling of the kind of RDDL domains I'm working with. @gfrances observation that 0/1 functions can't be used with logical connectives to form logical formulas being the main challenge. I completely understand that shifting to a more SMT-like representation internally is a very significant change (with the potential to have negative effects elsewhere in the system). To speak directly to question 1 from @gfrances I do think that a more SMT-like representation would solve most (if not all) of the issues with representing RDDL domains, since it would allow for direct interoperability between numerically-valued functions and boolean-valued-things where it's still possible to treat everything boolean-valued as There are, of course, advantages to having structural barriers to conflating predicates and functions both in terms of traditional formal definitions and approaches (e.g. FSTRIPS being an extension of STRIPS with Functions augmenting the core functionality of predicates). I also realize that the current I think the above question is demonstrated pretty well in something like if-then-else, since depending on the types of the expressions (lets say "numeric-domain-functions" or "predicate") and the context within the if-then-else resides the behavior must change. For example, the following are both perfectly legal RDDL (albeit not necessarily the most efficient representation of the behavior)
What I don't know is whether it's possible to actually support this without losing any of the advantages of having a fully separate understanding of I imagine one possibility would be to have (I'm not sure if I'm stepping on the formal notion of I wonder if this --- a default strict separation of Do that seem like a plausible approach? I obviously don't have much familiarity with the functionality of Thanks to you both for discussing this with me! I really appreciate it. I think it goes without saying at this point that if there is a direction here that you two find promising for an exploratory branch, etc I would be very interested in contributing heavily to it (whether it's as a direct contribution or a fork of the project that could later on be included as part of the upstream, depending on what you think of the approach). Thanks a lot! |
Sorry if this isn't the right way to do this, but @emilkeyder-invitae asked that I add him to this conversation when we last spoke, and an at-mention is the only way I know how to do it on a repo that I'm not a contributor for. Mentioning him here so he gets notified of where this is. |
Thanks for adding me Pete. I haven't looked at tarski for a while, but the last approach you outlined above that would (dis)allow casting between the two types based on the presence of a theory sounds like a reasonable approach to me. @miquelramirez, @gfrances, do you think it makes sense for the direction you want to go with tarski? Would it be helpful if Pete did a quick sketch of what the code would look like so we can review and see whether it's an idea worth committing to? |
Hi @mejrpete, Emil, and sorry for the slight delay in answering. I think it'd definitely make sense to start an exploratory branch / PR / fork, whatever you guys are more comfortable with, and I would definitely try to help a bit with that. As for the best design to start with that: I fear that trying to keep everyone happy by having some "theory", or similar mechanism, change the way functions and predicates are conceptualized, will end up meaning a lot of duplicated efforts. If I were to spearhead this, I would perhaps start by trying:
Of course there's a certain tradeoff: these options might mean a bit more refactoring work at the beginning, but much less maintenance work in the midterm. What do you guys think? |
Thank you both for your responses! I think a full SMT-like representation would work great, especially if going that route is the preference for both of you. I can definitely see the value of reducing the complexity of the internal representation that way. @miquelramirez I would be happy to generate a selection of test cases to drive the refactoring. My tendency would be to focus on RDDL/FSTRIPS-related integration and single-feature tests (in the same assertion-based Do you think that the I will get started working on an initial set of tests. Perhaps for the first round of tests I could submit them as a PR on a new branch from a clean fork and we could go from there? Is there any particular naming convention you both prefer for the new branch I'll create on that fork? I'm assuming that the current HEAD for Thanks! |
Would it be feasible to make Predicate an alias for bool valued Function?
That way it might be possible to keep most of the test code the same.
…On Thu, Jul 9, 2020 at 12:31 PM mejrpete ***@***.***> wrote:
Thank you both for your responses! I think a full SMT-like representation
would work great, especially if going that route is the preference for both
of you. I can definitely see the value of reducing the complexity of the
internal representation that way.
@miquelramirez <https://github.com/miquelramirez> I would be happy to
generate a selection of test cases to drive the refactoring. My tendency
would be to focus on RDDL/FSTRIPS-related integration and single-feature
tests (in the same assertion-based pytest style that I see in the
existing test suite) to start, if that seems reasonable to you guys.
Do you think that the Predicate identifier should be struck from the API
altogether then? Or should it be an alias for boolean-valued functions? If
the SMT-like representation involves actually striking "Predicate", etc
from the API, I imagine that we will break API assumptions used for a
significant chunk of the rest of your test suite. I imagine those tests
could either be translated to the new function-based API as the refactor is
happening, or could be a significant part of eventually (if things work
properly!) merging the refactored code in off the dedicated branch. In the
second case, I think the tests I could write myself during the refactor
would be good enough to ensure correct support for the features *I'm*
most familiar with in Tarski (mostly reading/generation/writing PDDL and
RDDL), but I think additional work to ensure test coverage outside of the
PDDL/RDDL reading and generation code on the new API would be needed to
confirm the same level of test coverage that you have currently.
I will get started working on an initial set of tests. Perhaps for the
first round of tests I could submit them as a PR on a new branch from a
clean fork and we could go from there? Is there any particular naming
convention you both prefer for the new branch I'll create on that fork? I'm
assuming that the current HEAD for master is a reasonable place to source
that branch, unless there's more tests or other features elsewhere?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#91 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKLRF3FJ3LDOMW5FLIHOY73R2XWFVANCNFSM4N4PP67A>
.
|
Hi guys, @mejrpete, I would branch from I'm not opposed to keeping some "alias" for Predicate (not sure what kind of Python thing you have in mind for that).
which looks quite manageable. I'm not that concerned with whether removing Predicates will mean a lot of internal changes, but a bit more about breaking backwards compatibility for "external" users of Tarski, even though at the moment Miquel and I are probably 50% of the users of Tarski :-) But in any case, as long as we document properly how to adapt existing code, everything should be fine. |
@gfrances Understood! I will branch from I'm also not sure what python mechanism would be best for that. I suppose the pythonic way to deal with it would be exactly to subclass Understood completely on being concerned about breaking backwards compatibility. Thanks for being so open to considering these changes, I really appreciate it (especially selfishly, since it enables my own use case!). |
Hi @mejrpete , just wondering if you ever had the chance to start with this? I could have some time these upcoming weeks to help on it if there's still interest. |
@gfrances Thanks for checking in. Sorry I dropped off the face of the earth after this discussion. This past week I just wrapped up some progress on this --- although not 100% in the direction that we had previously discussed. Because of the scale of the SMT-like representation refactor (and the fact that there appeared to be some necessary API changes), I had encountered a bit of difficulty writing a test suite for the discussed features that would simply bolt into the existing tests. In order to avoid duplicating test infrastructure and to explore the changes that were going to be needed, I ended up adding to the existing test suite (while assuming minimal changes to the public API) in parallel with implementing an intermediate refactor that relies on a I found this implementation to be an easier starting point for me, since it also gave me an opportunity to become much more familiar with the portions of the The version I currently have is passing all but 1 (plus 1 more that was also not passing on I'm currently finishing up
There are a few hacks involved in my current version (which are certainly not a good idea moving forward) that I used to preserved the existing API. Unless I'm missing something, I think removing these hacks for the full SMT-like refactor will likely require some API changes (which obviously warrants discussion with you guys) In the very short term, I believe I am going to start using this intermediate refactor for the functionality for the project I'm working on with @emilkeyder-invitae. However, I'm very interested in implementing the full SMT-like refactor, and (once I add a few more specific unit tests) think that my testing additions (taken either alone, or along with my intermediate refactor) may be a relatively good starting point for that. What would be your preferred path forward for this? One strategy could be for me to file a PR pointed at a new feature branch with my current version (along with the corresponding tests) where the PR text could give my detailed descriptions of the internal changes made and the current questionable design choices (or hacks) that let me preserve API components that I was concerned about breaking (in particular, non-conditional FSTRIPS Let me know what your preferences are! I will get those descriptions finished up to help with the discussion (either for a PR or as a reply on this issue). Apologies again for my total radio silence on this since our previous discussion. I will be sure to be more communicative moving forward! |
Hi @mejrpete, great to hear from you, and that you have been making significant progress. I am also going to start using (again) the parts of Tarski that interface with My preference would be a PR, as github makes very easy to track changes and keep the discussion in context. One important bit that we haven't really discussed - because it is not entirely sure that it is relevant - is that currently in Tarski we don't have a "standard" way to deal with RDDL "actions". These actually are a more general concept than it is the norm in planning languages where decisions are given as discrete actions a(t), as the decision at a given time point t can be given as a high-dimensionality vector of real numbers x(t), subject to constraints. RDDL has a clear influence from the literature in Operations Research and Stochastic Programming, and there is a gap here that needs to be navigated. In the Regards, Miquel. |
Hi, I'd also love to see that PR and be able to contribute! Interesting point, Miquel. What would you suggest? Is this easier to handle if we just stay at the representational level, |
I think that Scott didn't want to rile up people and decided to call "action variables" what he would have probably wanted to call "decision variables". One of the elements in the gap is how do you define the transition function. In planning languages very specific frame axioms are assumed, this then allows to define the transition function very efficiently. In RDDL the transition function is fully specified by the modeller, and interpreted as a DBN. Another gap is that RDDL assume vector decisions to be chosen somehow from a constraint satisfaction problem. The planner is very much expected to compute its own actions on the spot. A problem in RDDL, from my point of view is that the above is incomplete, there should be the possibility to both define what actions are admissible (comply with constraints) and which are more suitable (minimise or maximise a cost function). Resolving this would allow to consider problems like portfolio management, where we want to compute the stock order that maximises a given performance index, which depends on the volume of the orders (the magnitude of the values of the decision variables). This would also do away with the problem of having a potentially very large set of feasible instantiations of decision variables (say the admissible decisions are inside a polytope). It is very much a topic of tools research. |
In what respects language support we don't assume an interpretation, we just expose a nicer AST :) |
Hi all --- apologies for the delay. I have just submitted the PR as discussed above! However, I realized when submitting it that Github doesn't appear to support (I think Bitbucket used to at least) requesting a new branch in the PR, it only allows me to submit a PR to an existing upstream branch. I submitted this as a PR against |
In terms of the action/decision representation --- I agree that the representation in RDDL is significantly different than in PDDL/FSTRIPS representations. This hasn't been a problem for us on our project thus far, since our domains have only boolean-valued action fluents and the parser/planner(s) we are using are grounding the entire problem, including the action representation, so that at solve-time there are operators corresponding to each possible decision. This is made easier by the fact that (at least currently), each "operator" is associated with only one true-valued action variable (limited by action constraints) at each time step, which means there is no blowup in the action space. It seems like it would depend on what is needed on the |
Hello @mejrpete. Thanks very much for the PR @mejrpete, I will start reviewing it soon.
Thanks for sharing a bit more details about your use case.
That is something I have been working in parallel to the main https://pubsonline.informs.org/doi/abs/10.1287/educ.2014.0128 Nothing groundbreaking from a theoretical perspective, but I found some key methodological and practical insights. RDDL allows to model MDPs with "precomputed" decisions, and allowing to define decisions implicitly as an optimization or satisfiability problem so would indeed go well beyond what RDDL can do at the moment. It is also a steep departure from one important theoretical assumption implicit in the literature on planning. Namely, that the set of actions applicable on a given state can be computed in polynomial time. In practice, we kind of know that for current state-of-the-art forward search techniques to scale up we probably need action applicability to be resolved in no worse than L. Note that P, or rather, FP, accommodates Linear Programming if we impose a bound on the representation of the numbers involved in the computation. So I am looking forward to add a capability like this to |
Hi all! I know it has been a long time, but wanted to pop in and reconnect. A few of us including @emilkeyder-invitae and @AnaghaK (I don't know if that mention is going to work correctly) have been discussing the features implemented here and as part of the associated PR from last year. Our discussion was in context of what might be needed to get this branch (and associated features) to a point where it might eventually be appropriate for the mainline Wanted to drop in and connect everyone so we could start that discussion. I know you all have been doing a bunch on tarski recently. Because of that, and particularly in context of the fact that this original refactor relied on wrappers to enable interop between Predicate/Formula and Function/Term structures (rather than moving to a full SMT-like underlying representation), I know that almost no matter what figuring out the right path forward on this would involve some careful discussion. I think the core questions about what is appropriate and what would need to be settled are reasonably well laid out in my notes for PR #96 from last year. In particular,
Hope you're all doing well! Sorry for the long period of radio silence. Looking forward to the discussion. Let me know whether the right way to do to this is to open a new (clean) issue (or start something in the new "discussions" github feature), or whether this is the right place to keep discussing this. I figured that this was a reasonable first step, given that we never fully closed this issue (and since the basic ideas still follow directly from those that we originally brought up here). Thanks a lot! |
Hold on there @mejrpete! It's been a turbulent 2020 (and 2021 is throwing some curveballs to me at the moment as well!). Believe or not I have been looking at this on-off for the last year, and until recently I haven't had a excuse (being a post-doc who is "supposed" to work on certain things) to put time into I am happy to respond to you over here. The Discussions app is cool but I would like to keep this long thread preserved as it is. |
Hi Pete (@mejrpete , let me reiterate our gratitude for your interest and the effort put into the refactor. I was quite surprised that the changes you needed to make turned out to the core classes was relatively small. The side-effects on the effect classes and the like were less so in my opinion. Feedback on the
|
@miquelramirez Thanks so much for your detailed comments and your sharing of the representational approach you have been working to support the temporal fragment of I very much agree with the framing of the Am I right in understanding that your proposal is to handle Boolean-valued items from both My conceptualization of the refactor is informed additionally by the fact that our main use case is "constructive" in terms of domains that can then be output to clean RDDL. How do you imagine handling logical expression construction over Boolean-codomain atoms in that case? While the if/then/else example you gave doesn't require it, we often see in RDDL CPFs that look like
in addition to patterns like
If I understand you correctly, we would understand the One final note on the elegance of this solution (as opposed to the approach I had assumed when writing the wrapper-based refactor): I had noticed that when defining instances for RDDL domains using
This sounds like a great idea. As long as I understand properly the intended API-interaction pattern differences when it comes to defining and constructing expressions, etc over Boolean valued items, I think getting the tests tweaked to match that pattern will be very easy and a nice starting point! Thanks for your detailed response and engaging on this! (As a final comment --- while interop with |
Hi Pete,
Thanks very much for the kind words, @mejrpete. Your approach made perfect sense too, and I agree with your notes that it had some side effects which would be best to avoid. But I have an unfair advantage which is that 1) I co-designed I think that it is for the better to leave
Those are tricky ones mate
is an interesting construct, where we have a Boolean random variable - the My take would be to write the right-hand side in
since Does the above make sense? Note that our current implementation of the
And thanks to you for your inputs Pete :) Looking forward to seeing how far my suggestion can go.
These temporal planners will be out (I hope) in a few months at the latest. |
Hi againg @mejrpete ,
I was reviewing what I wrote last night and now I realise that the above is actually nonsense! The actual way forward now I think would be to coerce the expression to be of type |
@miquelramirez Sorry for the slow response this time! Thanks for the rigorous response. I completely agree that this makes sense from a representational standpoint. I also agree that it's perfect to not have to ruin the core FSTRIPS functionality in I think migrating the tests I wrote for RDDL (although they're incomplete re: covering parsing from RDDL into
Most of that is just nonsense without the rest of the domain, but the part I'm interested in is:
I'm fully convinced that the equality atom approach takes care of the logical expression inside the brackets there (since it would turn into What's your read on how to handle this? My intuition would say that I could just alternately write
but since (unless I'm missing something) we don't have a 1-1 correspondence between logical operators and simple math operators on integers, I don't have an easy way to make this work with a version of that expression using "or" instead of "and", i.e.
I guess my point is that with the RDDL patterns we can't just always coerce the arguments of a logical expression into equality atoms, we have to keep in mind the context outside of that as well. In the What's your read on this? I get that (in the standard way) the I hope I'm not missing something here! Realized while modifying the integration tests to this pattern that I just didn't know how this sort of thing should be formulated, and figured it would be worth clarifying. |
No worries @mejrpete - I am also a bit swamped at the moment :( I couldn't help smiling :) that you were non-plussed by the IIRC Your first solution
should work without issues. This construct I guess is counterfactual, as in you trying to explore the side effects of the above, is that correct? So let's assume somebody really really needs this on a precondition or an effect
then I would say to write instead
that is, using our implementation of
Reifying the disjunction is non-trivial, e.g. you get constraints that are not linear. |
Hey there! I've got some time to work on this again, and wanted to touch base. I think I'm pretty comfortable after all this discussion on what's needed from the standpoint of usability for this pattern (for RDDL specifically). I think I've got my tests almost entirely sorted out (at least as a starting point) for validation of the approach (and as a driver of any implementation that would actually be needed). The good news (as you've observed!) is that this pattern requires little modification of the core tarski representations. What implementation is needed to be usable for our case (if I understand correctly) is pretty concentrated in I'm making a last pass through my tests, but I think I'm close to having a good starting point. @miquelramirez are you still on board with me creating a new branch (presumably from the current Thanks again for the detailed discussion! |
Hold on there buddy! I will get back in detail to you as soon as I can. Yep, create a new branch with the target being our Thanks again and sorry for being so late to get back to you - your email has been sitting in my inbox for days looking askance at me... |
No worries at all! I'm starting exploratory implementation locally to debug my tests and see what's necessary. I'll wait for your detailed response and keep doing what I'm doing in the meantime! And absolutely no worries on the latency on replies. Everyone has a lot going on 😊 |
…ort equality-atom based boolean interop development Tests are focused on supporting Boolean/numeric interoperability for RDDL as discussed in aig-upf#91. Currently passing all relevent tests. Read-side IO is untested. Write-side IO does not test necessary simplifications from the equality-atom, if-then-else wrapper, and sumterm-based quantifier replacements to typical RDDL patterns.
@miquelramirez shared a draft PR (#120) with what I've done so far, and some comments on what is still open/should be discussed (among any other things 😊). Opened it as a draft PR on Looking forward to some additional discussion when you have time. Thanks for all the conversation to this point! |
@miquelramirez Know it has been a while, but this came up on my radar again and figured it would be worthwhile to check in! The draft PR mentioned above has the basic changes that I implemented to get the basic interop we discussed in the most recent round of back and forth related to RDDL support in tarski. Let me know if there's anything I can clarify or anything we should chat through! Thanks again! |
Hello @mejrpete , I hope things are good up there in the States. Here they have been difficult. Melbourne has been locked down since very much the day you sent your penultimate message, and we're reopening today. Home-schooling and difficulties to access as much childcare as we would need really put a squeeze on the time I had available - and the mental bandwidth I could devote to anything not laying along the "critical path". Early September deadlines and other internal deadlines I have (and students, and reviews, etc.) haven't been particularly cooperative. I have been looking through your PR on and off over the past 8 weeks or so, I have found it very hard to sit down with it without being interrupted. I don't have any major issues with it, but I have yet to merge it locally into Best regards from Melbourne, Miquel. |
I appreciate it. Things have moderated somewhat here, but definitely have not yet normalized. We have been luckier than many. Understood completely on additional constraints because of COVID. Absolutely no time pressure on any of this, I appreciate your response. Thanks for your comment on the PR. I will take a look and reply there (and will hopefully clarify re: the comments you highlighted). Thanks for all the time you've spent going back and forth on this. I really appreciate it! Best wishes with reopening. |
Related to #90
(Sorry for the amount of text here! I also hope I'm understanding the moving parts in
tarski
correctly, or else I might not be making much sense.)RDDL has a number of language features and expected behaviors related to boolean and numeric-valued action and state fluents that do not appear to be fully supported by
tarski
. These includestatefluent'(?v) = CONSTANT * actionfluent(?v)
, including boolean-valued state and action fluents.sum_{?v : object [statefluent(?v)]
One of the challenges in supporting all of these features, particularly with boolean-valued fluents is the question of which
tarski
structures should be used to represent boolean-value fluents (predicates
orfunctions
). When representing a state-fluent as a function, for example, we writeThis puts us in a bit of a messy situation, however. Rather than getting out a boolean-valued state fluent (in the RDDL sense), RDDL built from this configuration will have a new
Boolean
object, with valuesTrue
andFalse
, on which no logical operators can be applied and where none of the standard control structures above are defined. It is worth noting that for the comparable use of theInteger
sort,tarski
correctly treats integer-valued items as numeric and can generate appropriate arithmetic in RDDL without issue.The obvious alternative is to use predicates to represent boolean-valued state/action fluents and nonfluents. In this case, we do not require the Boolean theory in the language and can write
In this case, we do not end up with a new Boolean object type (which is good!), and we are able to treat values as true boolean-values in RDDL for the purposes of logical formulae, etc. There is no problem, for example, declaring a CPF entry as in the last line above. There are a few bits of strange behavior doing it this way (like only being able to set instantiations of
f(constant)
totrue
in an initial state because we are only able to usemodel.add()
and notmodel.setx()
), but I think that can probably be handled as a separate (focused) bug/feature issue if it turns out predicates are the correct tool to be using to represent state/action fluents and non-fluents.These predicate-defined state and action fluents work great with logcial operations, as we would expect! But RDDL expects more interoperability between boolean and numeric types than this. In particular, we expect to be able to do arithmetic on boolean values where typical 0/1 numeric values are assumed for false/true. However, in both the predicate-defined and the function-defined case it doesn't appear that this is currently possible. Figuring out how to handle this seems to be a prerequisite to fully supporting "IF/Then/Else", RDDL-style sums over state/action values, and standard CPF & action-constraint definition approaches (which often rely heavily on arithmetic over bool-valued items).
I want to note that the separation of boolean and numeric types for functions, and the lack of interoperability between numeric-valued things and "boolean valued things that are actually predicates under the hood" makes complete sense, especially in context of any PDDL-like language and given
tarski
's careful understanding of numeric values as numeric Sorts, etc. What is not obvious to me is the correct way to handle this kind of thing within thetarski
framework.Function
orPredicate
objects?Function
objects: this means that the fact that functions (when "called") emit aCompoundTerm
object needs to be reconciled with the fact thatFormula
and its subclasses expect sub-formulas to be Formulas (eventuallyAtoms
), which means that logical operators are not applicable toFunction
terms.Predicate
objects: this means that (unless I'm missing something), there is a need to restructure or abstract the separation betweenFormula
andTerm
objects so that it is possible to do arithmetic on boolean-terms-that-are-predicates.The key observation here is that either way, being able to support an RDDL definition like
reward = CONSTANT * exists_{v : some_type}[bool-state-fluent(?v)]
requires eitherFormula
objects to acceptFunction
objects as subterms, or operators inCompoundTerm
objects to be able to handle a numeric sort and the underlying boolean type of a predicate as two acceptable types (forFunction
objects orPredicate
objects respectively).Thoughts? I don't think I'm missing anything about how
Predicate
/Formula
andFunction
/Term
objects are working intarski
that would make this trivial. Apologies if I am!The text was updated successfully, but these errors were encountered: