When it comes to evolving your turtles, there are several techniques that will help you to evolve turtles more to your liking. There are also several techniques that will make you more efficient. This section will describe some of these techniques to make evolving turtles more fun and more productive.
Patience is your most powerful tool when evolving your turtles. Often times a population does not begin to get interesting until it has evolved over at least 10 or 20 generations. Allow evolution to perform its magic. At some point in the evolution of a population, a set of instructions (code) will come together and you will get that wow moment when your turtles will simply amaze you. As the population becomes more sophisticated and begins to acquire the drawing characteristics that you seek, the evolution will seem to accelerate, providing more and more interesting results.
Because the initial turtles of a new population are randomly generated when you create the population, the likelihood that the turtles will start out with interesting drawings is a coin toss and one with a low probability. However, this does not mean that you should not be selective. When you create a new population, review the turtles generated to see if they contain any interesting characteristics. Do they change colors? Do they draw anything? Do they seem to turn a lot or just draw straight lines.
Do not expect to have many turtles that draw fascinating pictures. This is the job of evolution. However, it is not unreasonable to expect that the turtles will contain genetic information (code to change colors, move, and turn) that will be available to future generations. If you do not see any interesting turtles in a newly created population, delete it and create a new one. Being a little selective when creating your new populations can pay big dividends as the populations evolve.
It is important to remember that Evolved Art closely mimics true evolution. In this sense, it is reasonable to refer to a population's gene pool. This use of the term gene pool is not in reference to the gene pool's used by Evolved Art, but is a reference to the concept of the genetic material available within a population. In the case of Evolved Art's populations, the genetic material consists of the programs of each turtle in a population. In other words, when a population is asked to evolve to the next generation, the new generation's turtle programs can consist of only the commands that are available in the current generation's turtles.
For example, in the extreme case that a population's existing turtles contain programs with only the commands to turn right and move forward, then the turtles evolved into the next generation can consist of only those two commands. In other words, the next generation's turtles cannot turn left or change color. They do not have the genetic material (program commands) available to do anything except turn right and move forward. For this reason, it is important to try to avoid reducing the population's available genetic material.
The term population diversity is used to describe a population that contains a diverse pool of genetic information. The more diverse a population is, the better future generations can evolve. Keep this in mind as you shape your populations during evolution. Larger populations, of course, have more available genetic material than smaller populations. Populations with many identical turtles have less diverse genetic material. Marking many turtles as not liked reduces the likelihood that they will be selected for reproduction, and in turn reduces the diversity of the genetic material copied into the next generation.
Turtles can be marked as immortal. Immortality is a very useful tool in your evolution toolbox. As was discussed in the information about Evolution Concepts, turtles are selected for reproduction in a random fashion than favors the most fit specimens. However, due to the random nature of this selection, there is no guarantee that any given turtle will be selected to reproduce. Even when a turtle is selected for reproduction, the turtle's children can change dramatically and look nothing like their parents. For these reasons, it is common for beautiful turtles to simply disappear during evolution. As described above, you can checkpoint a turtle to the database, but this does not prevent the turtle from disappearing during evolution, only that the turtle will return when you reload the population. This is where immortality enters the picture.
When you mark a turtle as immortal, it will survive from generation to generation during evolution. The turtle continues to be active in the population from the point of view of selection and mating. However, when the turtle reproduces with it's selected mate, it will not be replaced by it's child. The immortal turtle's mate will be replaced by it's child, unless it is also marked as immortal. Immortal turtle's are identified in the population view with a light-green background.
To make a turtle immortal, you need to open the turtle in the Turtle View, tap the action button, and select the Make Immortal action. When a turtle is already immortal, the action sheet will display the action Make Mortal, which will reset the turtle's immortality status.
It is important to understand that immortality has an adverse side-affect. Since an immortal turtle is never replaced by it's children, it inherently reduces the amount of evolution that occurs in each generation. In the extreme case, if every turtle in a population is marked as immortal, then no evolution will occur at all. Therefore, it is important to try to not mark too many turtles as immortal. If you find yourself marking more than 20% of a population as immortal, you might consider checkpointing the population instead. Or consider moving the entire population into a gene pool. Then let evolution take it's course. In general I would suggest that immortals should be occupy more than 10% of a population.
Turtle injection is a very useful tool for increasing population diversity. When you inject new turtles into a population, you are introducing new code which provides more program commands available to new children that are evolved into future generations. If you notice that a population seems to be becoming stagnant, you may want to consider injecting new turtles into the population.
Turtle injection is accomplished by replacing turtles. This is discussed on the help page for the Turtle View under the section describing the Replace button. Sometimes, it is a good idea to use the generate random turtle option to replace a turtle. This injects fresh code into the population and helps to diversify it.
Also remember that gene pools are you friend. Over time you will accumulate a nice collection of interesting turtles that contain valuable genetic information. Injecting some of these interesting turtles into your population can take the evolution in new directions. It can also help to cure stagnation. However, be careful to not inject too many turtles early in the evolution of a population, as these turtles tend to have high fitness and can cause the domination effect and limit the potential of a new population.
Contrary to previous advice, there are a couple of circumstances when reducing the turtles allowed to reproduce is desirable. One case is when you see a turtle that you like, but it has a mole. Moles on turtles are much likes moles on people - they are blemishes that may be undesirable. For example, you have a beautiful drawing, but right in the middle of it the turtle draws an awkward scribble. What you would like to do is evolve that turtle until the scribble goes away. In other words, you want to evolve the turtle's program until the code that draws the scribble is somehow removed during evolution. In this case, you can not like all of the turtles in the population, except the one you like, over successive generations. The first one or two times you do this, the turtle whose drawing you like will show up many times in the next generation, simply because he will have the highest fitness and be selected most often for reproduction. So after a couple of generations of focused evolution, you will need to not like fewer turtles, since there are will be fewer turtles that are different from the one you are focused on. If you are lucky, after a number of generations of focused evolution, the blemish that you dislike will disappear in one of the turtles, and you will be able to gene pool it for your collection.
Another instance in which you might use focused evolution is when you see two or three turtles that each have a feature that you like, and you wish that somehow you could get those features combined into one turtle. For example, you may really like the drawing of one turtle, yet prefer the coloring of another turtle. By focusing evolution on these few turtles over a number of generations, you have the chance to combine the features that you like into a single turtle.
Another instance in which focused evolution makes sense in for the purpose of population steering. Population steering is used when you wish to move an entire population in a new direction. For example, let's say you have a population that evolves a turtle that has a geometric shape (say an pentagon) or a unique color scheme. In these cases, you can focus the population on that turtle, which will cause the entire population to move in that direction. In other words, you are steering the population in a direction that is indicated by the turtle on which you focused.
One final note about focused evolution. Because focused evolution's purpose is to dramatically modify a population's evolution, you might consider cloning the population and focusing the evolution of the clone. This way you do not lose the current population and it's evolution path. It also allows you to compare the differences of the two populations as they evolve independently.
While the ability to undo population evolution may seem like a common operation provided by every app, it is a very important tool in Evolved Art. By evolving a population, then undo-ing that evolution, you can keep an existing set of turtles while peeking at the next generation. Use this tool when you have a population that is evolving nicely to prevent a new generation from setting back your evolution. Just use the Undo button in the Population View's toolbar.
A useful technique using Undo is to evolve a new population and see if it contains any interesting turtles. If the new generation contains an interesting turtle, you can checkpoint that turtle and then undo the evolve. This checkpoints the new interesting turtle into the database, but it reverts back to the turtle in the previous generation. After you undo, you can leave the turtle as it was, or you can use the Turtle View to load the checkpoint and get the interesting turtle into the current generation.
Finally, there is population cloning. There may be times when you wish to copy a generation of a population before you continue evolving the population, but you do not want to checkpoint the population because you know the last checkpoint is an excellent checkpoint. In this instance, you can use the Clone Population action in the Population View to create a new population that is an exact copy. This feature can also be used to fork populations, allowing you to evolve a population in different directions. Cloning can also be used as a simple means of keeping a history of a population as it evolves, although you can copy a population to a new gene pool to accomplish this if you do not care about being able to evolve the versions that you keep. One thing to note is that when a population is cloned, the turtles in the new population will be assigned new unique identifiers, so there is really no easy way to track the evolution of turtles between a population and its clone.
Checkpoints are described on the Overview help page. They are used to save your populations and turtles from memory into the database so they are not lost. However, Checkpoints are also a useful tool when it comes to the process of evolving your turtles. The help page on Evolution Concepts points of the process used in selecting turtles to mate for the next generation, and points out that there is no guarantee that a given turtle will be selected for mating. Even the most fit turtle may be passed over for mating. Furthermore, even if a turtle is selected for mating, there is no guarantee that it's children will have the same characteristics of the parents.
For this reason, you should become proficient at using the checkpoint feature to prevent the loss of turtles that you are particularly interested in.
Dominant turtles are turtles that have a fitness value that is much greater than the other turtles in the population. Because of their high fitness value, they tend to be selected for reproduction much more frequently than the other turtles. Over generations, these dominant turtles will begin to appear more frequently in the population. In the worst case, one or several dominant turtles will begin to crowd out other turtles to the point that your population is full of nothing but dominant turtles.
When you begin to notice that a dominant turtle is beginning to crowd out the other turtles, you will want to weed it out just like you would weed out a garden. The best approach is to simply not like all or all but one of the dominant turtles before you evolve the population to the next generation. This will reduce the number of times the dominant turtle reproduces, allowing other turtles to once again begin populating your population. It may take a few generations to return the population to a reasonable balance, but eventually the dominant turtle can be brought under control.
Immutable turtles are turtles whose program is such that it rarely gets modified when crossed-over with other turtles during reproduction. This can happen when the turtle has a large expression tree (in other words, lots of code), but the bulk of the drawing done by the turtle actually occurs in a very small part of the overall expression tree. In other words, a tiny part of a large program does all of the drawing. Because the expression tree is large, and the part of it which does the actual drawing is small, the probability of crossover splitting the expression tree at a point which modifies the way the turtle draws is very small.
You will notice this phenomenon when a population seems to have a small number of different turtles, and the turtles rarely change from one generation to the next. You will think that the evolution is broken, and in a way it is. When a population becomes dominated by highly fit, immutable turtles, evolution simply stagnates, and its evolution becomes quite uninteresting. Sometimes this can be corrected using your ability to like none of the turtles, then liking a few which appear to be new, but sometimes the effort is simply not worth it and you are better off dispatching the population and starting anew. If there are any interesting turtles in the population, gene pool them so you can copy them into a new population. Then simply give up on this population and start fresh with a new one.
Many users of Evolved Art will not like turtles that draw nothing. An empty drawing seems undesirable after all. However, many times this approach can be a mistake, because turtles can contain dead code. Dead code is code that does not get executed. For example, if code is contained in the first subexpression of a IF_PEN_UP block (detailed in the programming section), and the pen is currently in the down state, then the code is not executed. For this discussion, we will also define dead code as drawing code that is executed while the turtle's pen is in the up state and therefore not drawing anything.
Consider the following program:
( IF_PEN_DOWN
( IF_PEN_UP
( PEN_DOWN )
( RIGHT_5 )
)
( REPEAT_100
( IF_PEN_DOWN
( FWD_5 )
( RIGHT_10 )
)
( IF_PEN_UP
( RED_2 )
( RIGHT_15 )
)
( REPEAT_5
( FWD_5 )
( LEFT_10 )
( LEFT_10 )
)
( BLOCK
( RIGHT_2 )
( LEFT_15 )
)
)
)
This code draws nothing for its picture. The reason for this is that the
only instructions to move forward are contained in the second subexpression
of the IF_PEN_DOWN
instruction at the beginning of the program.
Because the pen begins in the down state, and the pen state is never changed
to the up state within the program, this subexpression is never executed.
Thus, the turtle draws nothing. However, this turtle's program contains
14 unique instructions inside 7 blocks of code! This is valuable genetic
material when it is combined with other turtles during reproduction. If one of
this turtle's subexpressions is inserted into a drawing turtle during crossover,
the resulting change could be significant.
In these cases, a turtle's program still contains potentially valuable genetic information. Marking the turtle as not liked makes it very unlikely to reproduce, and thus reduces the probability that it's genetic information will be available for future generations. For this reason, it is suggested that you do not mark these turtles as not liked during the earliest generations of a population's evolution. As a population evolves over many generations, the genetic complexity of it's turtles increases and this consideration becomes less important.
Since the turtles in a population are initially generated randomly, and the evolution proceeds in a relatively random fashion based on probabilities, there are times when the results are simply not satisfactory. If your population seems to not generate interesting turtles, and you have applied all of the techniques described above, there is nothing wrong with giving up and starting with a fresh population. Turtles are cheap! Don't be afraid to start over, possibly with new population parameters, to see if you can get better results.