# Q5(a) PSO inspiration, parameters and one iteration [10]

Subject: Intelligent Systems II

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/is2/#tee/papers/paper-2024-final/q5a

Canonical: https://deep-learning-study-room.vercel.app/read/is2/tee/papers/paper-2024-final--q5a/

Actual historical paper ·100 marks attempted /140 offered · Q1 compulsory + any four of Q2–Q7. Source defects and solution assumptions are explicitly identified.

**Question. Q5(a)** [10 marks · 2024-04-17]

With reference to PSO: (1) justify its inspiration; (2) list and briefly explain its parameters; (3) minimize f (x)=3x²+4x+10 with five particles initially at −9, −6, −2, 8, 10. Assume suitable parameter values and estimate positions after one iteration.

### Answer

PSO is inspired by coordinated movement in bird flocks/fish schools. Each particle remembers its own best position and responds to the swarm’s best position. A particle is one candidate solution, not one coordinate of a single shared solution.

| Symbol | Meaning |
| --- | --- |
| xᵢ | Current position / candidate solution |
| vᵢ | Velocity / proposed movement |
| pbestᵢ | Best position visited by this particle |
| gbest | Best position visited by the swarm |
| w | Inertia, retains part of previous velocity |
| c₁, c₂ | Cognitive and social acceleration weights |
| r₁, r₂ | Random multipliers in [0,1] |
| N / limit | Number of particles / stopping condition |

#### Given

Five positions and objective as printed. The question explicitly permits parameter assumptions.

#### To find

Updated velocities, positions, fitnesses and best records after one synchronous iteration.

#### Formula and why it applies



$$
v_i^{new}=wv_i+c_1r_1(pbest_i-x_i)+c_2r_2(gbest-x_i),\quad x_i^{new}=x_i+v_i^{new}
$$



For minimization, a smaller objective is better. Freeze gbest while moving the entire swarm; update best records only after evaluating the new positions.

#### Solution

**Source / assumption note.** Assume vᵢ=0, pbestᵢ=xᵢ, w=0.5, c₁=c₂=1 and r₁=r₂=0.5 for all particles during this iteration. Other valid stated assumptions can produce other answers.

##### Step 1. Evaluate all initial candidates

| Particle | x | 3x²+4x+10 |
| --- | --- | --- |
| 1 | -9 | 243 + (-36) + 10 = 217 |
| 2 | -6 | 108 + (-24) + 10 = 94 |
| 3 | -2 | 12 + (-8) + 10 = 14 |
| 4 | 8 | 192 + (32) + 10 = 234 |
| 5 | 10 | 300 + (40) + 10 = 350 |

Smallest value is 14 at x=−2, so freeze gbest=−2.

##### Step 2. Simplify the velocity formula

Initial velocity is zero and pbest equals the current position; therefore inertia and cognitive terms are both zero.



$$
v_i^{new}=0.5(-2-x_i)
$$



##### Step 3. Calculate every new velocity and position

| Particle | Velocity calculation | New position | New fitness |
| --- | --- | --- | --- |
| 1 | 0.5×(−2−(-9))=3.5 | -9+(3.5)=-5.5 | 78.75 |
| 2 | 0.5×(−2−(-6))=2 | -6+(2)=-4 | 42 |
| 3 | 0.5×(−2−(-2))=0 | -2+(0)=-2 | 14 |
| 4 | 0.5×(−2−(8))=-5 | 8+(-5)=3 | 49 |
| 5 | 0.5×(−2−(10))=-6 | 10+(-6)=4 | 74 |

##### Step 4. Update best records

New positions are [−5.5,−4,−2,3,4], with objective values [78.75,42,14,49,74]. Every nonbest particle improves its own value, so its pbest becomes its new position; particle 3 remains −2. gbest is still −2 with value 14.

The analytical minimum is at x=−2/3 with f=26/3, but one PSO iteration has not reached it. Do not report the analytical optimum as the swarm’s achieved result.

**Final answer.** After one stated-assumption iteration: positions [−5.5,−4,−2,3,4]; swarm best x=−2, f=14.
