Search code examples
artificial-intelligenceagent

Is there a way to 'suppress' a 'No failure event was generated for..' warning/error in Jason/AgentSpeak?


I'm trying to move across a grid, navigating obstacles. This requires me performing an action 'move' (certain number of steps, X,Y). If I bump into an obstacle on the way, I call an internal action that allows me to go around it, then move the remainder of my way.

This will give a

    'No failure event was generated for..'

in the plan which I move in (when it hits the obstacle), as if there's an obstacle on the way the whole move won't be completed in the agent's mind, even though I am navigating the same distance eventually with help from my internal action (I think this is the reason). It continues on even with the error.

I was wondering if there's a way to deal with this warning/error, as I'm reaching the correct destination anyway. I hope this makes sense.


Solution

  • Regarding the error message, if it due to the lack of applicable plans, we can simply add a new plan without context. For example:

    // your plans:
    move(...) : .... <- ...
    move(...) : .... <- ...
    move(...) : .... <- ...
    
    // new plan:
    move(...). // always applicable, does nothing.