Curated entry point for the digital-twin use case. DigitalTwin is
an alias for the same WorldModel class exported from
paracosm; the alias names the use case the user is
modeling rather than the underlying mechanism.
Use this subpath when:
You have a specific subject (person, organism, organization, or
system) you want to simulate under counterfactual interventions.
You want the most ergonomic surface for intervene().
You want type-only access to SubjectConfig and InterventionConfig
without importing the root API.
Use the root paracosm export instead when:
You are running civilization simulations or policy comparisons
across scenarios.
You need access to the full WorldModel.batch, WorldModel.fork,
or WorldModel.replay surface (those methods are also available
here, since DigitalTwin === WorldModel, but the subpath
docstrings focus on the digital-twin case).
Both entry points back-end to the same class. Choosing one is a
positioning decision, not a functional one.
consttwin = awaitDigitalTwin.fromJson(scenarioJson); constsubject: SubjectConfig = { id:'northwind', name:'Northwind', profile: { headcount:100, runwayMonths:18 }, }; constintervention: InterventionConfig = { id:'rif', name:'Reduction in force', description:'A 25% reduction in force across all departments.', category:'policy', targetBehaviors: ['runway', 'retention'], }; // The run's departments, its actor and its Event Director read both; // the artifact records them. constartifact = awaittwin.intervene({ subject, intervention, actor:leader, maxTurns:4 });
Subpath export: paracosm/digital-twin
Curated entry point for the digital-twin use case.
DigitalTwinis an alias for the sameWorldModelclass exported fromparacosm; the alias names the use case the user is modeling rather than the underlying mechanism.Use this subpath when:
intervene().SubjectConfigandInterventionConfigwithout importing the root API.Use the root
paracosmexport instead when:WorldModel.batch,WorldModel.fork, orWorldModel.replaysurface (those methods are also available here, sinceDigitalTwin === WorldModel, but the subpath docstrings focus on the digital-twin case).Both entry points back-end to the same class. Choosing one is a positioning decision, not a functional one.
Example: Quickstart with subject + intervention