Wrapping Presets and Flags

Granular control of how the world is presented to hCore

In Bounds and Wrapping we showed how you could set wrapping presets to determine how the topology of the simulation works. Here, we'll show some flags to get even more granular control of HASH's topology engine.

Each pair of borders share a specific wrapping behavior. This could be any one of:

  • continuous : Pacman-style wrapping where the agent is teleported to the opposite border

  • reflection: Agents are bounced off against borders

  • offset_reflection: Agents are reflected and shifted halfway along the border

  • torus: Like the classic arcade games Asteroids and Pacman, agents will be wrapped continuously on both borders. This only applies to the X and Y axis

These parameters are set in the globals.json:

"topology": {
"x_bounds":[-30, 30],
"y_bounds":[-30, 30],
"z_bounds":[-15, 15],
"wrap_x_mode": "continuous",
"wrap_y_mode": "continuous",
"wrap_x_mode": "reflection",

Note that offset_reflection is a special case and is not supported for the Z axis - it will only infer shifts along either the X or Y axes.