Neuroscientists have long operated under a frustrating constraint: the inability to arbitrarily rewire a living brain to test a hypothesis. While modern imaging allows us to observe neurons firing in real-time and limited optogenetics allow us to trigger specific cells, the act of physically relocating a neural connection to see how it alters behavior remains a biological impossibility. We can observe the map, but we cannot redraw the roads. This gap has left the relationship between a creature's physical form and its neural architecture as a theoretical black box, leaving researchers to guess how the geometry of a body shapes the logic of the mind.

The Architecture of a Digital Larva

To break this deadlock, a collaborative team from EPFL, Duke University, and the IST has introduced simZFish, a physics-based simulation that transplants the neural blueprint of a zebrafish into a digital environment. Detailed in Science Robotics, the project began with whole-brain calcium imaging data and circuit modeling from the Naumann Lab at Duke University. The researchers focused on the Optomotor Response (OMR), the critical reflex that allows a fish to stabilize its position in a current. By mapping the wiring diagram from the retina through the pretectum and down to the spinal nerves, the team replicated the entire sensory-motor pipeline in a virtual space.

This digital twin is not merely a software model but a high-fidelity physical entity. Built using the Webots physics engine, simZFish replicates a zebrafish larva six days post-hatch at a 1:1 scale. The simulation accounts for a body length of 4mm and a mass of 0.3mg, utilizing seven body segments driven by six simulated motors. To ensure biological accuracy, the team integrated fluid dynamics to mimic the physical resistance of water. The visual system consists of two cameras positioned on the sides of the head, mimicking the pixel-level light collection of biological eyes.

The data flow within simZFish follows a strict biological hierarchy. Light changes detected by the artificial retina are processed through four types of direction-selective ganglion cells, which then relay information to the pretectum. Here, neurons integrate visual inputs from both eyes to calculate the necessary movement direction. This signal is passed to hindbrain motor command neurons, which dictate the contraction frequency and rotation of the tail muscles. To capture the signature burst-and-glide swimming pattern of zebrafish larvae, the researchers implemented a bout gate structure that accumulates neural signals before releasing them in a concentrated burst.

The Aperture Problem and the Logic of Embodiment

When the team first ran the simulation, they encountered a systemic failure: the OMR behavior collapsed. When the full visual field of the simulated retina was fed into the circuit, the fish stopped responding correctly to the current. The cause was the aperture problem. Because the cameras were placed on the sides of the head, the optic flow generated by the simulated river created conflicting, swirling signals that effectively canceled each other out. The software—the neural circuit—was functioning perfectly, but the hardware—the physical placement of the eyes—was producing data that the circuit could not process.

To fix this, the researchers restricted the input range to the lower posterior region of the field of view. The result was an immediate restoration of the OMR behavior. Crucially, this specific region matched the most powerful receptive fields recorded in actual biological zebrafish pretectums. This discovery provides a concrete example of embodiment: the physical constraints of the body and the positioning of sensors do not just provide data; they actively dictate the most efficient way for the brain to wire itself. Evolution did not choose the lower posterior receptive field by chance; it chose it because the physical geometry of the fish's head made that the only viable path for stable navigation.

This realization shifted the project from a simple replication to an iterative discovery loop. The first version, simZFish 1.0, exhibited a prediction error when exposed to shearing stimuli—visual inputs moving in opposite directions from the front and back. The simulation predicted the fish would over-rotate, but real-world observations by Dr. Matthew Loring showed that actual zebrafish barely rotate under these conditions. To resolve this discrepancy, the team returned to the lab and used volume 2-photon calcium imaging to record tens of thousands of neurons again.

This second round of imaging revealed a missing piece of the puzzle: binocular neurons in the pretectum with specific forward- and backward-tuning subtypes that the original model had overlooked. By integrating these neurons into simZFish 2.0, the researchers were able to precisely replicate the biological response to shearing stimuli. This established a powerful new methodology for neuroscience: using simulation predictions to identify gaps in biological knowledge, verifying those gaps through imaging, and updating the model to reverse-engineer the brain's operational logic.

In the final validation phase, the team placed simZFish in a virtual environment featuring realistic riverbed terrain and physical forces. Despite using only a minimal set of experimentally derived neural components, the simulated fish successfully navigated upstream in low-visibility conditions. This proves that complex, goal-oriented survival behaviors do not require high-level abstract reasoning or massive neural networks; they can emerge from the synergy between a minimal circuit and a specific physical body.

For designers of Physical AI and robotics, the implications are clear. The current trend in AI is to solve performance issues by increasing parameter counts or adding layers of complexity to the neural network. simZFish suggests a different path. Instead of optimizing the software, engineers should first analyze the geometric characteristics of the information generated by the physical location and field of view of their sensors. Because the physical structure of the hardware acts as a primary filter for noise and data, the most efficient intelligence is found at the intersection of body and brain. The goal for the next generation of autonomous agents should not be a more powerful brain, but a more harmonious marriage between the sensor's position and the circuit's logic.