Intelligent Systems II · M2 · papers
Q2(a) PSO, one iteration [10]
Final examination · 24 Nov 2025
Longer past-paper questions on Fuzzy, GA and PSO. Original TEE marks retained; not the M2 paper pattern.
Question. Maximize LaTeX:
F(x_1,x_2)=2x_1^2-3x_1x_2+x_2^2+5x_1+2x_2+7 using Particle Swarm Optimization. LaTeX:
X=\begin{bmatrix}2.5&-3.0\\3.5&-1.5\end{bmatrix},\;V=\begin{bmatrix}0.2&0.3\\0.1&0.25\end{bmatrix}. Take LaTeX:
W=0.9,\;c_1=c_2=1.5,\;r_1=0.5949,\;r_2=0.0855. Optimize and give the solution after 1 iteration showing the step-by-step process. [10 marks]
Answer
Given
Particle 1: LaTeX:
x=(2.5,\,-3.0), LaTeX:
v=(0.2,\,0.3). Particle 2: LaTeX:
x=(3.5,\,-1.5), LaTeX:
v=(0.1,\,0.25).
c_1r_1=1.5\times0.5949=0.89235,\qquad c_2r_2=1.5\times0.0855=0.12825To find
Fitness, pbest, gbest; new velocities and positions; updated pbest and gbest.
Formula and why it applies
v_{ij}\leftarrow wv_{ij}+c_1r_1(p^b_{ij}-x_{ij})+c_2r_2(p^g_j-x_{ij}),\qquad x_{ij}\leftarrow x_{ij}+v_{ij}Each particle is pulled by its own memory and by the swarm's best; we maximise, so the larger LaTeX:
F is better.
Solution
Step 1. Fitness of particle 1
F(2.5,-3)=2(6.25)-3(2.5)(-3)+9+5(2.5)+2(-3)+7=12.5+22.5+9+12.5-6+7=57.5Step 2. Fitness of particle 2
F(3.5,-1.5)=2(12.25)-3(3.5)(-1.5)+2.25+17.5-3+7=24.5+15.75+2.25+17.5-3+7=64Step 3. pbest and gbest
| Particle | Position | F | pbest |
|---|---|---|---|
| 1 | (2.5, −3.0) | 57.5 | (2.5, −3.0) |
| 2 | (3.5, −1.5) | 64 | (3.5, −1.5) |
No previous iteration, so pbest = current position. Largest fitness is 64, so gbest = (3.5, −1.5).
Step 4. Velocity and position of particle 1
v_{11}=0.9(0.2)+0.89235(2.5-2.5)+0.12825(3.5-2.5)=0.18+0+0.12825=0.30825x_{11}=2.5+0.30825=2.80825v_{12}=0.9(0.3)+0.89235(0)+0.12825(-1.5-(-3.0))=0.27+0.192375=0.462375x_{12}=-3.0+0.462375=-2.537625Step 5. Velocity and position of particle 2 (it is gbest, so both pull terms are 0)
v_{21}=0.9(0.1)+0+0=0.09,\qquad x_{21}=3.5+0.09=3.59v_{22}=0.9(0.25)+0+0=0.225,\qquad x_{22}=-1.5+0.225=-1.275Step 6. New fitness
F(2.80825,-2.537625)=15.772536+21.378856+6.439541+14.04125-5.07525+7=59.5569F(3.59,-1.275)=25.7762+13.73175+1.625625+17.95-2.55+7=63.5336Step 7. Update pbest and gbest
| Particle | New position | New F | Old pbest F | pbest after iteration |
|---|---|---|---|---|
| 1 | (2.80825, −2.537625) | 59.5569 | 57.5 | (2.80825, −2.537625) — improved |
| 2 | (3.59, −1.275) | 63.5336 | 64 | (3.5, −1.5) — kept |
The best pbest fitness is still 64, so gbest stays (3.5, −1.5).
V=\begin{bmatrix}0.30825&0.462375\\0.09&0.225\end{bmatrix}, X=\begin{bmatrix}2.80825&-2.537625\\3.59&-1.275\end{bmatrix}. After one iteration particle 1 improved to F = 59.5569; the best solution so far is gbest = (3.5, −1.5) with F = 64.Official key: fitness and gbest (5 marks), velocity and position updates (5 marks). The calculations above use the question data. The key's summary matrix writes 0.462 in place of 2.808 for LaTeX:
x_{11}; that is a copying slip.