Discord
@hash/age-js
Behavior
8
0
Public

age-js

This behavior increments an agent's age property by one for every time step of the simulation. It is a JS-only analogue of the @hash/age rust-based behavior

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).

It is a JavaScript-only analogue of the Rust-based behavior @hash/age.

Example

Place the following within your init.json

[
    {
        behaviors: ["@hash/age-js/age.js"],
        age: 0,
    }
]