Libraries


HASH Standard Library

HASH provides a set of useful functions to help simplify simulation construction through a standard library, hstd.

You can contribute to the HASH standard library by submitting pull requests to our open source repo.

Using HASH Standard Library Functions

Types of functions in the HASH Standard Library

The HASH Standard Library contains the following types of functions:

CategoryDescription
SpatialFunctions describing and modifying the location of agents in x,y,z space.
InitFunctions for initializing a simulation with new agents.
NeighborsFunctions related to neighbors and neighbor calculations.
StatisticalFunctions for performing complex statistical modeling or analysis.
RandomFunctions related to random number generation
AgentFunctions for helping build and use agents.

Using the HASH Standard Library

To call a standard library function, use the hash_stblib object followed by the function name, for example:

function behavior(state, context) {
  let distance = hstd.distanceBetween(agentA, agentB);
}

Scientific Python

hCore also provides access to a number of scientific Python packages which can be utilized in simulations. Read more >

hEngine can be used in conjunction with arbitrary third-party code, but determinism/reproducibility guarantees may be impacted.