Agent: Difference between revisions
(Agent Page Draft) |
m (Added category) |
||
Line 1: | Line 1: | ||
Agents are the backbone of StarLogo Nova. Agents are the objects commonly seen moving around [[SpaceLand]]. Different types of agents are refereed to as "breeds". A specific individual part part of breed is called an "instance". | Agents are the backbone of StarLogo Nova. Agents are the objects commonly seen moving around [[SpaceLand]]. Different types of agents are refereed to as "breeds". A specific individual part part of breed is called an "instance". | ||
== Creation & Deletion == | ==Creation & Deletion== | ||
Agents are created using [[Code Blocks|code blocks]] such as: | Agents are created using [[Code Blocks|code blocks]] such as: | ||
*{{Block|l|create}} | *{{Block|l|create}} | ||
*{{Block|Create Each Do|create [_] [▼](s) each do}}. | *{{Block|Create Each Do|create [_] [▼](s) each do}}. | ||
Agents can be deleting using blocks such as: | Agents can be deleting using blocks such as: | ||
*{{Block|l|delete}} | *{{Block|l|delete}} | ||
Line 10: | Line 10: | ||
*{{Block|Delete Agent|delete agent [_]}} | *{{Block|Delete Agent|delete agent [_]}} | ||
== Code Execution == | ==Code Execution== | ||
Agents execute [[code block]]s under their specified [[tab]] in the [[workspace]]. The code written under the tab can be thought of a set of instructions each agent makes a copy of and follows individually. | Agents execute [[code block]]s under their specified [[tab]] in the [[workspace]]. The code written under the tab can be thought of a set of instructions each agent makes a copy of and follows individually. | ||
== Traits == | ==Traits== | ||
All Agents have a set of traits. Traits are variables that are individual to each instance of an agent. Each time a agent is created, it also copies the default values for traits and stores it's own version of the variables. | All Agents have a set of traits. Traits are variables that are individual to each instance of an agent. Each time a agent is created, it also copies the default values for traits and stores it's own version of the variables. | ||
Agents have the following built-in traits: | Agents have the following built-in traits: | ||
* id | *id | ||
** a unique number given to each instance (cannot manually be set) | **a unique number given to each instance (cannot manually be set) | ||
* breed | *breed | ||
** the type of agent | **the type of agent | ||
* x | *x | ||
* y | *y | ||
* z | *z | ||
* heading | *heading | ||
* color | *color | ||
* shape | *shape | ||
* size | *size | ||
Custom traits can be created for each breed. Custom traits can be used to track values per instance. | Custom traits can be created for each breed. Custom traits can be used to track values per instance. | ||
[[Category:Technical]] |
Revision as of 18:53, 10 August 2022
Agents are the backbone of StarLogo Nova. Agents are the objects commonly seen moving around SpaceLand. Different types of agents are refereed to as "breeds". A specific individual part part of breed is called an "instance".
Creation & Deletion
Agents are created using code blocks such as:
Agents can be deleting using blocks such as:
Code Execution
Agents execute code blocks under their specified tab in the workspace. The code written under the tab can be thought of a set of instructions each agent makes a copy of and follows individually.
Traits
All Agents have a set of traits. Traits are variables that are individual to each instance of an agent. Each time a agent is created, it also copies the default values for traits and stores it's own version of the variables.
Agents have the following built-in traits:
- id
- a unique number given to each instance (cannot manually be set)
- breed
- the type of agent
- x
- y
- z
- heading
- color
- shape
- size
Custom traits can be created for each breed. Custom traits can be used to track values per instance.