oNeuro is a platform for simulating complete digital organisms — brains, bodies, and environments — at molecular resolution. Every neuron runs real Hodgkin-Huxley ion channel dynamics, communicates through 6 real neurotransmitters, learns through STDP, and responds to drugs via pharmacokinetic/pharmacodynamic models. Membrane potential emerges from physics — it is never a hand-set float.
We build digital flies that smell, navigate, learn, and respond to drugs. We build digital neural cultures that learn to play Pong using the free energy principle. We build digital worlds with real molecular diffusion physics where odorant plumes flow in wind.
This is not a toy neural network simulator. This is a molecular-resolution digital biology platform.
| Term | What It Means |
|---|---|
| ONN | Organic Neural Network — real biological neurons on hardware. Cortical Labs' DishBrain (800K neurons playing Pong), FinalSpark's bioprocessors, and future living-tissue compute platforms. |
| dONN | digital Organic Neural Network — oNeuro's biophysically faithful simulation of an ONN, running on GPU/CPU. Same molecular physics, same emergent behaviors, without the biology lab. |
| oNeuro | The software platform for building, running, and experimenting with dONNs — from single neurons to 139K-neuron insect brains. |
A dONN differs from a standard artificial neural network (ANN) in the same way a wind tunnel differs from a paper airplane. In a dONN, action potentials emerge from ion channel kinetics, learning emerges from receptor trafficking and STDP, and drug effects emerge from real pharmacology acting on molecular targets. Nothing is hand-tuned.
oNeuro/
├── src/oneuro/
│ ├── molecular/ # 25-file molecular simulation engine
│ │ ├── cuda_backend.py # GPU-accelerated HH brain (CUDAMolecularBrain)
│ │ ├── retina.py # 3-layer biophysical retina (rods/cones → bipolar → RGC)
│ │ ├── network.py # MolecularNeuralNetwork (pure Python)
│ │ ├── neuron.py # HH neuron with all 25 subsystems
│ │ ├── membrane.py # Hodgkin-Huxley membrane dynamics
│ │ ├── ion_channels.py # 8 channel types (Na_v, K_v, Ca_v, NMDA, ...)
│ │ ├── neurotransmitters.py # 6 NTs with real molecular identities
│ │ ├── pharmacology.py # 8 drugs with PK/PD models
│ │ ├── consciousness.py # IIT Phi, PCI, criticality, GW, Orch-OR
│ │ ├── brain_regions.py # Cortex, thalamus, hippocampus, BG
│ │ └── ... # (gene_expression, calcium, glia, axon, etc.)
│ ├── organisms/ # Complete digital organisms
│ │ └── drosophila.py # Drosophila brain (15 regions) + body (eyes, legs, wings)
│ ├── worlds/ # Physics-grounded environments
│ │ └── molecular_world.py # 2D/3D volumetric odorant diffusion, temperature, wind, buoyancy
│ └── environments/ # Game/navigation environments
│ └── doom_fps.py # DDA raycasting FPS engine (278 FPS)
├── demos/
│ ├── demo_drosophila_ecosystem.py # 6 experiments: olfaction, vision, drugs, circadian
│ ├── demo_dishbrain_pong.py # 5 experiments: FEP learning, Pong, drugs, scale
│ ├── demo_doom_arena.py # 3 experiments: spatial navigation, threat avoidance
│ ├── demo_emergent_cuda.py # 13 experiments: emergent behaviors (GPU)
│ ├── demo_language_learning.py # Language acquisition at 5K neurons
│ ├── demo_beyond_ann.py # 23 capabilities impossible in ANNs
│ └── ...
├── papers/
│ ├── beyond_ann_white_paper.md # 23 experiments proving dONN capabilities
│ ├── dishbrain_replication_paper.md # DishBrain replication (draft, A100 data)
│ └── data/ # GPU experiment JSON results
├── scripts/
│ └── vast_deploy.sh # Vast.ai GPU deployment & benchmarking
├── docs/tutorials/ # 9 tutorial documents
├── pyproject.toml
└── LICENSE # CC BY-NC 4.0
| Organism | Neurons | Brain Regions | Behaviors | File |
|---|---|---|---|---|
| Drosophila melanogaster | 1K–139K (FlyWire scale) | 15 (AL, MB, CX, OL, VNC, ...) | Olfactory learning, phototaxis, thermotaxis, walking, flight, feeding | src/oneuro/organisms/drosophila.py |
| DishBrain culture | 1K–25K | Thalamic relay + L5 cortex | Pong via FEP, arena navigation, drug response | demos/demo_dishbrain_pong.py |
| Environment | Physics | Resolution | What It Simulates |
|---|---|---|---|
| MolecularWorld | Real gas-phase diffusion (CRC Handbook), 3D wind advection, CFL-stable subcycling, molecular buoyancy | 1mm cells, 2D or 3D volumetric | Odorant plumes rising/sinking by molecular weight, temperature gradients, vertical wind, day/night, soil chemistry |
| Doom FPS Engine | DDA raycasting, BSP dungeon generation | 64×48 @ 278 FPS | Room-corridor environments for spatial navigation experiments |
| Sense | Mechanism | File |
|---|---|---|
| MolecularRetina | 3-layer biophysical retina: photoreceptors (Govardovskii spectral sensitivity) → bipolar cells (ON/OFF pathways) → RGC (HH spiking output) | src/oneuro/molecular/retina.py |
| Olfactory antennae | Population-coded odorant receptor activation with real detection thresholds (Hallem & Carlson 2006) | Built into organisms |
| Taste (gustatory) | Sugar/bitter receptor activation driving SEZ proboscis extension reflex | Built into Drosophila |
25 subsystems running on every neuron:
| Layer | Components |
|---|---|
| Ion Channels | Na_v, K_v, K_leak, Ca_v, NMDA, AMPA, GABA_A, nAChR (HH gating kinetics) |
| Neurotransmitters | Dopamine, serotonin, NE, ACh, GABA, glutamate (real molecular identities) |
| Learning | NMDA-gated STDP, BCM metaplasticity, synaptic tagging & capture |
| Pharmacology | 8 drugs with 1-compartment PK (Bateman) + PD (Hill equation) |
| Gene Expression | DNA → RNA → Protein, CREB/c-Fos transcription factors, epigenetics |
| Second Messengers | cAMP/PKA/PKC/CaMKII/CREB/MAPK cascades |
| Calcium | 4-compartment dynamics (cytoplasmic, ER, mitochondrial, microdomain) |
| Glia | Astrocytes (glutamate uptake), oligodendrocytes (myelin), microglia (pruning) |
| Consciousness | IIT Phi, PCI, neural complexity, criticality, Global Workspace, Orch-OR |
| Circadian | TTFL molecular clock, sleep homeostasis, adenosine pressure |
The entire HH simulation runs on GPU via PyTorch sparse tensors. Validated on Apple MPS and NVIDIA A100:
| Scale | Neurons | Synapses | Target Hardware |
|---|---|---|---|
| tiny | 1K | ~14K | Any CPU |
| small | 5K | ~350K | MPS / any GPU |
| medium | 25K | ~8M | A100 / H100 |
| large | 139K (full FlyWire) | ~54M | A100 80GB |
Replicates Cortical Labs' DishBrain (Kagan et al. 2022, Neuron) — the first demonstration that biological neurons learn to play Pong. Our dONN learns via the Free Energy Principle: structured feedback (low entropy) for correct actions, random noise (high entropy) for incorrect ones. No reward. No punishment. Just physics.
| # | Experiment | What It Tests | Result |
|---|---|---|---|
| 1 | Pong Replication | FEP-driven learning | PASS (40%→60% hit rate) |
| 2 | FEP vs DA vs Random | Learning protocol comparison | PASS (FEP > DA > Random) |
| 3 | Drug Effects | Caffeine enhances, diazepam impairs | PASS (validated at 25K on A100) |
| 4 | Arena Navigation | 2D grid world navigation | PASS (36% > 15% random) |
| 5 | Scale Invariance | Learning at 1K → 10K neurons | PASS |
Behaviors that emerge from molecular dynamics and are impossible in standard ANNs:
| Experiment | What Emerges |
|---|---|
| Forgetting resistance | 9% catastrophic forgetting vs 12% baseline |
| Damage recovery | 60% functional recovery after 20% lesion |
| Sleep consolidation | Gene expression + adenosine clearance |
| Interference effects | Proactive and retroactive memory interference |
| Serial position | Primacy and recency effects in memory lists |
| Critical periods | PNN-mediated developmental window closure |
| Circadian modulation | Drug efficacy varies >90% by time of day |
5,000-neuron dONN learns 30 English words via discriminative Hebbian learning with weight-based BCI readout. 100% word accuracy, 100% sentence generation.
Complete digital fruit fly in a physics-grounded molecular world:
| # | Experiment | What It Tests |
|---|---|---|
| 1 | Olfactory Learning | Mushroom body conditioning (Tully & Quinn 1985 paradigm) |
| 2 | Phototaxis | Positive/negative phototaxis via optic lobe → CX → motor |
| 3 | Thermotaxis | Navigate toward preferred 24°C zone |
| 4 | Foraging | Multi-source olfactory navigation with FEP learning |
| 5 | Drug Effects | Caffeine, diazepam, nicotine on foraging performance |
| 6 | Day/Night Cycle | Diurnal activity patterns across circadian cycles |
BSP-generated dungeon environments with 8-directional movement, enemies, health pickups, and FEP-driven threat avoidance.
- In-silico electrophysiology: Record from any neuron, any synapse, any time — impossible with real tissue
- Connectome simulation: Run the 139K-neuron FlyWire Drosophila connectome as a functional digital twin
- Learning mechanisms: Compare FEP, dopamine reward, and Hebbian protocols at molecular resolution
- Circuit manipulation: Silence, stimulate, or lesion any brain region and observe system-level effects
- Virtual drug screening: Test compounds against a molecular brain with full dose-response curves
- Pharmacological specificity: Drugs act on real molecular targets (GABA-A, nAChR, NMDA, MAO, etc.)
- Chronopharmacology: Drug efficacy varies with circadian phase — model timing-dependent dosing
- Safety screening: Detect neural side effects before animal testing
- Insecticide development: Test neuroactive compounds on digital Drosophila brains
- Biologically grounded controllers: Use dONN motor output to drive robots or game agents
- Embodied cognition: Digital organisms with complete sensorimotor loops (sense → think → act)
- Emergent intelligence: Behaviors arise from physics, not hand-coded rules — no reward shaping needed
- FEP-based learning: Alternative to reinforcement learning that matches biological learning dynamics
- Digital dissection: Explore brain regions, apply drugs, measure consciousness — no animals harmed
- Interactive neuroscience: Students stimulate neurons and observe emergent behavior in real-time
- Comparative neurobiology: Compare C. elegans (302 neurons) to Drosophila (139K) to cortical tissue
pip install oNeuro
# With GPU acceleration
pip install oNeuro[cuda]
# With visualization
pip install oNeuro[viz]from oneuro.organisms.drosophila import Drosophila, MolecularWorld
# Create world with food sources
world = MolecularWorld(size=(100, 100), seed=42)
world.add_fruit(x=30, y=50, sugar=0.8, ripeness=0.7)
world.add_plant(x=70, y=60, nectar_rate=0.2)
# Create digital Drosophila (5000 HH neurons, 350K synapses)
fly = Drosophila(world=world, scale='small')
# Run organism — sense, think, act
for step in range(1000):
result = fly.step(world=world)
print(f"pos=({result['x']:.1f}, {result['y']:.1f}) "
f"speed={result['motor']['speed']:.3f}")from oneuro.molecular.cuda_backend import CUDARegionalBrain
brain = CUDARegionalBrain(n_columns=50, device="cuda", seed=42)
# Baseline measurement
baseline_spikes = sum(brain.step() for _ in range(500))
# Apply diazepam (GABA-A potentiator)
brain.apply_drug("diazepam", dose_mg=10.0)
drug_spikes = sum(brain.step() for _ in range(500))
# Result: ~60-98% spike reduction (dose-dependent)# DishBrain replication (5 experiments)
python3 demos/demo_dishbrain_pong.py
# Drosophila ecosystem (6 experiments)
python3 demos/demo_drosophila_ecosystem.py
# Emergent behaviors (13 experiments)
python3 demos/demo_emergent_cuda.py
# Language learning
python3 demos/demo_language_learning.py
# Spatial Arena (Doom-style navigation)
python3 demos/demo_doom_arena.py
# GPU scale with JSON output and multi-seed
python3 demos/demo_dishbrain_pong.py --scale medium --device cuda --runs 5 --json results.json
# Vast.ai GPU deployment
bash scripts/vast_deploy.sh search # find cheap A100s
bash scripts/vast_deploy.sh all <id> medium # run everything| Capability | Standard ANN | dONN (oNeuro) |
|---|---|---|
| Action potentials | Matrix multiply | Emerge from HH ion channel kinetics |
| Learning | Backpropagation | STDP from receptor trafficking |
| Drug response | Not possible | 8 drugs with real PK/PD acting on molecular targets |
| Forgetting | Catastrophic | Resistant (9% vs 12% loss after 4 tasks) |
| Damage recovery | None | 60% recovery after 20% lesion |
| Sleep | Not modeled | Gene expression, adenosine clearance, memory replay |
| Consciousness metrics | Not applicable | IIT Phi, PCI, criticality, Global Workspace |
| Circadian rhythms | Not modeled | TTFL clock, circadian drug efficacy variation |
| Gene expression | None | Full DNA→RNA→Protein pipeline |
| Paper | Status | Experiments | File |
|---|---|---|---|
| Beyond ANN | Complete | 23/23 PASS | papers/beyond_ann_white_paper.md |
| DishBrain Replication | Draft (A100 validated) | 5/5 PASS | papers/dishbrain_replication_paper.md |
A validated Go/No-Go benchmark testing dopamine-dependent reinforcement learning in the basal ganglia.
| Condition | Pre | Post | Δ | 95% CI |
|---|---|---|---|---|
| full_learning | 90.2% | 100% | +9.8% | [+8%, +12%] |
| no_dopamine | 83.3% | 50.0% | -33.3% | [-36%, -30%] |
Contrast: +43.1% | Cohen's d ≈ 1.6 (very large)
| Condition | Pre | Post | Δ | 95% CI |
|---|---|---|---|---|
| full_learning | 90.2% | 100% | +9.8% | [+8%, +12%] |
| nmda_block | 82.2% | 58.5% | -23.7% | [-28%, -19%] |
| anti_correlated | 88.0% | 71.2% | -16.8% | [-21%, -13%] |
| no_dopamine | 86.5% | 50.0% | -36.5% | [-40%, -33%] |
- Dopamine learning works: Networks improve accuracy by ~10%
- NMDA critical: Blocking NMDA receptors impairs learning by ~24%
- Contingency proven: Inverted rewards cause learning of wrong associations
- Ablation robust: Removing dopamine causes 33-37% accuracy decline
# 30-seed confirmatory
PYTHONPATH=src python3 experiments/go_no_go_benchmark.py \
--conditions full_learning no_dopamine \
--n-seeds 30 \
--scale standard \
--workers 2
# 4 conditions
PYTHONPATH=src python3 experiments/go_no_go_benchmark.py \
--conditions full_learning no_dopamine nmda_block anti_correlated \
--n-seeds 20 \
--scale standardpython3 experiments/generate_figures.py results.json figures/| File | Purpose |
|---|---|
experiments/go_no_go_benchmark.py |
Main benchmark script |
experiments/generate_figures.py |
Publication figure generator |
experiments/results/*.json |
Raw results |
experiments/figures/*.png |
Publication figures |
docs/benchmarks/RESULTS_SUMMARY.md |
Full results documentation |
- Python 3.11+
- NumPy >= 1.24
- PyTorch >= 2.0 (for CUDA/MPS GPU backend)
- Optional: nQPU for quantum chemistry
@software{oneuro_2026,
title = {oNeuro: Digital Organic Neural Network Platform for Molecular-Scale Brain Simulation},
author = {Price, Robert C.},
year = {2026},
url = {https://github.com/robertcprice/oNeuro}
}CC BY-NC 4.0 — See LICENSE
For commercial licensing: research@entropy.ai
