The ALGA Engine in Eight Sketches: Algorithmic art prototypes for ENAKD/Tx
★ Giulio Ruffini,
★ guarantor: Giulio Ruffini · vouches for the paper per WP0084 §6
ENAKD/Tx is a closed-loop digital therapeutic that combines EEG biometrics with immersive algorithmic art to drive neuroplasticity in adolescent depression, conceived as a non-pharmacological analogue of psychedelic plasticity. This working paper documents a series of eight browser-native prototypes built as exploratory sketches of the ALGA (algorithmic art) engine that sits at the core of the system. Each prototype implements a different mathematical and aesthetic stance on the same theoretical foundation --- predictive processing, the algorithmic agent framework (KT), Bressloff--Cowan symmetry breaking on V1, and Schmidhuber's compressibility principle of beauty --- and exposes the same closed-loop interface: a triple of biosignals (valence, arousal, complexity) feeds a per-prototype translator that drives the simulation parameters. We describe the theoretical framing, the eight prototypes (entoptic shaders, music-driven harmonic walks, an immersive WebXR build, a -VAE latent walk, stochastic 3D growth, particle flows on strange attractors, a Bressloff--Cowan cortical sheet, and a slime-mold network simulation), the EEG-to-ALGA architecture, and a set of empirical predictions that the closed-loop chain will allow us to test. The prototypes are deliberately exploratory: they exist to localise which aesthetic and mathematical commitments are productive before the production Unity build commits to one.
Eight browser-native sketches that let a real-time EEG signal steer immersive algorithmic visuals, testing whether structured prediction error can prime neuroplasticity the way psychedelics do — without the drug.
The core bet is this: psychedelics work (in part) by loosening the brain's grip on its own prior beliefs, letting bottom-up sensory signals revise representations that have become pathologically rigid. The REBUS hypothesis formalizes this. ENAKD/Tx asks whether a carefully engineered visual stimulus — one that sits right at the edge of compressibility, generating just enough prediction error to keep the cortex updating without overwhelming it — can produce a similar, transient loosening. The therapeutic target is adolescent depression. The mechanism is sensorial, not pharmacological.
The problem with building that system all at once is that it requires committing to a specific aesthetic and mathematical vocabulary before you know which vocabulary actually works. So instead, this paper documents eight small, browser-native prototypes — each a different mathematical take on the same idea. They range from kaleidoscopic WebGL shaders that directly render the Klüver form constants (the tunnels, lattices, and spirals that psychedelic users report) to a Gray–Scott reaction-diffusion simulation that approximates the cortical symmetry-breaking dynamics described by Bressloff and Cowan, to a slime-mold network of 8,000 agents whose emergent trail geometry looks uncannily like dendritic arborisation. Each prototype exposes the same three-slider interface: valence, arousal, and complexity — the EEG-derived state vector that will eventually come from a real Enobio headset over a WebSocket. For now, a human moves the sliders; later, the brain does.
All eight prototypes are also wired to a Bach driver: a 16-measure harmonic skeleton from BWV 846 where each chord carries an explicit tension value. Diatonic chords sit near 0.05–0.20; the diminished vii°/V at measure 13 spikes to 0.80 before resolving. That tension value feeds directly into each prototype's chaos parameter — so you can literally watch the cadence push the visual field into disorder and then resolve it. This operationalizes Schmidhuber's compressibility-based account of beauty: the stimulus lives at the edge, where the brain can almost but not quite predict what comes next.
The paper also states four falsifiable predictions the closed-loop system will let you test once real EEG comes online: that all eight prototypes elicit similar LZ-complexity spikes at the same harmonic tension point (regardless of visual style); that closed-loop coupling keeps users in the "Goldilocks" arousal-complexity band longer than open-loop; that TMS motor-evoked potentials increase post-session (the direct plasticity readout); and that the two Bressloff-Cowan-explicit prototypes drive stronger occipital high-frequency activity than the others. These predictions are specific enough to be useful negative results if they fail. The prototypes are not the product — they are a deliberate breadth-first search over the design space before a production Unity build commits to one direction.
- Zenodo
- 10.5281/zenodo.21008727
- WP ID
- WP0108
- Lifecycle
- completed
- Visibility
- internal
- Access level
- open
- Embargo until
- —
- Priority
- —
- Collab
- closed
- Venue
- —
- DOI
- —
- Deadline
- —
- Owner
- —
- Source
- drive_legacy
- Repo path
- WP0108
- 0.1.0 (draft) · auto-run-placeholder · zenodo:21008728
