Hi, Habr!

Recently passed the course work on genetic algorithms in the
Darwinbots program and decided that it would be interesting to the community. Moreover, at the moment the project community is quite small. Articles will be half the translation of documentation, and half of their research program.
1. First acquaintance

So, the program
Darwinbots is a simulator of artificial life. The first versions are written by the Italian programmer Carlo Comis using the programming language Visual Basic. The latest version of the program at the moment - 2.45.02D, released August 21, 2012. A third version of the application, completely rewritten in C #, is being developed. There is also a port in C ++. The source code of the project is published in the Subversion version control system and is available to everyone.
The program mimics the life of a population of organisms - bots (robots), whose DNA is described manually using a specially designed language. DNA, in fact, is a large finite-state machine that reads information from many different inputs, modifies it, and connects to conclusions with actions. The bot code (further DNA) is described in a text file with the extension .txt, which allows you to work with it in any editor, including Notepad. The essence of the simulation is to run the DNA for each cycle, taking into account possible interactions of organisms, mutations, viruses, and so on.
')
The main interface element of the Darwinbots program is the world of bots (or the simulation field). The world of bots is a large non-discrete plane (yes, that same blue rectangle that was previously). By default, bots can move throughout the world. The world settings are set in the simulation settings.

Each bot is represented by a circle of a certain size and color, with a certain pattern in the center. The "eye" of the bot is indicated by a white dot. It includes 9 simple eyes. When selecting a bot in the simulation field, you can see a grid of the fields of view of each eye. The eyes transmit to the program a value approximately corresponding to the size of the object that came into view.
The bot has a system of simplest tactile sensations, which allows it to feel the collision or attack from the other bot. The sensory inputs of bots are analyzed in DNA, which is written in language using abstraction FILO (“first came, last gone,” according to the principle of plates placed on top of each other). The DNA of most bots have from 6 to 20 procedures, called genes, in which up to 200 operations can be performed. Each operation can mutate.
Each bot has its own stock of energy. Most actions reduce energy. When the energy becomes zero, the bot will die, and when it becomes above the level defined in the DNA, reproduction begins. Energy can be replenished by absorbing other bots (similar to hunting in a normal environment) and energy reserves from its “body”. If a bot is selected as an autotroph, then the energy is replenished automatically over a long time.
A bot can shoot intangible shells, attack, remove debris, become infected with infections and exchange information with other bots. A projectile is a point on the simulation field that has no mass or physical dimensions.
A bot can also connect with other bots, forming a complex multicellular structure within which bots can exchange energy, operations and move around the field.
When a bot multiplies, its DNA is passed to the descendant, sometimes with some changes that affect the behavior of the bot. As in the real world, evolution can occur with DNA changes — the next generation of bots can become more able to attack, multiply, avoid contacts, and so on. Such mutations are either passed on from generation to generation, or disappear. Over time, unwanted code may accumulate in the DNA that does nothing useful. It will take more energy and make the DNA more loaded.
Since the program does not decide which organism to grow, the abilities of the bot manifest themselves in the long term by a combination of movement strategies, energy management, reproduction, etc. There are no restrictions on the complexity of the DNA code.
The evolution in Darwinbots takes quite a long time. The generation of bots can live several thousand cycles, and most simulations operate at a frequency of about 15 cycles per second, so a few hours to several days can pass to significant natural selection.
Of course, in this introductory article I could hardly interest you in this project, but as a bait I can tell you that the program has an Internet mode (some kind of PvP), and bot developers can take part in leagues - peculiar competitions.
In the next article we will talk about the settings of the simulation and programming of bots.
And finally, the pictures to attract attention:
Seconds later:
After a few hundred simulation cycles:
See you later!
UPD: Friends!
Please answer the question on the future continuation of the article
by reference. Thank you in advance!