So what is the ‘stochadex’ project?
It’s a simulation engine written in Go which can be used to sample from, and learn computational models for, a whole ‘Pokédex’ of possible real-world systems.
For software engineers, the stochadex simulation framework abstracts away many of the common features that sampling algorithms have for performing these computations behind a highly-configurable interface.
This simulation engine is designed based on the simulation software fundamentals described in this collection of blog posts.
When to use it
The stochadex fits best when you’re in Go and want stochastic simulation and online inference or simulation-based decision-making (like MCTS) together over one composable primitive and a single deployable binary. This is a combination no other Go library offers (to our knowledge).
It’s a powerful framework with tons of features, really generalisable abstractions and principled design. However, you should probably reach for something else when:
- Large fixed-shape, GPU, or autodiff-heavy Bayesian modelling → Stan, PyMC, or Julia’s SciML.
- Pure discrete-event simulation (entities through queues and servers) → godes.
- Plain numerics or classical ML in Go → gonum, which the stochadex is built on.
- Training neural networks or deep RL → train in Python, then import a frozen ONNX/TorchScript model to run inference behind an
Iteration.
Integrations
| Integration | What it does | Where |
|---|---|---|
Load state history into a simulation and write output back over database/sql. Point it at any Postgres-wire database. |
read · write | |
| Build simulation output directly as Apache Arrow for columnar interchange (Polars / pandas / Parquet). Opt-in module. | read · write | |
| Land the Arrow output in DuckDB for SQL analytics, zero-copy. Opt-in module. | write |
Projects using it
- Event-based rugby match simulations to evaluate manager decision-making
- Fish ecosystem simulations using environment data to evaluate sustanability policies
- Antimicrobial resistance (AMR) stewardship simulations to evaluate hospital guidelines
- Stochastic simulations of catchment-scale flood dynamics under climate change
- Energy storage dispatch simulation with demand response optimisation
- Planning approval policies for affordability with housing market simulations
- Small business survival and support policy simulation
- 18xx gameplay design tool and Monte Carlo Tree Search (MCTS) agents
- Turning simulations into in-browser interactive dashboards
- Inferring structural causal models from open source datasets
- Seasonal bathing water pollution exceedance forecasts