25 lines
797 B
Markdown
25 lines
797 B
Markdown
# Determinism Policy
|
|
|
|
MabeLabRS emphasizes reproducibility of artificial life experiments.
|
|
|
|
## Randomness
|
|
- Use `rand_chacha::ChaCha8Rng` (fast, reproducible).
|
|
- Seeds must be explicit and logged in experiment manifests.
|
|
|
|
## Floating-point
|
|
- Default: `f64`.
|
|
- Avoid nondeterministic parallel reductions; when needed, gate behind
|
|
the `fast-math` feature.
|
|
- Golden tests should tolerate ≤ 1e-12 relative error in float comparisons.
|
|
|
|
## Collections
|
|
- Use `BTreeMap`/`BTreeSet` when deterministic ordering is required.
|
|
- Use `indexmap::IndexMap`/`IndexSet` for hash-backed structures
|
|
that preserve insertion order.
|
|
|
|
## Parallelism
|
|
- Sequential by default.
|
|
- `rayon` parallelism only behind `parallel` feature flag.
|
|
- Golden tests must run with `--no-default-features` to guarantee determinism.
|
|
|