1. Consider the following function:
(a) The genetic algorithm is used to find the peak of the function 𝑓(𝑥). Each solution
is represented as an 8-bit chromosome, and the number of individuals in a
population is 4. The initial population is given in the following table:
Determine the respective values 𝑥 of the four individuals.
(b) It is given that 𝑓(𝑥) > 0. Explain why 𝑓(𝑥) can be used as the fitness function.
Assuming that the roulette wheel selection is adopted, complete the following
(c) The one-point crossover operator is adopted, with crossover probability 𝑝𝑝𝑐𝑐 =
0.8. The mutation probability 𝑝𝑚 = 0.1. Four new individuals are generated for
the new generation. In the selection of a pair of parents for crossover, if the
second selected individual is the same as the first selected one, the selection
of the second individual is performed again. Determine the four individuals for
the next generation.
(d) If elitism is employed in (c), determine the four individuals in the next
(e) Repeat (c), if the tournament selection with 𝑘 = 2 is used, i.e., two distinct
individuals are selected randomly with uniform probability compete in any
(f) The global best PSO is now used to find the peak of the function 𝑓(𝑥). The
population size is still four, and the four initial particles are the four initial
individuals given in (a). The 𝑖-th particle is denoted as xi(t), where i = 1, 2, 3, 4
and t = 1 initially. The initial velocity of all the particles is zero, i.e., 𝑣𝑖(1) = 0.
The following parameters are given:
Inertia weight: w = 0.9,
Acceleration factors: c1 = 2, c2 = 2,
The maximum velocity: Vmax = 3, and
Maximum number of iterations: Nmax = 2.
Determine the best solution obtained by the algorithm.
EasyDue™ 支持PayPal, AliPay, WechatPay, Taobao等各种付款方式!
E-mail: firstname.lastname@example.org 微信:easydue