Genetic algorithm applied to assembly code in a simple environment
C++ Prolog
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
installer
.gitignore
QtBugs.pro
QtBugs.rc
README.md
bug.cpp
bug.h
bugeditdialog.cpp
bugeditdialog.h
bugeditdialog.ui
dna.cpp
dna.h
dnapage.cpp
dnapage.h
dnapage.ui
dnawidget.cpp
dnawidget.h
dnawidget.ui
energy_node.cpp
energy_node.h
histogramdialog.cpp
histogramdialog.h
histogramdialog.ui
main.cpp
main_window.cpp
main_window.h
main_window.ui
petri_dish.cpp
petri_dish.h
petriwidget.cpp
petriwidget.h
processor.cpp
processor.h
processorpage.cpp
processorpage.h
processorpage.ui
settings.cpp
settings.h
settings.ui
world_params.cpp
world_params.h

README.md

QtBugs

This program simulates a petri dish full of bugs - the bugs' DNA is used as a computer program to control their behavior and is recombined during reproduction to produce new bugs - with a small chance of mutation. They have the colors of nearby locations as inputs and their own color and direction of motion as outputs. A fixed amount of energy exists in the system to control the population.

The bugs' behavior can be influenced by changing the distribution pattern of energy (food), as well as many environmental parameters, such as the total energy available, the energy cost of moving and of sitting still, the minimum amount of energy that must be passed to children, etc. A graph of the genetic variance can be used to inspect the distributions of genes within the population, and a disassembler is available for viewing the genetic programs. You can save and restore the state of the petri dish.

The bugs start out with completely random programs/DNA, but over time, competition and chance result in observable genetic changes.

Contributions welcome.

Screen Shots

Main Window

Bug Edit

Variance Graph