How do Trilobots evolve?
You aren't the only one being scored as you play. The Trilobots themselves are being evaluated on many different criteria. At the end of each wave, each Trilobot uses these criteria to compute its scores in three different categories. The Trilobots with the highest scores are bred together to produce the next wave. This is what is known, in genetic programming terms, as a Fitness Function.
Fitness Functions
There are three fitness functions in Trilobots, and each Trilobot gets a score in each of them.
The first fitness function measures how good an Attacker the Trilobot was. Kills, hits made, weapons fired, and survival time all contribute to the Attacker score.
The second fitness function measures how good a Defender the Trilobot was. Shots absorbed, missiles destroyed, and survival time add to the Defender score, as does a fraction of the highest score of any other Trilobot that the Defender tries to protect.
The third fitness function measures how good an Invader the Trilobot was. Invaders score big if they reach the bottom of the screen, and they score a bit each time they get closer to it. You'll notice that your score drops if an invader gets past you. That's because they're feeding off the resources you're here to protect. Drops in score mean fewer extra ships built, so to stay in he game, you need to stop the invaders.
Reproduction of the Fittest
In each category, the top three scorers breed together. The higher the placing, the more genetic material from a given Trilobot is passed to the next generation.
For instance, the top Attacker has three children with second best attacker, and two children with the third best attacker. The second and third best attackers have one child together.
In addition, the best attacker is cloned 3 times, the second best is cloned twice, and the third best is cloned once. Cloning is imperfect, there is a chance of mutation equal to the accuracy of the player. This is how the Trilobots introduce new code and bodyparts into the gene pool.
Castes
By virtue of being segregated into three separate breeding populations, Trilobots will tend to differentiate into three distinct castes. The castes should evolve abilities and programming that work together to ensure the player's destruction.
Invaders tend to evolve quick bodies and evasive or defensive techniques as they speed towards the bottom of the screen.
Attackers will evolve deadly weapons and techniques to better destroy your ships.
Defenders will evolve armor and/or shields, and techniques that protect their fellow Trilobots by blocking your attacks.
For the first few levels, the caste differentiation won't be quite so obvious. Invaders and Defenders are rewarded a little bit for surviving attacks, for instance, so they will tend to get armor and shields as well, at least until an attacker comes along that has more firepower instead.
Three fitness functions means each Trilobot has three ways to earn the right to procreate. In fact, its possible for a Trilobot to score high enough in more than one fitness function to breed in more than one category. This means that there will occasionally be crossover between two castes.
More to come
...