Skip to main content

Agent

Agents are the backbone of StarLogo Nova. Agents are the objects commonly seen moving around SpaceLand. Different types of agents are referred to as "breeds". A specific individual part of a breed is called an "instance".

Creation & Deletion

Agents are created using code blocks such as:

Agents can be deleted 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 as 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 an agent is created, it also copies the default values for traits and stores its 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 - x-coordinate position
  • y - y-coordinate position
  • z - z-coordinate position
  • heading - direction the agent is facing
  • color - visual color of the agent
  • shape - visual shape of the agent
  • size - size of the agent

Custom traits can be created for each breed. Custom traits can be used to track values per instance.