A playable, three-dimensional Ping-Pong experiment in which paddle contact really reverses the simulated program direction. A tensor-moment interceptor changes the reverse trajectory without destroying the information required to undo it.
Yes, provided the angle-changing metafunction is itself invertible. Simply assigning a new outgoing angle is not reversible: several different incoming momenta collapse to the same outgoing value. Pong-Ping instead composes the direction flip with an integer momentum shear. The direction sign makes the second application subtract exactly what the first added.
The result is not a replay system wearing a mathematical hat. The core stores
no prior-state snapshots. Given the same external control value, undo
computes the predecessor from the current state.
The ball moves through X, Y and Z. Each paddle is a rectangle in the Y-Z plane. A separate interpreted transit program holds the ball’s translation opcode; the executor applies that opcode or its inverse. At contact, the metafunction rewrites the opcode before reversing the executor. A symmetric 3x3 second-moment tensor couples contact offsets across both tangential axes; the contact lever arm and impulse then produce a 3D torque moment. All simulation arithmetic is integer arithmetic.
The terminal renderer shows synchronized X-Y and X-Z projections. It is modest looking, but both views are driven by one genuinely 3D state.
Requires a Rust toolchain. There are no third-party crate dependencies.
just run # turn-based playable mode
just run demo 120 # animated stable rally
just run trace 256 # show tensor contacts, then rewind
just run prove 4096 # exact forward/inverse round trip
just test # the complete automated test suiteIn playable mode:
-
Enter or
.advances without moving a paddle. -
w/sanda/dmove the left paddle through Y and Z. -
i/kandj/lmove the right paddle through Y and Z. -
uexactly undoes the last accepted tick. -
qquits.
An AI agent should first read 0-AI-MANIFEST.a2ml, CLAUDE.md, and
machine-readable/descriptiles/STATE.a2ml, then follow
the AI installation guide. Installation
requires no credentials, network service, telemetry, or third-party crate
download: clone the repository, run just build, and verify with just test
and just e2e.
The reversible boundary is the deterministic simulation kernel. The UI keeps the external control sequence because human input is not generated by that kernel. Rendering, terminal I/O, wall-clock scheduling, and the physical computer are not claimed to be reversible.
The equations, inverse construction, and deliberate lossy positive control are documented in Reversible dynamics.
Pong-Ping is an educational game and reversible-computation experiment. It is not flight-control, guidance, safety-critical, or weapons software. Reversible software state does not make a physical system reversible or invulnerable.
This repository was minted from hyperpolymath/rsr-template-repo. The Rust
game lives in src/lib.rs and src/main.rs; exact round-trip evidence lives in
tests/reversibility.rs; RSR contracts and state live under
machine-readable/.