Jīva (जीव) — the living being. In the Jain tradition, every jīva possesses consciousness and navigates the world through its own faculties. Our computational jīva is a simulated insect that senses the Earth’s magnetic field through quantum chemistry and navigates using neural circuits modelled on the insect brain.
MāyāJīva bridges three levels of description: quantum spin chemistry (the radical-pair mechanism in cryptochrome), neural computation (a ring attractor compass and path integrator), and embodied navigation (a Langevin-driven agent traversing magnetic landscapes). The question: can a bug equipped with a quantum compass find its way home?
The Three-Level Model#
| Level | What | Implementation |
|---|
| Bug Model | Braitenberg vehicle with stochastic steering | agent.py, bug.hpp |
| Ring Attractor | 8-neuron heading circuit + quantum compass | ring_attractor.py, spin_dynamics.py |
| Landscape | 2D magnetic field with geological anomalies | landscape.py, landscape.hpp |
| Path Integration | CPU4 circuit for dead reckoning | path_integration.py |
| Godot Integration | GDExtension for 3D interactive visualisation | src/gdext/ |
| Analysis | Parameter sweeps, phase diagrams, validation | analysis.py (94KB) |
Key Results#
- Contrast threshold: navigation requires singlet yield anisotropy > 0.02 — achievable by FAD-TrpH but not toy models
- Robustness: compass tolerates geological anomalies up to ~500 nT via same-frame bias cancellation
- Path integration: CPU4 memory leak creates an optimal exploration-vs-homing trade-off
- Model discrimination: different radical-pair models produce distinguishable navigation signatures at low contrast
Source Material#
The full content lives in the mayajiva repository:
experiment/paper.org — peer-review-ready research paper (976 lines)experiment/magnetic-navigation.org — physics-first tutorial (1,399 lines)experiment/collab/sessions/introduction/develop.org — session log documenting the research process- Python implementation: 8 files covering the full model
- C++20 headers: core computational engine + Godot GDExtension
The analysis framework provides the tools for systematic exploration of the model’s parameter space. It uses a fast vectorised simulation (bypassing per-step ring attractor dynamics) to enable large-scale sweeps: 200 bugs × 100+ parameter points per sweep.
Key Analysis Products Navigation Phase Diagram Contrast (singlet yield anisotropy) vs. compass noise → phase boundary separating navigating from lost regimes. The critical contrast threshold (~0.02) determines which radical-pair models support navigation.
Robustness Budget Suppression mechanisms that reduce compass contrast:
...
The computational core of MāyāJīva is written in C++20 header-only templates. The Godot GDExtension wraps these templates as engine-native nodes, making the simulation inspectable and controllable inside a 3D scene.
GDExtension Nodes Node Wraps Purpose BugNode Bug<8> Navigating agent in 3D space LandscapeResource Landscape Magnetic field environment The BugNode exposes all parameters (compass noise, steering gain, memory leak) as Godot properties, editable in the inspector. The LandscapeResource allows declarative anomaly setup through the Godot editor.
...
The landscape is the world the bug navigates — a 2D magnetic field environment that models the Earth’s geomagnetic field plus geological anomalies. The uniform geomagnetic field provides the compass signal; the anomalies test the compass’s robustness.
Geomagnetic Background The background field is characterised by:
Declination — the angle between geographic and magnetic north Inclination — the dip angle (how steeply field lines plunge into the Earth) Total intensity — ~50 μT at mid-latitudes An inclination compass (like the radical-pair mechanism) measures the angle between the field and the local vertical, not the field direction. This means it cannot distinguish north from south — it detects the axis, not the polarity.
...
Path integration is the ability to maintain an estimate of displacement from a starting point by accumulating self-motion cues. In desert ants and bees, this is the primary homing mechanism. In Drosophila, the CPU4 neurons in the central complex are believed to perform this computation.
The CPU4 Model Eight neurons with preferred directions spaced evenly around the circle. Each neuron integrates the component of velocity along its preferred direction:
Input: heading (from ring attractor) and speed (constant in our model) Accumulation: half-wave rectified projection of velocity onto preferred direction Memory leak: optional exponential decay parameter λ that causes old displacements to fade Decoding: population vector gives the home direction; its magnitude gives the distance The Memory Leak Trade-Off A perfect integrator (λ = 0) remembers everything but accumulates drift errors on long journeys. A leaky integrator (λ > 0) forgets old displacements, creating a “horizon” beyond which the bug cannot navigate home. This trade-off generates a phase diagram: for each noise level, there is an optimal exploration duration beyond which homing fails.
...
The bug is a Braitenberg-inspired vehicle that navigates using stochastic Langevin dynamics. It has a position, a heading, and a single steering input derived from its compass circuit. The locomotion model is intentionally minimal: an Euler–Maruyama integrator of heading and position, with rotational diffusion providing the “random walk” that makes exploration possible.
The Locomotion Law The bug moves at constant speed along its heading direction. Steering is governed by:
Goal-directed torque — derived from the difference between current heading and home direction (from path integrator) Rotational noise — Gaussian white noise scaled by a diffusion coefficient Compass input — the ring attractor’s decoded heading, which itself depends on the quantum compass The balance between deterministic steering and stochastic exploration determines whether the bug can navigate home. This is quantified by the Péclet number — the ratio of directed transport to diffusion.
...
How does an insect brain represent a compass heading? The ring attractor is a neural circuit where activity forms a bump that rotates around a ring of neurons, tracking the animal’s heading. In Drosophila, this circuit lives in the ellipsoid body (E-PG neurons). In our model, it serves as the bridge between quantum chemistry and behaviour.
The Radical-Pair Compass The compass sensor models cryptochrome — a flavoprotein in the insect eye that forms radical pairs under blue light. The singlet yield of the radical pair depends on the orientation of the Earth’s magnetic field relative to the molecule’s hyperfine axis. This anisotropy is tiny (a few percent) but sufficient for navigation.
...