Difference between revisions of "Methods"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
(Created page with "An agent's behavior can contain any number of methods. A method is a segment of the agent's behavior that contains a set of rules. A trigger is at the head of every method and de...")
(No difference)

Revision as of 21:21, 8 August 2011

An agent's behavior can contain any number of methods. A method is a segment of the agent's behavior that contains a set of rules. A trigger is at the head of every method and determines when the method will be called. Triggers that label method boxes in the Visual AgenTalk language behavior editors include:

  • While running: the agent's main method is labeled with the While Running trigger. This method is repeatedly called at each simulation cycle (time step) while the simulation is running.
  • On
  • When Creating A New Agent
  • On Mouse Click
  • On Mouse Hover

The behavior editor for a new agent or an agent with no behavior comes up with a single method containing the While Running trigger and one empty rule.