What's new at HASH?
What's new at HASH?
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:
When added to a pool of agents the behaviors will converge to the optimal solution.
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.
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.
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.
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.
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:
HASH has a new physics library, which introduces four behaviors that you can use to create simulated physics environments.
forces.rsgives your agents realistic movement through space.
gravity.rswill pull agents to the ground.
collision.rscauses agents to bounce off one another, conserving momentum and energy.
spring.rsmimics springs with various strengths.
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.
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.
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 >
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.py) you can now easily and straightforwardly create complex simulations from a single file.
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.