|A Tinderbox Reference File : Agent Queries : Self-referring agents||aTbRef Site Map|
It can be useful for an agent's query or action to refer to the agent itself. This is especially helpful if creating generic agents where the same query/action needs to be applied many times in different contexts.
The 'agent' designator can be used within the agent to refer to its own attributes. This allows some construction of prototype agents. Thus:
Or, more usefully:
In the prototype agent $TargetNoteName is blank. To use the system make a new agent, set it's $TargetNoteName to the name of the container you wish to analyse, set the agent to use the prototype. This way a generic agent with many attributes can be pre-made and re-used many times.
|Up: Agent Queries|
|Previous: Controlling Agent Update Cycle Time||Next: Legacy query code|
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]