Assignment 7
Assignment 7
In this assignment we will code the particle swarm algorithm to solve the following optimization problem:
\[ \min_{x_1, x_2} f(x_1, x_2) = x^2_1+2x^2_2-0.3\cos\left(3 \pi x_1\right)-0.4\cos\left(4 \pi x_2\right)+0.7 \]
where, \(-50\leq x_i \leq 50\), \(f_{min}(x_1^*, x_2^*)=0\), \(x_1^*=0\), \(x_2^*=0\).
This is known as Bohachevsky’s Function No.01.
Tasks
- Read PSO algorithm from Internet (20 minutes)
- Discussion on the Particle Swarm Algorithm (15 minutes)
- Write the pseudocode (10 minutes)
- Discussion on the pseudocode (15 minutes)
- Write the code (30 minutes)
- Test the code (10 minutes)
- Discussion and comparison of various ways implementations