Challenge

Week 4.1 - Genetic Algorithm

Step by step explanation:

First we need to create a dataset of x and y where we get the parent species from where the genetic algorithm can

be performed. the following code shows how the dataset is created of x and y array data

Study 1:

Now while performing first study we are going to analyse and calculate the statistical behaviour of GA. There is a for

loop here where we can use the ga on stalagmite function to reduce the reduction of the function. we have tic and

toc operator to achieve time taken o process the species and their values. we used subplot display the result in a

single window. Over each interaction and to plot the same we used another operator names as plot3. By adding the

-ve sign we can achieve the global maxima as we discussed earlier in function code.

Study2:

Here we have study 2 where we again perform statistical behaviour with ub and lb i.e upper bounds and lower

bounds with some constraint on the solution. UB and LB helps us to improve the optimisation on X which is to be

calculated. Consequently its showed us better result form the first case and the points are lowered and iterations is

optimises compared to the first study.

Study3:

Here in the third study we have another constraint used and known as options as it helps us increase the population

to increase the size. Getting the local minima and maxima is common in previous studies but by increasing the

population/iterations and decreasing iteration

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.