Libraries

HASH Standard Library

HASH provides a set of useful functions to help simplify simulation construction. These are provided through a standard library, hash_stdlib

Currently the Stadard Library is only accessible in JavaScript; however, we're expanding this to include equivalent functions for Python and Rust. The Python language environment also provides access to a wide array of scientific Python packages.

Types of functions in the HASH Standard Library

The HASH Standard Library contains the following types of functions:

Category

Description

Spatial

Functions describing and modifying the location of agents in x,y,z space.

Neighbors

Functions related to neighbors and neighbor calculations.

Statistical

Functions for performing complex statistical modeling or analysis.

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 = hash_stdlib.distanceBetween(agentA, agentB)
}

Scientific Python

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