Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 Part A: Initial search landscapes 1 . 1 One - max problem Consider the simple case of evolving a string that contains all 1
Part A: Initial search landscapes
Onemax problem
Consider the simple case of evolving a string that contains all s in every lo
cation. Let the length of the strings be The initial population should be
randomly created. Use standard mutation and onepoint crossover. The fitness
of a solution is the number of s in the string.
Plot the average fitness of the population versus the generations passed.
This exercise is to show the operation of a genetic algorithm. We know the
optimal solution in advance. This represents a very easy search landscape and
is included to illustrate the operation of a genetic algorithm.
When plotting the average fitness, you dont need to write code to do the plot
ting; feel free to output the values to a textcsv file and use excel, gnuplot or
other to plot the results.
Evolving to a target string
This is the same as before but instead of evolving to a string of s the population
will evolve to find some target string.
Define a target string a sequence of s and s and adopt the same approach
as before with an appropriate fitness function number of matching values Plot
the average fitness as before.
Deceptive Landscape
Modify the fitness function from the onemax problem, such that the fitness
function is equal to the number of s in the string for all cases except when
there are no
tt s present. In this case, the fitness should be times length of the solution
Plot the average fitness over time.
This problem represents a deceptive problem and should be very hard for
the GA to find the optimal.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started