Skip to content
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

Operators and Action Generation #9

Open
AdamSobieski opened this issue Nov 22, 2022 · 0 comments
Open

Operators and Action Generation #9

AdamSobieski opened this issue Nov 22, 2022 · 0 comments

Comments

@AdamSobieski
Copy link
Collaborator

This issue is about the expressiveness for customizing operators’ action generating methods. It could be made possible for developers to be able to specify, for an operator, a scripting method with which to override action generation. That is, a special event on operators could be one for when actions are created by providing arguments to an operator.

Operator o = ...;
Action a = o.generate(world, p1, p2, ...);

With this expressiveness, markup might resemble:

<domain xmlns="..." xmlns:ext="..." version="0.1.5">
  <head>...</head>
  <body>
    <operators>
      <operator name="move" generate="move_custom_generate">
        <meta>...</meta>
        <parameters>
          <parameter name="from" />
          <parameter name="to" />
          <guard type="text/sparql+calculus">
            <![CDATA[
              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
              PREFIX domain: <http://example.com/domain#>
              ASK
              {
                rdf:type(?from, domain:room).
                rdf:type(?to, domain:room).
                ?from != ?to.
              }
            ]]>
          </guard>
        </parameters>
        <preconditions type="text/sparql+calculus">…</preconditions>
        <effects type="text/sparul+calculus">…</effects>
        <script type="text/javascript">
          <![CDATA[
            function move_custom_generate(…)
            {
              /* something like */
              var a = global.createAction('move', ...);
              return a;
            }
          ]]>
        </script>
      </operator>
    </operators>
  </body>
</domain>

This capability and expressiveness could add complexity to representing solutions or output plans; solutions might need to be able to import reusable domain modules.

Any thoughts on these topics?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant