AI Simulates Evolution: How Insect and Lens Eyes Emerge

A research team has recreated the evolution of the eye in a physics simulation. The results show why nature chose such different forms.

listen Print view
Compound eyes of an Ormia ochracea

(Image: Khairul Bustomi / Shutterstock.com)

6 min. read
Contents

An international team of researchers from MIT, Rice University, and Lund University has simulated the evolution of the eye, demonstrating that the diversity of eye shapes in nature is not a coincidence but the result of selection. The team, led by Kushagra Tiwary from MIT, developed a framework called "What if Eye...?" that allows agents to evolve in a 3D environment – similar to game characters in a video game, but instead of being controlled by humans, they learn and adapt. Without external specifications, this process resulted in both the compound eyes of insects and the high-resolution lens eyes of predators and humans.

The study was recently published in the journal "Science Advances"; a preprint version of the work has been available on arXiv since the beginning of the year.

Central to the work is a framework based on so-called Embodied AI. The researchers modeled their agents as single-player games with specific rules: an agent receives reward points for successful actions, just as a player collects points. This reward structure drives evolution.

Unlike classical computer vision models that merely classify static images in databases, the researchers simulated entire agents in a physically accurate 3D environment based on the MuJoCo physics engine. The agents move through this world like NPCs (Non-Player Characters) in a video game – with sensors, a body, and motor skills.

Videos by heise

The scientists employed a methodologically sophisticated mix: a genetic algorithm (CMA-ES) controlled the mutations of the "genome" over hundreds of generations, determining both the structure of the eyes and the architecture of the brain. Within their "lifespan," individual agents then trained their neural network using Reinforcement Learning. This method is also used in modern video game AIs like AlphaGo. The agents were tasked with performing as well as possible with the hardware they were given. Each agent thus solved its personal mini-game, and those who played best were allowed to pass on their genes. This co-evolution approach forced the system to optimize hardware and software simultaneously – a high-resolution eye ultimately offers no advantage if the brain cannot process the flood of data.

To test whether selection pressure truly dictates eye structure, the team confronted the agents with two fundamentally different game scenarios. In the first scenario, the mission was to navigate a maze faster. Rewards were given for every second saved. Evolution here produced a solution strongly reminiscent of the compound eyes of insects. The agents developed a network of widely distributed, simple eyes that circled the head. This configuration sacrificed detail sharpness in favor of an enormous field of view of about 135 degrees, utilizing optical flow for obstacle detection. Those who couldn't see what was coming from the left and right crashed into walls and lost points.

In a second game scenario, the agents had to identify a specific target object (food) and reach it while avoiding deceptively similar objects (poison). Rewards were only given for correct identification. Under this pressure, the simulation ruthlessly selected towards the "camera eye": the agents reduced the number of eyes, oriented them frontally, and massively increased the density of photoreceptors. The result was a construction functionally similar to the eyes of predators or primates. The simulation thus provides experimental evidence that there is no universally "best" eye shape, but rather that the game's requirement – or in nature, the ecological niche – determines the architecture of the sensory organ.

Particularly insightful is the section of the study dealing with the emergence of the lens. The researchers implemented a physically accurate wave model of light – a realistic physics engine for optical effects. Their question: How does evolution "find" the solution when the game rules are physically complex?

In the early generations, the agents merely "discovered" the pinhole camera principle: smaller pupils resulted in sharper images. However, this strategy quickly led to a dead end, a classic game-over scenario. Small pupils allow little light to pass through, causing the signal-to-noise ratio (SNR) to become so poor that the agents could no longer improve their performance. They were trapped in a "local optimum."

Only when the simulation allowed mutations that altered the refractive index of the material – thus adding new content to the game rules – did the system break out of this dilemma. Initially, structures emerged that resembled diffuse clumps – failed attempts. But over hundreds of generations, selection refined these into precise lenses with smooth surfaces. This allowed the agents to reopen their pupils to capture more light without losing image sharpness. The lens thus appears in the simulation not as a random whim of nature, but as the one obvious physical solution to resolve the trade-off between light sensitivity and resolution. A brilliant exploit of nature.

According to the analysis, even small improvements in visual acuity require a disproportionately larger amount of neural resources for processing. The simulation showed that improving optical hardware only provided an evolutionary advantage if the neural network grew simultaneously. A good eye without a fast brain does not yield a higher score.

This result aligns with observations from biology, where species with high-resolution vision – such as cephalopods or birds – have significantly larger brains in proportion compared to organisms with simple light sensors like flatworms or jellyfish.

(mack)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.