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:

  1. Evaluate dynamic transition rules against recent interaction history.
  2. Sample the next state s_t based on transition probabilities.
  3. For the active state, sample configured feature distributions.
  4. Evaluate outcome labels or anomaly flags.
  5. 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")