P250 — AIEP — Deterministic Branch Checkpointing Engine
Applicant: Neil Grassby Classification: Patent Application — Confidential Priority: Claims priority from GB2519711.2 filed 20 November 2025 Architecture Layer: AIEP Phase 2 Hardware Execution Layer
Framework Context
[0001] This specification operates within an AIEP environment as defined in GB2519711.2 and GB2519798.9. The present specification defines a hardware-assisted mechanism for capturing and restoring deterministic simulation branch states at high frequency, enabling efficient exploration and rollback of large counterfactual branch trees.
Field of the Invention
[0002] The present invention relates to hardware-assisted branch checkpointing and rollback for deterministic counterfactual simulation in AI systems.
Background
[0003] Counterfactual simulation explores multiple branches of possible world evolution. Efficient exploration requires the ability to checkpoint branch states and roll back to prior states for comparison or re-exploration without re-simulating from the root. Hardware-assisted checkpoint capture and rollback provides this capability at significantly lower latency than software-only state serialisation.
Summary of the Invention
[0004] The invention provides a Deterministic Branch Checkpointing Engine (DBCE) that: manages a hardware checkpoint register file holding up to C simultaneous branch state snapshots; supports instantaneous branch state capture via copy-on-write page management; enables sub-millisecond rollback to any captured checkpoint; maintains a checkpoint tree structure representing the branch exploration graph; and integrates with the Deterministic Simulation Coprocessor (P241) for parallel branch dispatch.
ASCII Architecture
Simulation Branch Tree (P241)
|
v
+------------------------------------------+
| Deterministic Branch Checkpointing Engine|
| (DBCE) |
| |
| Checkpoint Register File (C slots) |
| Copy-on-write page manager |
| Checkpoint tree (branch graph) |
| Rollback controller |
+-------------------+----------------------+
|
Branch state restore
→ Sub-millisecond rollback
→ Re-simulation from any branch point
Detailed Description
[0005] Checkpoint Register File. The DBCE maintains a hardware register file with C checkpoint slots. Each slot holds a pointer to a copy-on-write snapshot of the simulation memory region. Occupancy is managed by a least-recently-used eviction policy when all slots are full.
[0006] Copy-on-Write Capture. When a checkpoint is taken, the DBCE creates a copy-on-write mapping of the simulation memory region, deferring actual page copying until writes occur. This makes checkpoint capture nearly instantaneous.
[0007] Checkpoint Tree. The DBCE maintains the branch exploration graph as a tree of checkpoint records. Each node records: its checkpoint slot identifier; its parent checkpoint identifier; the intervention applied at the branch point; and the simulation results recorded at this branch.
[0008] Rollback. Rollback to a checkpoint restores the simulation memory to the copy-on-write snapshot in the target checkpoint slot. This discards all write-modified pages since the checkpoint and restores the original page mappings.
Technical Effect
[0009] The invention provides hardware-accelerated branch state persistence and deterministic rollback for counterfactual simulation, enabling deep multi-branch exploration at low overhead. Copy-on-write checkpoint capture defers actual page copying until a branch diverges, making checkpoint creation nearly instantaneous and proportional to actual branch divergence rather than total simulation state size. The checkpoint tree structure preserves the full causal graph of branch exploration, enabling systematic review of all explored counterfactuals. Sub-millisecond rollback enables efficient pruning and revisiting of branches without restarting from session start.
Claims
-
A method of deterministic branch checkpointing for counterfactual simulation in an evidence-bound artificial intelligence system, comprising the steps of: (a) maintaining a hardware register file with C checkpoint slots, each slot holding a pointer to a copy-on-write snapshot of the simulation memory region, with LRU eviction when all slots are occupied; (b) capturing a checkpoint by creating a copy-on-write memory mapping of the current simulation memory region, deferring physical page copy until writes occur, making capture time proportional to pages actually modified after branching; (c) recording each checkpoint as a node in the checkpoint tree, noting: checkpoint slot identifier, parent checkpoint identifier, the intervention applied at this branch point, and simulation results recorded at this node; (d) performing rollback to a target checkpoint by restoring the copy-on-write snapshot in the target slot, discarding all write-modified pages and restoring original page mappings; (e) dispatching multiple branch snapshots from the same parent checkpoint to the deterministic simulation coprocessor for parallel branch execution.
-
The method of claim 1, wherein LRU eviction at step (a) retains checkpoint slots that are direct ancestors of active branches, evicting only leaf nodes of closed branches.
-
The method of claim 1, wherein the checkpoint tree is persisted to the evidence ledger, providing an immutable record of the full branch exploration graph for a reasoning session.
-
The method of claim 1, wherein rollback is performed to an arbitrary depth in the tree, not only to the most recently captured checkpoint.
-
The method of claim 1, wherein checkpoint capture latency is bounded such that the branch checkpointing operation does not exceed a configured maximum overhead percentage of simulation step time.
-
A deterministic branch checkpointing engine for an evidence-bound artificial intelligence simulation system, comprising: a hardware checkpoint register file storing copy-on-write snapshot pointers; a copy-on-write mapping controller; a checkpoint tree manager recording branch exploration graph nodes; and a rollback engine restoring snapshot state on demand.
-
A computer-readable medium carrying instructions for implementing the method of any preceding method claim.
Abstract
A deterministic branch checkpointing engine for evidence-bound artificial intelligence maintains a hardware register file of copy-on-write snapshot slots for simulation memory regions, capturing branch checkpoints nearly instantaneously via deferred physical page copying. A checkpoint tree records the full branch exploration graph with parent-child relationships and applied interventions. Rollback to any checkpoint is performed by restoring the copy-on-write snapshot, enabling sub-millisecond branch revisitation. Checkpoint tree nodes are persisted to the evidence ledger. The engine integrates with the deterministic simulation coprocessor for parallel branch dispatch from checkpointed states.