jason-lang / jason

Jason is a fully-fledged interpreter for an extended version of AgentSpeak, a BDI agent-oriented logic programming language.
http://jason-lang.github.io
GNU Lesser General Public License v3.0
215 stars 67 forks source link

Is selectOption customizable? #95

Closed nmontesg closed 1 year ago

nmontesg commented 2 years ago

Hi,

I am using Jason to work on my research (on theory of mind and cooperation). It would be extremely useful for to implement an option selection function (S_O) that considers the priority/1 annotation among the set of applicable plans. I have tried to implement a custom selectOption function (in an Agent subclass), however the interpreter appears to be falling back to the default selection option and ignoring the custom one. Meanwhile, both selectEvent and selectIntention are effectively overridden when I write a custom method. Is the selectionOption methods actually customizable?

Many thanks,

Nieves

jomifred commented 2 years ago

Dear Nieves,

indeed selectOption customisation wasn't yet supported for jason 3.0. We changed quite significantly the default procedure and the interface will likely need to rethought. (see https://github.com/jason-lang/jason/blob/0c90e085279e0194b024db847c7204e49ca915a6/src/main/java/jason/asSemantics/TransitionSystem.java#L487)

I will add this in the ToDo list and will try to handle it soon.

Meanwhile, we can use Jason 2.*.

jomifred commented 2 years ago

Nieves, I've just committed a tentative to fix the issue.

nmontesg commented 2 years ago

Thank you!