A Python implementation of David Deutsch’s Constructor Theory framework, exposing key concepts—from simple Tasks and branching substrates to quantum-gravity and electromagnetism—entirely in code. Includes a “universal constructor” that can bootstrap itself from a list of Tasks, demonstrating self-replication and the power of Constructor Theory.
“A demonstration of how constructor theory could be explored in code, not a high-precision physics engine. For the formal definitions, see David Deutsch and Chiara Marletto’s recent paper “Constructor Theory of Time” (May 13, 2025).
-
Core framework: Attributes, Substrates, Tasks, Constructors
-
Irreversible & quantum tasks: Many-worlds branching, decoherence guards
-
Timers & Clocks: Simulate proper-time, special/general relativity corrections
-
Fungibility & SwapConstructor: Free exchange of identical substrates
-
ASCII visualizer: ascii_branch() for quick text-based branch inspection
-
Continuous dynamics: 1D & 2D substrates, DynamicsTask, RK4 & symplectic integrators
-
Coupling tasks:
- Gravitational two-body (1D)
- Coulomb coupling (1D)
- Lorentz-force (2D) for charged particles in a magnetic field
-
Quantum-Gravity & Electromagnetism: Graviton & Photon emission/absorption Tasks
-
UniversalConstructor: Bootstraps any list of Tasks into a working Constructor
-
Demo scripts:
- demo.py – shows every constructor in action
- bootstrap_demo.py – elegant self-replication via the UniversalConstructor
- Python 3.8+
- (Optional) matplotlib for phase-space plots
Note: If you don’t have matplotlib, the demos will still run; plots will simply be skipped with a warning.
This is intended as an educational resource and proof-of-concept. Contributions are very welcome! Please:
- File issues for missing tasks or physics modules
- Submit pull requests for new constructors (e.g. chemical reactions, friction)
- Improve documentation or add more demos
Released under the MIT License.
- Inspired by David Deutsch and Chiara Marletto’s work in Constructor Theory and their May 13, 2025 paper “Constructor Theory of Time.”
- Thanks to the quantum-foundations community for feedback and discussion.