Globals are variables which are accessible to all agents in a simulation

Global variables are defined in the globals.json file present within every simulation. These variables are immutable while the simulation is running and are accessible to all agents simultaneously.‌

Globals are typically used to specify environmental variables (e.g. topology) or macro assumptions (simulation parameters) that define the state of the world.

Accessing these global variables is as simple as using the context.globals() function in any agent behavior.

To modify globals while a simulation is running, first pause the simulation before making any changes, reset the simulation, and resume.

HASH does not support modifying globals mid-step, but support for modifying globals between steps is coming soon.

There are two types of global variables in HASH: