0% found this document useful (0 votes)
14 views

Assignment 3 GA

This document provides guidelines for an assignment using genetic algorithms to find the global maximum of three functions: f1, f2, and f3. Students are asked to: 1) Use genetic algorithms to find the global maximum and corresponding maximizer of f1, f2, and f3. 2) Output tables and plots showing the best solution and fitness at each iteration, the best solution over iterations, and the global maximum found over 100 runs. 3) Calculate the average and standard deviation of the global maxima found over the 100 runs.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Assignment 3 GA

This document provides guidelines for an assignment using genetic algorithms to find the global maximum of three functions: f1, f2, and f3. Students are asked to: 1) Use genetic algorithms to find the global maximum and corresponding maximizer of f1, f2, and f3. 2) Output tables and plots showing the best solution and fitness at each iteration, the best solution over iterations, and the global maximum found over 100 runs. 3) Calculate the average and standard deviation of the global maxima found over the 100 runs.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA

Department of Electrical Engineering


Soft Computing Techniques (EE6243)
Session: 2023 - 2024 (Autumn)
B.Tech, M.Tech., Ph.D

Assignment 3: Genetic Algorithm

AL INSTITUTE OF TECHNOLOGY
Programming (Optional):
ROURKELA
1. Find the global maxima and the corresponding maximizer of function f 1 , f2 , f3 using Genetic Algorithm.

f1 = 150 − (x2 − 20 cos(πx) + 10)


( )
1 2
f2 = 4− x − cos(x) + 1
50
sin2 (x) − 0.5
f3 = 0.5 −
(1 + 0.001x2 )2

Consider the following design criteria:


• x ∈ [−10, 10].
• Accuracy level: upto third decimal point.
• Probability of mutation = 5%.

Guidelines:

1. Decide the string length q.


2. Let a solution string be represented by an 1 × q row vector b in MATLAB, where the last element (b(q))
represents the least significant bit and the first element (b(1)) denotes the most significant bit of the
binary number. Write a function x = binary2decimal(b, xl , xu , q) that decodes the binary string and
returns the corresponding decimal value based on xl , xu and q.
3. Write a function y = fn1(x) / y = fn2(x) / y = fn3(x) that returns the objective function value for x.
4. Initialize the population using uniformly distributed random numbers. You may declare a N × q matrix
B that stores the set of solution strings in the population, in which each row represents a particular
solution string.
5. Find fitness value for each solution string. Store these in an N × 1 vector F .
6. Perform reproduction and selection based on Roulette Wheel method. For this, you may store the
probability values in a column vector P , cumulative probabilities in a vector CP and the ranges for
selections in a N × 2 matrix Range. Update the population B executing selection process.
7. Randomly select mating pairs from B and perform single point crossover. Select crossover site randomly
for each mating pair. Store new offsprings in N × q matrix Bd.
8. Append Bd to B and store in Bdd (2N × q matrix). Find fitness values for all solution strings in Bdd.
Select best N solution strings from Bdd and store that in B.
9. Perform mutation on B.
10. Repeat Step 5 - Step 9 until maximum iterations is reached.
EE6243 Assignment 3 Page 2 of 2

Output: For the given optimization problems

1. Make a table indicating

• Iteration number k.
• Best solution string.
• Corresponding fitness value.
2. Plot best fitness value Vs. k.

3. Plot best solution Vs. k.


4. Run the program (GA) 100 times and note the global maxima generated in each run (denote different
trials as run-1, run-2, . . . run-100).
5. Plot global maxima Vs. run-number.

6. Find the average value and the standard deviation of the set of global maxima obtained in 4.

Last date of evaluation: 17th October 2023.

You might also like