@hash/age
Behavior
42
0
Public

Age

This behavior increments an agent's age property by one every time step of the simulation.
Readme

This behavior increments an agent's age property by one every time step of the simulation.

If the agent is not initialized with the age property, it will default to 1 after the agent first runs the behavior (essentially having been initialized at 0).

Example

const newbornAgent = {
    behaviors: ["age"],
    age: 0,
}