Discord

Product Updates

What's new at HASH?

Latest changes

We’ve released a genetic programming simulation that showcases using a genetic algorithm to evolve solutions to an optimization problem.

The simulation is made up of four key behaviors:

  • fitness.py: Calculates a fitness score for a potential solution.
  • evaluate.py: Compares and determines the best fitness score among the solutions.
  • crossover.py: Create new solution options from the existing solutions.
  • mutate.py: Randomly introduce changes in the agents.

When added to a pool of agents the behaviors will converge to the optimal solution.

Older changes

Reinforcement Learning Behaviors

We’ve published a library of behaviors and example simulations demonstrating how to implement the popular Q-learning reinforcement algorithm in a HASH simulation. The library contains a generic set of Q-learning behaviors that can be added to an agent to train it to take an optimal action in its environment. The simulations are:

In both simulations you can see how the agent’s rewards converge to a steady state where it has, over many iterations, learned a policy to execute.

Older changes

Travel back in time

You can now travel back in time to any point in your simulation’s history, by clicking on an edit in the activity sidebar to reload the simulation source code at that exact moment – hovering over edits will also now show a message explaining which files were affected by each edit. When visiting any historical version, you can click ‘Fork’ in the file menu to create a copy of that source code and see where a different path for your digital world leads.

Analysis output improvements

To help inspect the outputs of your simulation, you can now export your analysis metrics along with raw simulation state by right-clicking on any run in the history and clicking ‘Export as JSON’.

We’ve also introduced options to hide plot labels to the plots wizard (click edit when viewing any plot), and fixed a bug with setting custom labels for multi-line plots.

Older changes

Custom viewer colors

You can now set custom colors for the stage and grid in the viewer, allowing you to give your simulations extra visual flair. Any combination you choose for each simulation will be saved to your browser.

We’ve also given the viewer settings menu a makeover. If you haven’t explored it before, it offers a range of customisation options, including switching between 3D and 2D view, toggling elements on and off, and more.

Python upgrades

We’ve significantly improved Python support to offer new and upgraded libraries available for use locally in-browser, as well as support for running Python simulations client-side in Safari:

  • New libraries: future, autograd, freesasa, lxml, python-sat, traits, astropy, pillow, scikit-image, imageio, numcodecs, msgpack, asciitree, zarr.
  • Upgraded libraries: numpy 1.15.4, pandas 1.0.5, matplotlib 3.3.3.
  • Safari support: Python behaviors can now be run locally when using Safari (version 14+), building on existing support for experiments run in hCloud, and bringing the browser to parity with Chrome, Firefox and Edge.
Older changes

Basic Physics Library

HASH has a new physics library, which introduces four behaviors that you can use to create simulated physics environments.

  • forces.rs gives your agents realistic movement through space.
  • gravity.rs will pull agents to the ground.
  • collision.rs causes agents to bounce off one another, conserving momentum and energy.
  • spring.rs mimics springs with various strengths.

Explore a pendulum built with the physics library library behaviors >

Older changes

Discrete Event Library

We’re releasing a behavior library to add discrete event timing features to your simulations. The library provides behaviors to trigger specific agents to take actions when events are generated within the simulation. The events can be created based on attached datasets, or from other agents. Read about discrete event simulations in the HASH wiki or see our accompanying blog post on the new library to learn more.

Older changes

hCore Messaging API

HASH simulations can communicate with external web applications through the recently released web messaging API for HASH. You can read the state, change the files, and create new runs of an embedded HASH model by sending and receiving messages. Read the HASH docs here.

Older changes

System Dynamics Library

Following the introduction of HASH’s process modeling library and visual interface, we’re now releasing a library that will easily enable the creation of system dynamics models in HASH. System dynamics models allow users to understand non-linear complex systems based on rates of change. Also known as stock-and-flow models, they consist of a set of “stocks” and the “flows” between them. These models allow you to understand the feedback loops inherent in a system. Read more on the blog >

Python Standard Library Updates

The Python HASH standard library has been brought up to parity with its JavaScript counterpart. This means that you can now use hstd from any behavior in your simulation whether it’s written in Python or Javascript. The HASH standard library contains a number of helpful functions for generating your initial state, filtering neighbors, and more. You can read more in the HASH docs.

Older changes

Creator Agents

While our product team work on some larger features and performance improvements, simulation engineering has been busy improving and simplifying the initialization process for simulations by adding initialization functions to the standard library. You can call one of the associated create functions (scatter, stack, grid, or layout) from hstd.init and easily generate agents following a predefined pattern. When used with programmatic initial state files (init.js/init.py) you can now easily and straightforwardly create complex simulations from a single file.

Older changes

Behavior Key Autocompletion

Behavior keys define the expected data type of the fields that a behavior accesses on an agent’s state. Defining them unlocks a number of runtime optimizations that HASH can apply to run simulations much faster, and is required to run experiments in hCloud. A few months back we introduced the ability in JavaScript and Python to autosuggest behavior key typings for behaviors. This process dramatically reduced the amount of time it took to create highly-performant behaviors that leveraged the full power of Apache Arrow in HASH, but still required file-by-file autosuggestion and acceptance.

This week we introduced autocomplete for behavior keys. Where multiple behaviors use the same field, it now only has to be defined in one, and will be auto-filled across other behaviors in a project. Subsequent changes to the behavior key definition will be automatically reflected in all other behaviors utilizing it. Because behavior keys now only need defining once, the burden of maintaining complex simulations with large numbers of behaviors has been vastly reduced, allowing users to more easily benefit from hCloud’s high-performance runtime optimizations.

Pageof