Menu

How can capability be inserted at runtime

Help
Jeff Green
2017-02-22
2017-02-22
  • Jeff Green

    Jeff Green - 2017-02-22

    Hello,

    I have been working through Jadex 3 tutorial jadex.bdiv3.tutorial.e1.

    My question relates to the lines 22 and 23:

    line 22 @Capability
    line 23 protected TranslationCapability capability = new TranslationCapability();

    Line 23 hard-codes the name TranslationCapability in class TranslationBDI.

    To change line 23 so that the capability can be inserted at runtime
    what must be done? Is there an example I can refer to?

    If the capability name is not hard-coded as shown, and if the Translate goal is not coded in
    the TranslationCapability file then the error message "Unknown goal type"
    appears.

    Hope you can help,

    Jeff.

     

    Last edit: Jeff Green 2017-02-23
  • Lars Braubach

    Lars Braubach - 2017-02-23

    Hi Jeff,

    similar to OO world we build a kind of agent class (we call it agent model) for each type of agent. This model already contains all the capabilities so that it is currently not easily possible to add a new capability at runtime. For this purpose we would have to give each agent its own personal model so that it can be modified without impacting other agents of same type.

    Maybe there is a conceptual alternative to adding a capability at runtime. Could you describe your use case so that we may think how it could be achieved?

    Best
    Lars

     
  • Jeff Green

    Jeff Green - 2017-02-24

    Hi Lars,

    Thank you for answering me so soon. I appreciate it.

    An example of a use case could be an agent that learns. A new lesson learned or perception/belief acquired can become a new skill/capability of the agent at runtime.

    At runtime the new lessons should be implemented as new BDI goals/plans or @Capabilities of the agent. Because this is happening at runtime, and because a lesson can take an unpredictable form, new lessons cannot be included as part of an agent model during development. So, in circumstances where the agent has to adapt or evolve, it needs to be able to acquire new BDI goals/plans/capabilities at runtime.

    A conceptual alternative would be fine, but I think that it should preserve BDI.

    Best,
    Jeff.

     
  • Lars Braubach

    Lars Braubach - 2017-02-26

    Hi Jeff,

    I see, this is an interesting case. If the goals/plans of new lessons are unrelated to other goals/plans that could work with capabilities. Otherwise it gets really complicated. How can a consistent overall behavior guaranteed in that case. Currently, the only extension point is using beliefs collections/maps and adding knowledge but not behavior.

    We can have a look at the internals and try to estimate how difficult an extension towards a copy on write model is. We basically have to factor out the functions for adding a capability to the agent.Maybe one of my colleagues has sth to add/comment here.

    Best
    Lars

     

Log in to post a comment.

MongoDB Logo MongoDB