Evolving robots designed to be built.
Quality-diversity evolution of robot bodies and locomotion controllers, built from real parts so the result can be printed and assembled.
Every robot is a tree of real modules (Karl Sims and Revolve2 style) driven by Feetech STS3215 servos. Bodies are evolved with a MAP-Elites archive laid out by behaviour and cost, while a central pattern generator with load feedback (Tegotae) is tuned with CMA-ES for each candidate body. Any robot in the archive can be exported as printable parts, a bill of materials and a control file for an ESP32.
Status: the robots are evolved and validated in simulation only. No robot has been printed or assembled yet, the parts have never been fitted together, and the servo measures they are built around are placeholders until a real STS3215 is measured. Treat an export as a design to check, not a kit known to work. Building the first one is the next milestone (roadmap).
Trained on four environments: flat floor, bumps, low steps and rubble (all environments).
Full results → (numbers, the archive map and training progress)
python -m venv venv && source venv/bin/activate && pip install -e . # install
python experiments/train.py # evolve (flat ground)
python experiments/replay.py --list # see the robot types, then:
python experiments/replay.py --type 8servos-mid-trot # watch one
python experiments/export.py --type 8servos-mid-trot # parts, BOM, control fileThe showcase robots trained on the steer preset (--preset steer: four
environments, steering commands), as islands over several days
(how to train a showcase).
To watch the showcase robots without training, download their archive from the showcase release:
curl -LO https://github.com/mpena2099/darwinbot/releases/download/showcase-1/showcase.pkl
python experiments/replay.py --archive showcase.pkl --type 13servos-mid-trot --speed 0.5Full documentation: https://mpena2099.github.io/darwinbot/. To preview it locally:
pip install -e ".[docs]"
mkdocs serve- Gallery: interactive map of the archive and a 3D replay of each robot
- Beginner guide to evolutionary algorithms: English · Português
- Control file format and hardware data (Portuguese)
- Related work: where DarwinBot sits among other evolvable-robot projects
- Contributing
Quem está começando com algoritmos evolutivos pode ler antes o guia em português.
O DarwinBot inventa robôs e ensina cada um a andar, numa simulação física
(MuJoCo). A evolução decide o corpo, uma árvore de módulos: quantas pernas, de que
tamanho (medidas contínuas, em milímetros), em que direção cada junta gira, onde
cada peça se prende no tronco, e se a perna termina numa roda. Há também módulos
passivos sem servo: mola de TPU, cauda com contrapeso, patim, espeto e roda
livre. Só entram corpos que a impressora e o servo aguentam: peças de até
220 mm, links que não dobram sob o torque do servo e tronco cortado em placas
emendadas. Para cada
corpo, um otimizador (CMA-ES) procura o ritmo de movimento das juntas, com dois
harmônicos e um retorno da carga dos servos, que leva o robô mais longe. Em vez de
um único vencedor, o programa guarda o melhor robô de cada comportamento (MAP-Elites
por tempo de contato com o chão, altura do tronco, número de pernas e custo de
transporte), formando um
catálogo de soluções diferentes. Os robôs são montados com peças reais (servos
STS3215, peças impressas em 3D, ESP32 e bateria LiPo), treinados com física
propositalmente variada para resistir às diferenças entre simulação e mundo real,
e qualquer um deles pode ser exportado como peças STL, lista de materiais, guia de
montagem e arquivo de controle. Código e documentação técnica em inglês; os dados
de hardware em docs/ estão em português.
MIT, see LICENSE. To cite this project, use the "Cite this
repository" button on GitHub (CITATION.cff).


