Real-Time Self-Explanatory Simulation

Franz G. Amador, Adam Finkelstein, Daniel S. WeldAAAI 1993

Introduction

In the early 1990s, "self-explanatory simulators" represented a significant goal for computer-aided education and engineering. Unlike traditional numerical simulators, these systems aimed to understand underlying physics to explain the "why" and "how" of system behaviors. However, the state-of-the-art system at the time, SimGen, faced a "compilation wall." It attempted to analyze every possible qualitative state before execution, leading to prohibitive wait times—such as four hours for a simple model of nine containers.

Pika addresses these limitations by shifting from exhaustive pre-compilation to a just-in-time (JIT) approach. By utilizing non-directional equations and symbolic manipulation, Pika achieves a 5000x speedup, enabling interactive modeling where users can modify devices on the fly and receive natural language explanations.

Methodology: The Pika Approach

Pika utilizes the Quantified Modeling Language (QML) and introduces several key innovations:

  • Non-Directional Equations: Users write equations as pure constraints (e.g., $PV=nRT$). Pika automatically infers causality at runtime based on the context.
  • Just-In-Time Model Activation: Instead of pre-calculating all states, Pika queries its knowledge base at each time step to activate relevant "Model Fragments."
  • Symbolic-Numeric Hybrid: The system uses Mathematica to symbolically solve and "directionalize" equations, which are then processed by a fourth-order Runge-Kutta integrator.
  • Integration Bounds: Pika generates bounds from model preconditions to detect state changes, pausing to update active models when a bound is hit.

Evaluation and Results

The performance of Pika was evaluated using several benchmarks, including scaled container grids and electrical RC ladders. The results demonstrate significant improvements in preparation time and scalability.

Performance benchmarks for Pika across various test scenarios, highlighting preparation time and computational overhead.

As shown in the table above, Pika's preparation time for the standard 9-container benchmark was only 2.7 seconds, a massive improvement over SimGen Mk2's 4-hour requirement. Even as the model size quadrupled to 36 containers, preparation time remained manageable at 34 seconds.

However, the data also reveals a trade-off: symbolic solving via Mathematica becomes a bottleneck for complex simultaneous equations. In the 5-rung RC ladder test, Mathematica (Mma %) accounted for 87% of the total computation time, while numerical integration (RK %) was negligible.

Discussion and Future Work

While Pika achieves a 5000x speedup, the authors note that another 10x improvement is needed for "true interactivity" in large-scale educational environments. Future work focuses on replacing general-purpose symbolic engines with dedicated linear-equation solvers and streamlining the knowledge representation system to reduce latency. A second prototype, Pika2, is already exploring incremental updates to the causal graph to further enhance performance.

Summary updated

BibTeX
@inproceedings{amador1993real,
  author = {Franz G. Amador and Adam Finkelstein and Daniel S. Weld},
  title = {{Real-Time Self-Explanatory Simulation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {1993},
}

Loading related content...

Figure