Generalised simulations with the stochadex

These system diagrams track progress on the stochadex project.

The stochadex is 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.

The fundamental data types in the stochadex simulation engine are Go types which can be configured as Settings (pure data) or Implementations (code which implements the provided interfaces).

For example, the Iteration interface can be implemented.

The Iteration interface is very general. For example, it can support the Wiener process.

Or Itô’s lemma, which has more function calls inside to, e.g., calculate the derivatives.

Or the time-inhomogeneous Poisson process, as an example of a event-based process with discrete sample paths, which varies its event rate in time.

Or the Hawkes process, which couples the history of events to the current event rate (making it non-Markovian).

Multiple Iterations can run within the stochadex for each step in time. In order to construct serial dependency graphs between them, we can utilise upstream-downstream Iteration relationships.

Structuring groups of Iterations in this way can increase modularity. For example, the time-inhomogeneous Poisson process can be implemented serially.

The full simulation loop coordinates these serial relationships between Iterations while maximising concurrency in execution of each Iteration per step in time.

Given that this loop always runs for any stochadex simulation, it is sufficient to describe any simulation uniquely through the dependency diagram between its Iterations.

For example, we can define a probabilistic reweighting algorithm through just its dependency diagram.

Embedded simulation runs are Iterations which perform entire simulations from start to end for every step in time. Their presence can make dependency diagrams a little more complex, but much more flexible.

For example, we can define an algorithm for simulation inference which uses embedded simulation runs as part of its structure.