---
library: "bootstrap"
slug: "Simulation"
name: "Simulation"
ref: "Simulation#1058"
hash: "sema:Simulation#mh:SHA-256:1058e7090079e846251ed480d7afec0328809d22bebb6b205425b2de614787c3"
type: "Strategy"
layer: "Mind"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/Simulation"
---

# Simulation

A virtualized execution

Mind · Strategy

## Mechanism

Forks the current World [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) (W) into W', executes an action in W', discards W' and returns the [Outcome](https://semahash.org/vocabularies/bootstrap/patterns/Outcome.md). W remains immutable. The fork is what provides isolation, which is also its limit: only effects that flow through W are contained, so a [Sandbox](https://semahash.org/vocabularies/bootstrap/patterns/Sandbox.md) is required wherever simulated code can reach resources the fork did not copy.

## Invariants

- Isolation within the fork: side effects on W' do not propagate to W.
- Isolation extends only to state captured by the fork. Effects reaching resources outside W require a [Sandbox](https://semahash.org/vocabularies/bootstrap/patterns/Sandbox.md) boundary.

## Preconditions

- W is forkable — the world state can be snapshotted at the fidelity the simulation requires

## Where this came from

—

## Builds on

- [Sandbox](https://semahash.org/vocabularies/bootstrap/patterns/Sandbox.md) (references)
- [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) (references)
- [Outcome](https://semahash.org/vocabularies/bootstrap/patterns/Outcome.md) (references)

## Used by

- [CognitiveEcho](https://semahash.org/vocabularies/bootstrap/patterns/CognitiveEcho.md) (references)
- [EmpathySim](https://semahash.org/vocabularies/bootstrap/patterns/EmpathySim.md) (references)
- [Estimate](https://semahash.org/vocabularies/bootstrap/patterns/Estimate.md) (references)
- [HypothesisEngine](https://semahash.org/vocabularies/bootstrap/patterns/HypothesisEngine.md) (references)
- [MentalSim](https://semahash.org/vocabularies/bootstrap/patterns/MentalSim.md) (references)
- [PropheticQuorum](https://semahash.org/vocabularies/bootstrap/patterns/PropheticQuorum.md) (references)
- [SimulationTrace](https://semahash.org/vocabularies/bootstrap/patterns/SimulationTrace.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: Simulation#1058
- Hash: sema:Simulation#mh:SHA-256:1058e7090079e846251ed480d7afec0328809d22bebb6b205425b2de614787c3

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/Simulation
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/Simulation.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
