# NeuroEvoSim: An Embodied Neuroevolution Simulation Experiment Implemented in Pure Python

> An embodied neuroevolution experiment built using only Python standard libraries, where agents perceive food, manage energy, and move in a shared environment via evolved neural networks, employing DNS selection and MAP-Elites archiving strategies.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-06-06T20:45:29.000Z
- 最近活动: 2026-06-06T20:50:05.450Z
- 热度: 163.9
- 关键词: 神经进化, 进化算法, 强化学习, 质量多样性, Python模拟, 具身智能, DNS算法, MAP-Elites, 机器学习, 教育工具
- 页面链接: https://www.zingnex.cn/en/forum/thread/neuroevosim-python
- Canonical: https://www.zingnex.cn/forum/thread/neuroevosim-python
- Markdown 来源: floors_fallback

---

## Introduction / Main Floor: NeuroEvoSim: An Embodied Neuroevolution Simulation Experiment Implemented in Pure Python

An embodied neuroevolution experiment built using only Python standard libraries, where agents perceive food, manage energy, and move in a shared environment via evolved neural networks, employing DNS selection and MAP-Elites archiving strategies.

## Original Author and Source

- **Original Author/Maintainer**: kai9987kai
- **Source Platform**: GitHub
- **Original Project Name**: NeuroEvolution-Simulation
- **Original Link**: https://github.com/kai9987kai/NeuroEvolution-Simulation
- **Release Time**: June 2026

---

## Project Overview

NeuroEvoSim is an educational embodied neuroevolution simulation project implemented entirely using Python standard libraries. It demonstrates how virtual agents can perceive food, manage energy, and move autonomously in a simulated environment via evolved neural networks. The project not only implements classic evolutionary algorithms but also integrates the latest research findings in the field of Quality-Diversity.

---

## Embodied Agent Architecture

Each agent is equipped with a feedforward neural network as its "brain", which outputs continuous control signals:

- **Steering Control**: Determines the agent's rotation direction and angle
- **Propulsion Control**: Determines the agent's movement speed

Agents perceive the environment through sensors, including food positions, distance to boundaries, etc. These inputs are processed by the neural network to generate action decisions.

## Energy and Survival Mechanism

The simulation introduces survival pressure related to resource management:

- Agents need to find and consume food to maintain energy
- Agents die when their energy is exhausted
- Colliding with walls consumes additional energy
- Movement itself also slowly consumes energy

This design creates natural selection pressure: agents that can forage efficiently are more likely to survive and reproduce offspring.

---

## Dominated Novelty Search (DNS)

The project uses the DNS algorithm proposed in 2025 to replace the traditional weighted fitness/novelty objective function. The core ideas of DNS are:

- Agents are evaluated based on their distance to the nearest more adaptive behaviors
- Creates local competition instead of relying on fixed behavior description boundaries
- Preserves both high-fitness individuals and behaviorally unique individuals

This strategy avoids the difficulty of weight tuning in traditional multi-objective optimization, allowing fitness and novelty to emerge naturally.

## MAP-Elites Style Archiving

The project implements a MAP-Elites style archiving system:

- Indexed by two dimensions: roaming range and movement behavior
- Preserves the optimal strategy in each behavioral niche
- Makes diverse strategies visible and reusable

Behavior descriptors are intentionally designed to be interpretable: how many arena areas the agent has visited, and its movement amount.

---

## Multi-level Mutation Strategy

- **Elitism**: Preserve the best individuals of each generation to directly enter the next generation
- **Crossover**: Combine neural network weights from parent individuals
- **Mutation**: Add random perturbations to weights
- **Random Immigration**: Introduce completely new random individuals to prevent premature convergence
- **Archived Parent Sampling**: Sample parents from archived elites to reuse successful schemes
- **Stagnation Detection and Adaptive Mutation**: Automatically expand mutation rate when evolution stagnates

---
