An example of setting deterministic runs in HASH

Using the HASH standard library you can set the seed for the random number generator and distributions.

In this example simulation, an initial agent calls initialize.js to set the seed of the hash_stdlib random number generator, and creates an agent that calls random_draw.js every timestep. It draws from a uniform distribution an number between 0 and 2 - if it's greater than 1 the agent sets its height as 2 and its color as blue and if it's less than 1 it sets its height as 0 and its color as red.

From the analysis view you can see that every run has an identical outcome; if you change the seed string in initialize.js, the runs will change.