Skip to content

Henad

Henad is a very fast agent-based modelling engine for very large populations, written in Rust. Some major highlights are:

  • It is easy to use, and easy to write models that run fast.
  • It can run models on the CPU or on the GPU.
  • It can run the same model both natively and in a web browser without changing any code.
  • It is very fast, and parallelized by default (see Benchmarks for details).
  • It allows (many) models that previously require expensive compute to run on a laptop, and models that previously require a laptop to run on a phone.

Game of Life on a 1024² grid Game of Life on a 1024² grid

Time taken to run 100 steps of Game of Life on a 1024² grid. Multiples are speedups over the slowest engine (*). See Benchmarks for details.

Try Henad in your browser Get started

Early development

Henad is still in early development. Expect bugs, missing features, and breaking changes.

Model at a glance

The core of the Game of Life model looks like this:

fn step_cell(cell: u8, neighbors: &[u8], _params: &(), _rng: &mut u64) -> u8 {
    let alive_count: u8 = neighbors.iter().sum();
    match (cell, alive_count) {
        (ALIVE, 2..=3) | (DEAD, 3) => ALIVE,
        _ => DEAD,
    }
}
  • Installation

    Installing the app and the command line, or building them from a clone, natively and for the web.

  • Running Henad

    The desktop app, the browser build, and the headless benchmark runner.

  • Your own project

    Your own project, made from the template, with its own models, app, command line and web build.

  • Example models

    Ten example models, six on the CPU and four on the GPU.

  • Authoring

    The five traits a model implements, and how to pick between them.

  • Benchmarks

    What the shipped models reach, on what hardware, measured how.

  • Architecture

    How the eight crates fit together and where a tick actually runs.

Roadmap

Our roadmap is hosted on GitHub as a project. You can see what is being worked on, what is planned, and what is done. You can also submit bug reports or feature requests via issues.

Licence

Henad is licensed under MIT or Apache-2.0, at your option.

Compiled distributions additionally carry third-party dependencies under their own terms. See the third-party licences page for more information.