• No results found

Selection/replacement procedure

In document 1Intelligent Road Design (Page 118-122)

Solution algorithms for optimizing non-backtracking horizontal alignments

Algorithm 5.1 Selection/replacement procedure

(1) Step 1: Select n (not necessarily distinct) parents from the current r population (population size is np) to reproduce offspring. Each of the selected chromosomes is marked as applicable to exactly one genetic operation. Let nr parent chromosomes breed to produce exactly nr offspring.

(2) Step 2: Select nr distinct chromosomes from the current population to die.

Each of the selected chromosomes will be replaced by new offspring at the next generation.

(3) Step 3: Clone the rest np− chromosomes to the next generation. nr (4) Step 4: Insert these nr new offspring into the next generation.

Note that the selected nr parents for reproducing offspring are not necessarily distinct. A better chromosome may be selected several times. The selection is ordinal-based. In the proposed algorithm, the probability that an individual is selected for reproducing offspring is specified as a nonlinear function of a user-defined parameter q :

) 1

1

( −

= k

k cq q

p , (5.4)

where pk = the selection probability for the kth chromosome in the ranking of the population

c = coefficient

q = user defined parameter, q

( )

0,1 .

98 Intelligent Road Design

The above function is proposed by Michalewicz (1996). Note that the summation of all probabilities must be equal to 1. That is

1

The above equation implies

(

q

)

np

There is an alternative approach to derive eqn (5.7). Suppose that we conduct a sequence of independent Bernoulli trials in which q denotes the probability that a chromosome is selected in a single trial. Assume that the trial is started from the first to the last chromosome in the ranking of the population.

Then the probability that the kth chromosome is selected should be q(1−q)k1. If after np trials, none of the chromosomes in the population is selected, then the selection process is repeated until we successfully select a chromosome. This procedure is somewhat like a geometric distribution with finite states (i.e., np) of the random variable. Note that the probability that none of the chromosomes is selected in the first cycle is

Therefore, the overall probability that the kth chromosome is selected will be

The above relation is identical to eqn (5.7). It shows that a better chromosome has a higher probability of being selected. Note that the user-defined parameter q is the indication of selective pressure. Larger values of q imply stronger selective pressure, which may result in premature convergence. On the other hand, with lower values of q, GAs tend to converge slowly but may explore the search space more thoroughly.

Intelligent Road Design 99 The sampling process is now performed by generating a random number

] 1 , 0

c[

r . If rc falls in between the cumulative probabilities of the (k−1)th and kth chromosomes, then the kth chromosome is selected to reproduce offspring.

The procedure for selecting chromosomes to die is similar. The sampling process is performed on a regular sampling space, and eqn (5.7) is used again.

However, for replacement, a worse chromosome must have a higher selection probability than a better chromosome. Therefore, if we generate a random number, which indicates the kth chromosome is selected, then the actual chromosome selected to die is the (npk+1)th chromosome. Also, if k is equal to np, then we must regenerate a random number because the best chromosome is never selected to die. This elitism model guarantees the search is non-deteriorating. That means that after the GA starts to run, the best chromosome in the population will evolve to become more adapted to the environment of the problem, or at least will remain no worse than in the previous generation.

5.5 Genetic operators

It is important to mention that the relation between the genes in a chromosome and the corresponding alignment is indirect. Each gene in the chromosome is an intersection point in a 2 dimensional space, where the alignment is obtained by fitting circular curves at each intersection point. Moreover, the genes are not independent of each other because whenever the location of an intersection point is changed, the configuration of the alignment at other intersection points may change as well due to the curve fitting process.

The above properties make it more difficult to develop appropriate genetic operators. Moreover, the genes in a chromosome are encoded as floating-point (i.e., real) numbers. For these reasons, conventional operators do not work well in this situation. To facilitate the search, we must devise problem-specific genetic operators. Eight kinds of operators are proposed in the proposed solution algorithm. We will discuss them in turn.

5.5.1 Uniform mutation

For most applications of GAs, where the genes are encoded as real numbers, the uniform mutation is performed by randomly selecting a gene and replacing its value with a randomly selected real number. Let the chromosome to be mutated be Λ=[λ12,...,λn] and the kth gene be selected to apply the operator (i.e.,

] , 1 [ n r

k= d ). Then λ will be replaced by k λk′ =rc[dkL,dkU].

Recall that mutation operators are supposed to help in exploring the entire search space and are often seen as background operators to maintain genetic diversity in the population. Unfortunately, the simple mutation operator does not work as expected in our proposed model. To illustrate this, let us consider the situation shown in Figure 5.1.

100 Intelligent Road Design

λk

λk

Legend

Alignment before mutation Alignment after mutation

High cost field Vertical cutting lines

+1

λk

1

λk

2

λk

Figure 5.1: An example of a failure mutation.

In the above figure, the corresponding alignment of the chromosome passes through a high cost field. Suppose that λ is selected to mutate and the resulting k new allele of the gene is λk′. The figure shows that the new alignment is even worse than the original one. We may expect next time λ , k2 λ , and k1 λ will k+1 be selected to undergo mutation operators so that the corresponding alignment can jump out of the high cost field. However, before these adjacent genes are selected to mutate, the chromosome might die off because the new chromosome is worse and more likely to be selected to die. In fact, as the GA evolves, the final solution will be the one passing through the high cost field at minimal distance. Obviously it is not the global optimum, but just a local optimum.

A solution to this problem is to design the operator in such a way that the corresponding alignment of the chromosome has the potential to jump out of the high cost field at once. The operator is then modified by generating another two independent loci i and j in addition to k, where i=rd[0,k−1] and

] 1 , 1

[ + +

=r k n

j d , such that the corresponding intersection points of λ and i λ k are connected by straight-line segments, and so are the corresponding points of λ and k λ . Note that here locus = 0 represents the starting point j S of the alignment, and locus = n+1 denotes the end point E. We will name this procedure “elimination” because it is analogous to eliminating the curves between the ith and kth intersection points as well as those between the kth and

jth intersection points. We now summarize the elimination procedure as follows:

Intelligent Road Design 101

Algorithm 5.2 Curve elimination procedure for Model 1

In document 1Intelligent Road Design (Page 118-122)