v1.0.1
Generation Enginev1.0.1
Generation Engine Overview
How Simulator executes the simulation loop and generates sequence traces.
The Simulator class orchestrates state progression, feature sampling, and trace aggregation.
Execution Loop Mechanics
At each interaction step t in a sequence:
- Evaluate dynamic transition rules against recent interaction history.
- Sample the next state
s_tbased on transition probabilities. - For the active state, sample configured feature distributions.
- Evaluate outcome labels or anomaly flags.
- Record the interaction record with sequence and step identifiers.
Multi-Sequence Generation
Pass num_sequences to generate multiple independent agent cohorts:
multi_seq.py
# Generates 100 sequences of 50 interactions each (total 5,000 interaction rows)
df = sim.generate(num_interactions=50, num_sequences=100, seed=123)Export Options
Since generate() returns a pandas DataFrame, you can immediately export traces using standard pandas methods:
export.py
df.to_csv("traces.csv", index=False)
df.to_parquet("traces.parquet", index=False)
df.to_json("traces.json", orient="records")