Since we treated the map-labeling problem as a black box when we designed the simple GA, let’s now inspect its structure to understand why the GA did not work so well. A point on the map has to place its label where it does not intersect other labels. Therefore, the placement of the label depends on the positions of other labels in the neighborhood. It depends less on labels that are some distance away. It follows that if a label does not intersect other labels in the parent map, then it is probably advantageous to transfer it (during crossover) to a child together with the labels in its immediate vicinity. A good solution will be composed of such patches of labels that are placed well with respect to each other.
Figure 3.6: Cities p and q are rivals, but p and r are not.
To make this more formal, we define two points to be rivals if their labels can intersect. See Figure 3.6 for an example. A rival group is a certain point, called the central point, together with its rivals. A good placement of labels for a rival group can be considered a building block for the GA. Or, more accurately, the rival relationship defines the linkage of the encoding (which genes “belong together”, see Section 2.2).∗ A GA finds good solutions by combining such building blocks. ∗Actually, it is more accurate to say that the rival relationship is a good assessment of the true linkage of the encoding. We will discuss this further in Section 5.1 on page 106.
3.2 Applying theoretical insights 43 If one parent contains a building block for a certain region, and the other parent contains a building block for another region, we would like crossover to produce a child which contains them both. This exchange of building blocks is called
mixing and is one of the fundamental mechanisms of the GA. Since rival groups
overlap, it is inevitable that some rival groups will get split over both children after crossover. For example, suppose point q is a rival of point p, and p has no other rivals. A parent x contains corresponding genes xpand xq. Points p and q
together form a rival group, and their genes can therefore store a building block. After crossover, the value in xp can be copied to the first child, and the value in
xqcan be copied to the second child. Assuming the first child holds another value
for xq(and similarly for the other child), the building block is disrupted.
In order to make the GA find a good solution, it has to mix building blocks and minimize the amount of disruption. We can now interpret the results of the simple GAs and understand why they performed so poorly. Both crossovers used by the simple GAs (one-point and uniform) have different mixing and disruption properties, which are intimately bound to the encoding used. We will discuss one-point crossover first.
The encoding used stores a labeling as a list of label positions. Two adja- cent genes correspond with cities that can be anywhere on the map. One-point crossover works under the assumption that genes that are adjacent belong together (are linked). As a result, one-point crossover is biased to keep certain combina- tions of genes together. Unfortunately, it is very unlikely that the corresponding cities are actually near each other, and therefore the bias is inappropriate. We can demonstrate this more clearly by slightly altering the input of the algorithm. In- stead of feeding it a random list of cities, we provide as input a list that is sorted on their x-coordinate. In the case of ties, the sorting is done on the y-coordinate. Now it makes more sense to transfer adjacent genes together, since they are more likely to be near each other on the map. However, crossover is still handling a two-dimensional problem in a one-dimensional way. The results improve (see Figure 3.7), but the end result is still poor.
Uniform crossover works under the assumption that the linkage between each pair of genes is equal. It mixes very aggressively, and it is hoped that the amount of disruption will still be acceptable. In the case of map labeling, a rival group will very likely be distributed over both children. The probability of a rival group being transfered intact decreases exponentially with the size of the group. On the maps used to compare the simple GAs, each point has on average roughly seven rivals. Therefore, uniform crossover is very disruptive.
It is important to realize how the GA gets supplied with building blocks and what happens to them. In Figure 3.8, we show four runs of different GAs, that dif- fer in their crossover (one-point or uniform) and their setting for Prm(either 0.001,
Figure 3.7: The same GA using one-point crossover on a random and a sorted list. Also shown is the GA with uniform crossover. Selection scheme is tournament selection, Prc= 0.7, Prm= 0.001 .
3.2 Applying theoretical insights 45 that mutation largely supplies what crossover mixes; if mutation is turned off, premature convergence occurs. This happens because one-point crossover mixes quite slowly, so the population converges rather fast. This effect is less notice- able with uniform crossover, as can be observed in the figure. Uniform crossover mixes harder, and is able to combine the building blocks that were present after initialization.
Figure 3.8: The interplay between mutation and crossover. Selection scheme is tournament selection.