That's a very interesting question!
In that same paper I mentioned in the previous message, we defined
some new Standard Internal Actions (which aren't available in
the latest release yet). But what they do is to allow you to drop
a goal and all that's on top of it, so in your exemple below, if you
drop sb2, sb3 is droped too, but you could carry on with the plan for sb1 or
indeed say that because of the dropped part plan sb1 is failing, so a plan
failure event will happen. For the exact situation you're describing we don't
plan to provide standard internal actions (given that sb3 is being executed to
achieve something that is required to achieve sb2, if you drop sb2 there will
usually be no need to keep sb3, but maybe in peculiar situations
this might be useful). It'll take sometime before those internal actions are
implemented. When they are, it'll be very easy for you to define your own
internal action to do what you say below, by copying and modifying the
standard ones. If you need to do this right now, you might need to understand
a bit of the Java code of the Jason implementation...
Andy Here!!! writes:
> i am wondering, is there any function for removing subgoal inside an
> intention stack??
> | sb3 |
> | sb2 | <-- intention stack
> | sb1 |
> is there a way to remove sb2 without affecting the whole intention?? so it
> will be only sb1 and sb3, and after sb3 finishes then sb1 will be continued.
> any suggestions are welcome.. thank you very much