Package jason.stdlib

Class desire

All Implemented Interfaces:
InternalAction, Serializable

@Manual(literal=".desire(desire)", hint="checks whether the argument is a desire", argsHint="the desire to be checked if it is present", argsType="literal", examples=".desire(go(1,3)): true if go(1,3) is a desire of the agent", seeAlso={"jason.stdlib.intend","jason.stdlib.drop_all_desires","jason.stdlib.drop_all_events","jason.stdlib.drop_all_intentions","jason.stdlib.drop_event","jason.stdlib.drop_intention","jason.stdlib.drop_desire","jason.stdlib.succeed_goal","jason.stdlib.fail_goal","jason.stdlib.intention","jason.stdlib.resume","jason.stdlib.suspend","jason.stdlib.suspended"}) public class desire extends intend

Internal action: .desire(D, [ I ]).

Description: checks whether D is a desire: D is a desire either if there is an event with +!D as triggering event or it is a goal in one of the agent's intentions I.

Example:

  • .desire(go(1,3)): true if go(1,3) is a desire of the agent.
  • .desire(go(1,3), I): as above and I unifies with the intention that contains the desire. I is the identification of the intention. The internal action .intention can be used to further inspect the state of the intention.
See Also: