~ 𝑈 −1, 1 "#$, 𝑝! ← 𝑥! (∀𝑖 ∈ {1, ⋯ , Size}) 𝑝% ← argmin &!∈{&",⋯,&#$%&} 𝑓(𝑝! ) for 𝑙 = 1 to 𝐿$,- do for 𝑖 = 1 to Size do 𝑣!,. ← 𝑤𝑣!,. + 𝑐/ 𝑟/,. (𝑝!,. − 𝑥!,. ) + 𝑐0 𝑟0,. (𝑝. % − 𝑥!,. ) where 𝑟/,. , 𝑟0,. ∼ 𝑈(0, 1) (∀𝑑 ∈ {1, ⋯ , Dim}) 𝑥! ← 𝑥! + 𝑣! if 𝑓(𝑥! ) < 𝑓(𝑝! ) then 𝑝! ← 𝑥! fi if 𝑓(𝑥! ) < 𝑓(𝑝%) then 𝑝% ← 𝑥! fi od od Particle Swarm Optimization (PSO) for Minimizing 𝑓(𝑥) Dim: Dimension of 𝑥> Size: Particle size 𝑈(): Uniform distribution