Skip to content
catachresis-colloquiumPublic

About

Playable Rust experiment in reversible 3D Pong: paddle contact reverses execution while an invertible momentum update changes the trajectory without storing prior-state snapshots.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Pong-Ping

Code licence: MPL-2.0 Docs licence: CC-BY-SA-4.0 RSR repository

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.

Does the idea work?

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.

Three-dimensional tensor play

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.

Run it

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 suite

In playable mode:

  • Enter or . advances without moving a paddle.

  • w/s and a/d move the left paddle through Y and Z.

  • i/k and j/l move the right paddle through Y and Z.

  • u exactly undoes the last accepted tick.

  • q quits.

AI-Assisted Installation

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.

Reversibility claim

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.

Scope

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.

Repository shape

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/.

Licence

Code is MPL-2.0. Documentation is CC-BY-SA-4.0. Per-file SPDX identifiers are authoritative; complete licence texts are in LICENSES/.

About

Playable Rust experiment in reversible 3D Pong: paddle contact reverses execution while an invertible momentum update changes the trajectory without storing prior-state snapshots.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages