public class fail_goal extends succeed_goal
Internal action:
.fail_goal(G)
.
Description: aborts goals G in the agent circumstance as if a plan
for such goal had failed. Assuming that one of the plans requiring G was
G0 <- !G; ...
, an event -!G0
is generated. In
case G was triggered by !!G
(and therefore
not a subgoal, as happens also when an "achieve" performative is used),
the generated event is -!G
. A literal G
is a goal if there is a triggering event +!G
in any plan within
any intention; also note that intentions can be suspended hence appearing
in sets E, PA, or PI of the agent's circumstance as well.
Example:
.fail_goal(go(1,3))
: aborts any attempt to achieve
goals such as !go(1,3)
as if a plan for it had failed. Assuming that
it is a subgoal in the plan get_gold(X,Y) <- go(X,Y); pick.
, the
generated event is -!get_gold(1,3)
.
Constructor and Description |
---|
fail_goal() |
Modifier and Type | Method and Description |
---|---|
int |
dropIntention(Intention i,
Trigger g,
TransitionSystem ts,
Unifier un) |
java.lang.Object |
execute(TransitionSystem ts,
Unifier un,
Term[] args)
Executes the internal action.
|
checkArguments, drop, getMaxArgs, getMinArgs
canBeUsedInContext, destroy, prepareArguments, suspendIntention
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.Exception
InternalAction
execute
in interface InternalAction
execute
in class succeed_goal
java.lang.Exception
public int dropIntention(Intention i, Trigger g, TransitionSystem ts, Unifier un) throws JasonException
dropIntention
in class succeed_goal
JasonException