Date post: | 14-Apr-2018 |
Category: |
Documents |
Upload: | roberto-pinheiro-domingos |
View: | 244 times |
Download: | 0 times |
of 42
7/30/2019 Binary PSO
1/42
B i n a r y P a r t i c l e S w a r m O p t i m i s e r s : t o o l b o x ,
d e r i v a t i o n s , a n d m a t h e m a t i c a l i n s i g h t s
M a u r i c e . C l e r c @ W r i t e M e . c o m
J a n u a r y 5 , 2 0 0 7
2 0 0 5 - 0 2 - 0 2
A b s t r a c t
A c a n o n i c a l P a r t i c l e S w a r m O p t i m i s a t i o n m o d e l r e q u i r e s o n l y t h r e e
a l g e b r a i c o p e r a t o r s , n a m e l y m o d i f y i n g a v e l o c i t y , c o m b i n i n g t h r e e v e -
l o c i t i e s , a n d a p p l y i n g a v e l o c i t y t o a p o s i t i o n , w h i c h c a n h a v e a l o t o f
e x p l i c i t t r a n s c r i p t i o n s . I n p a r t i c u l a r , f o r b i n a r y o p t i m i s a t i o n , i t i s p o s s i -
b l e t o d e n e a t o o l b o x o f s p e c i c o n e s , a n d t o d e r i v e t h e n s o m e l a c a r t e
o p t i m i s e r s t h a t c a n b e , f o r e x a m p l e , e x t r e m e l y e c i e n t o n l y o n s o m e k i n d
o f p r o b l e m s , o r o n t h e c o n t r a r y j u s t r e a s o n a b l y e c i e n t b u t v e r y r o b u s t .
F o r a m a t h e u r s w h o w o u l d l i k e t o b e t t e r u n d e r s t a n d t h e b e h a v i o u r o f
b i n a r y P S O a l g o r i t h m s a n A p p e n d i x g i v e s s o m e t h e o r e t i c a l r e s u l t s .
1 C a n o n i c a l P S O a n d B i n a r y m o d e l
1 . 1 C a n o n i c a l P S O
A d e t a i l e d d e s c r i p t i o n c a n b e f o u n d i n [ C L E 0 4 ] . L e t ' s g i v e h e r e j u s t
a q u i c k o n e . A s u s u a l l y , i n a s e a r c h s p a c e o f d i m e n s i o n D
, w e h a v e
t h e f o l l o w i n g D - v e c t o r s f o r a g i v e n p a r t i c l e :
t h e p o s i t i o n x t h e v e l o c i t y v t h e b e s t p r e v i o u s p o s i t i o n p t h e b e s t p r e v i o u s p o s i t i o n g f o u n d i n i t s i n f o r m a n t g r o u p .
W e a s s u m e h e r e t h e i n f o r m a t i o n l i n k s a r e i n i t i a l i s e d a t r a n d o m , a n d
r e - i n i t i a l i s e d t h e s a m e w a y a f t e r e a c h n o n e c i e n t i t e r a t i o n
( i . e . t h e
b e s t t n e s s v a l u e i s s t i l l t h e s a m e ) , e x c e p t b e l o w f o r D e r i v a t i o n 1 0 0
t h a t u s e s t h e c l a s s i c a l c i r c u l a r n e i g h b o u r h o o d . M o r e p r e c i s e l y , e a c h
p a r t i c l e i n f o r m s i t s e l f a n d c h o o s e a l s o a t r a n d o m K 1 p a r t i c l e s t o
i n f o r m s . S o , c o n v e r s e l y , i t i s i m p o r t a n t t o n o t e t h a t e a c h p a r t i c l e i s
i n f o r m e d b y a n u m b e r o f p a r t i c l e s t h a t i s n o t n e c e s s a r y e q u a l t o K
.
1
http://hal.archives-ouvertes.fr/7/30/2019 Binary PSO
2/42
P o s i t i o n s a n d v e l o c i t i e s a r e i n i t i a l i s e d a t r a n d o m a s u s u a l l y . A f t e r
t h a t , a t e a c h t i m e s t e p , e a c h m o v e o f a p a r t i c l e i s c o m p u t e d b y c o m -
b i n i n g t h r e e t e n d e n c i e s :
1 . k e e p i n g s o m e d i v e r s i t y , i . e . m o d i f y i n g t h e v e l o c i t y . M o s t o f t h e t i m e , i n
c l a s s i c a l P S O , t h e d i r e c t i o n i s n o t m o d i e d
2 . g o i n g b a c k m o r e o r l e s s t o w a r d s t h e b e s t p r e v i o u s p o s i t i o n p, i . e . c h o o s i n g a p o i n t " a r o u n d " p, u s u a l l y b y m o d i f y i n g t h e v e c t o r p x
3 . g o i n g m o r e o r l e s s t o w a r d s t h e b e s t p r e v i o u s p o s i t i o n
go f t h e i n f o r m a n t s ,
i . e . c h o o s i n g a p o i n t " a r o u n d " g , u s u a l l y b y m o d i f y i n g t h e v e c t o r g x
T h i s c o m b i n a t i o n g i v e s a n e w v e l o c i t y t h a t i s a d d e d t o t h e c u r r e n t
p o s i t i o n t o o b t a i n t h e n e w o n e . T h i s n e w p o s i t i o n i t s e l f m a y b e u p -
d a t e d t o t a k e s o m e c o n s t r a i n t s i n t o a c c o u n t . T h e m o s t c o m m o n o n e s
a r e " i n t e r v a l c o n s t r a i n t s " : f o r e a c h d i m e n s i o n , t h e p o s i t i o n c o m p o -
n e n t h a s t o b e i n a g i v e n i n t e r v a l ( c o n t i n u o u s o r d i s c r e t e ) . M o r e
g e n e r a l l y , l e t ' s d e n e ak a s a p o s t - c o n s t r a i n t k a p p l i e d t o t h e v e c t o r
a.
T h e p r o c e s s c a n b e s u m m a r i s e d b y
v vpgx x vx xv v
o r
v vpgv vx x vx x
w h e r e akm e a n s m o d i f y t h e v e c t o r
ab y u s i n g a g i v e n m e t h o d
k
abc m e a n s c o m b i n e t h e t h r e e v e c t o r s a , b, a n d c
a b m e a n s a d d t h e t w o v e c t o r s a a n d b .
I n t h e r s t f o r m , t h e v e l o c i t y i s a d d e d t o t h e p o s i t i o n a n d c o n -
s t r a i n e d o n l y a f t e r t h a t
f o r t h e n e x t i t e r a t i o n , a s i n t h e s e c o n d f o r m ,
i t i s c o n s t r a i n e d b e f o r e
t o b e u s e d t o m o d i f y t h e p o s i t i o n .
F o r e x a m p l e , t h e c l a s s i c a l P S O e q u a t i o n s a r e vd c1vd + rand (0, c) (pd xd) + rand (0, c) (gd xd)xd = xd + vd
2
7/30/2019 Binary PSO
3/42
F o r t h i s a l g o r i t h m , w e h a v e t h e f o l l o w i n g o p e r a t o r d e n i t i o n s :
i s m u l t i p l y e a c h c o m p o n e n t b y t h e s a m e c o e c i e n t c1 ( t h e d i r e c t i o n i s t h e n n o t m o d i e d )
a p p l i e d t o a , m u l t i p l y e a c h c o m p o n e n t o f ax b y a r a n d o m n u m b e r ( u n i f o r m d i s t r i b u t i o n ) b e t w e e n 0 a n d
c
i s i d e n t i c a l t o
i s a d d t h e t h r e e v e c t o r s
i s a d d t h e t w o v e c t o r s
1 . 2 T o o l b o x
N o w w e h a v e t o g i v e s o m e p r e c i s e d e n i t i o n s o f t h e d i e r e n t o p e r a t o r s
f o r b i n a r y o p t i m i s a t i o n . N o t e t h a t t h e r e i s a l w a y s a t l e a s t t h e i n t e r v a l
c o n s t r a i n t xd {0, 1} . I n t h e t a b l e 1 y o u c a n s e e a s e t o f p o s s i b l e
o p e r a t o r s . T h e mod+
f u n c t i o n i s a m o d u l o f u n c t i o n g i v i n g o n l y n o n
n e g a t i v e v a l u e s . B y c h o o s i n g t h r e e o p e r a t o r s i n c o l u m n A , o n e i n
c o l u m n B , o n e i n c o l u m n C , a n d t w o i n c o l u m n D , y o u c a n d e n e a
n e w k i n d o f b i n a r y o p t i m i s e r . F o r e x a m p l e , a n a l g o r i t h m A 1 - A 1 - A 3 -
B 1 - C 1 - D 1 ( w h i c h i s t h e p i v o t m e t h o d d e n e d b e l o w a s D e r i v a t i o n
1 1 ) c a n b e d e s c r i b e d a s f o l l o w s :
d o n ' t u s e
v
d o n ' t u s e p
m o d i f y a t r a n d o m a c o n s t a n t b i t n u m b e r o f g
u s e t h e m o d i e d g a s t h e n e w p o s i t i o n
3
7/30/2019 Binary PSO
4/42
A :
a B : abc C : a b D : a
1 n o t h i n g
c b a2
a a + b + c a + b IN T (a) mod+23 m o d i f y a t r a n -
d o m n b i t s , w i t h n r a n d o m l y c h o - s e n b e t w e e n 1
a n d a c o n s t a n t
v a l u e
p r o b a b i l i s t i c
c h o i c e u s i n g
adbdcd
1 + IN T(a) mod 3
4 m o d i f y a t r a n -
d o m n b i t s w i t h n r a n d o m l y c h o - s e n b e t w e e n 1
a n d a d e c r e a s i n g
v a l u e
m a j o r i t y
c h o i c e u s i n g
adbdcd
p r o b a b i l i s t i c m a p p i n g
u = 11+ear = rand (0, 1)
u > r 1u r 0
5 m u l t i p l y e a c h
b i t b y a d i e r e n t
r a n d o m n u m b e r
p r o b a b i l i s t i c
c h o i c e u s i n g
bdcd6 m u l t i p l y e a c h
b i t b y t h e s a m e
r a n d o m n u m b e r
m a j o r i t y
c h o i c e u s i n g
bdcd7 m u l t i p l y e a c h
b i t b y t h e
s a m e c o n s t a n t
n u m b e r
T a b l e 1 : T o o l b o x e x a m p l e f o r B i n a r y P S O . Y o u c a n d e n e a n a l g o r i t h m b y
p i c k i n g u p o p e r a t o r d e n i t i o n s i n e a c h c o l u m n . H o w e v e r , y o u s t i l l h a v e t o
p r e c i s e s o m e d e t a i l s , f o r e x a m p l e t h e d e c r e a s i n g r u l e f o r t h e r a n d o m n u m b e r
o f b i t s t o s w i t c h . A l s o s o m e c h o i c e s , l i k e u s i n g o n l y l i n e 1 , a r e c o m p l e t e l y
u n i n t e r e s t i n g
N o t e t h a t s o m e c h o i c e s a r e m e a n i n g l e s s o r n o t c o n s i s t e n t . F o r e x a m -
p l e , w i t h A 2 - A 2 - A 2 - B 1 - C 1 - D 1 - D 1 t h e p a r t i c l e s d o n o t m o v e a t a l l !
A l s o , c l e a r l y , D 3 d o e s n o t m a k e s e n s e i f a p p l i e d t o a p o s i t i o n , a s i t
d o e s i f a p p l i e d t o a v e l o c i t y , k e e p i n g i t i n {1, 0, 1}
. S o m e c h o i c e s s t i l l
h a v e t o b e m o r e d e t a i l e d , b y g i v i n g t h e p r e c i s e r u l e s , f o r e x a m p l e
f o r t h e p r o b a b i l i s t i c c h o i c e , o r t h e r a n d o m n u m b e r o f b i t s t o m o d i f y .
W e w i l l s e e t h a t i n t h e D e r i v a t i o n s e c t i o n . H o w e v e r , w e h a v e r s t
t o d e c i d e o n w h a t k i n d o f p r o b l e m s t h e r e s u l t i n g o p t i m i s e r s w i l l b e
t e s t e d .
4
7/30/2019 Binary PSO
5/42
2 B e n c h m a r k s
2 . 1 S o m e d e c e p t i v e d e c e p t i v e p r o b l e m s
I n b i n a r y o p t i m i s a t i o n , i t i s v e r y e a s y t o d e s i g n s o m e a l g o r i t h m s t h a t
a r e e x t r e m e l y g o o d o n s o m e b e n c h m a r k s ( a n d e x t r e m e l y b a d o n s o m e
o t h e r s ) . I t m e a n s w e h a v e t o b e v e r y c a r e f u l w h e n w e c h o o s e a t e s t
f u n c t i o n s e t . I t i s n o t r a r e t h a t s o m e a u t h o r s u s e a t o o s m a l l b e n c h -
m a r k s e t a n d c o n c l u d e a b i t t o o r a p i d l y t h a t t h e i r a l g o r i t h m i s a n
i m p r o v e m e n t . F o r e x a m p l e , t h e b e n c h m a r k u s e d i n [ A L K 0 2 ] i n o r -
d e r t o p r e s e n t t h e M - D i P S O a l g o r i t h m c o n t a i n s o n l y t h r e e p r o b l e m s
( d e s c r i b e d b e l o w ) t h a t t h e a u t h o r s c a l l " d e c e p t i v e " . B y c o m p a r i n g
M - D i P S O t o a g e n e t i c a l g o r i t h m , t h e a u t h o r s c o n c l u d e t h a t t h e i r
m e t h o d i s b e t t e r .
W h a t i s w r o n g i n t h i s a p p r o a c h ? T h e p o i n t i s t h e t h r e e p r o b l e m s
t h e y h a v e c h o s e n a r e i n f a c t w h a t w e c o u l d c a l l " d e c e p t i v e d e c e p t i v e
p r o b l e m s " . I d o n o t s a y M - D i P S O i s n o t g o o d , I j u s t s a y t h i s p a p e r
d o e s n o t r e a l l y p r o v e i t ( p a r t i c u l a r l y f o r t h e r e a r e n o t e n o u g h d e t a i l s
t o r e c o d e t h e a l g o r i t h m , s o t h e r e i s n o w a y t o r u n i t o n o t h e r p r o b -
l e m s ) . A s w e w i l l s e e , t h e s e p r e c i s e p r o b l e m s c a n b e s o l v e d e x t r e m e l y
q u i c k l y b y s o m e s i m p l e P S O d e r i v a t i o n s . I n t h e f o l l o w i n g , |y|
d e n o t e s
t h e s u m o f t h e b i t s o f t h e s t r i n g y
.
2 . 1 . 1 G o l d b e r g ' s o r d e r - 3
T h e t n e s s
fo f a b i t - s t r i n g i s t h e s u m o f t h e r e s u l t o f s e p a r a t e l y
a p p l y i n g t h e f o l l o w i n g f u n c t i o n t o c o n s e c u t i v e g r o u p s o f t h r e e c o m -
p o n e n t s e a c h :
f1 (x) =
0.9
i f|y| = 0
0.6 i f |y| = 10.3 i f |y| = 21.0 i f |y| = 3
F o r e x a m p l e , i f t h e s t r i n g i s
x = 010110101, t h e t o t a l v a l u e i s
f1 (010)+f1 (110) + f1 (101) = 0.9 + 0.3 + 0.3 = 1.5
I f t h e s t r i n g s i z e i s D
, t h e m a x i m u m v a l u e i s o b v i o u s l y D/3 , f o r t h e
s t r i n g 1111...111
. I n p r a c t i c e , w e w i l l t h e n u s e a s t n e s s t h e v a l u e
D/3 f s o t h a t t h e p r o b l e m i s n o w t o n d t h e m i n i m u m 0 .
2 . 1 . 2 B i p o l a r o r d e r - 6
T h e t n e s s i s t h e s u m o f t h e r e s u l t o f a p p l y i n g t h e f o l l o w i n g f u n c t i o n
t o c o n s e c u t i v e g r o u p s o f s i x c o m p o n e n t s e a c h :
5
7/30/2019 Binary PSO
6/42
f2 (y) =1.0 i f |y| = 0 o r 60.0 i f
|y
|= 1 o r 5
0.4 i f |y| = 2 o r 40.8 i f |y| = 3
S o t h e s o l u t i o n s a r e a l l c o m b i n a t i o n s o f s e q u e n c e s 6
x1
a n d6
x0
. I n
p a r t i c u l a r , 1111...111
a n d0000...000
a r e s o l u t i o n s . T h e m a x i m u m v a l u e
i s
D/6.
2 . 1 . 3 M h l e n b e i n ' s o r d e r - 5
T h e t n e s s i s t h e s u m o f t h e r e s u l t s o f a p p l y i n g t h e f o l l o w i n g f u n c t i o n
t o c o n s e c u t i v e g r o u p s o f v e c o m p o n e n t s e a c h :
f(y) =
4.0 i f y = 00000
3.0 i f y = 000012.0 i f y = 000111.0 i f y = 001113.5
i f
y = 111110.0
o t h e r w i s e
S o t h e s o l u t i o n i s 0000...000 a n d t h e m a x i m u m v a l u e i s 3.5D/5 .
2 . 2 S o m e o t h e r p r o b l e m s
2 . 2 . 1 C l e r c ' s Z e b r a 3
A s a l r e a d y s a i d , s o m e P S O b i n a r y d e r i v a t i o n s a r e t o o
g o o d o n t h e
t h r e e a b o v e p r o b l e m s . S o I d e s i g n e d a n o t h e r p r o b l e m , s l i g h t l y m o d i -
f y i n g t h e G o l d b e r g ' s o n e s , b u t t h a t r e a l l y d e c e i v e s t h e s e d e r i v a t i o n s .
T h e t n e s s
fo f a b i t - s t r i n g i s t h e s u m o f t h e r e s u l t o f s e p a r a t e l y
a p p l y i n g t h e f o l l o w i n g f u n c t i o n t o c o n s e c u t i v e g r o u p s o f t h r e e c o m -
p o n e n t s e a c h . I f t h e r a n k o f t h e g r o u p i s e v e n ( r s t r a n k = 0 ) :
fz3 (y) =
0.9 i f |y| = 00.6 i f |y| = 10.3 i f |y| = 21.0 i f |y| = 2
I f t h e r a n k o f t h e g r o u p i s o d d :
6
7/30/2019 Binary PSO
7/42
fz3 (y) = 1.0 i f |y| = 00.3 i f
|y
|= 1
0.6 i f |y| = 20.9 i f |y| = 2
S o , t h e s o l u t i o n p o i n t i s
111000111000...a n d t h e
m a x i m u m v a l u e i s D/3 . H e r e a g a i n , w e w i l l u s e i n p r a c t i c e a s t n e s s t h e v a l u e D/3 f s o t h a t t h e p r o b l e m i s n o w t o n d t h e m i n i m u m 0.
2 . 2 . 2 Q u a d r a t i c p r o b l e m
I t i s d e n e d b y
f(x) = |D + xQx|w h e r e
Qi s a D x D m a t r i x .
F o r c o n v e n i e n c e , w e c a n g e n e r a t e Q
a t r a n d o m , w i t h a g i v e n d e n s i t y o f
1 v a l u e s . N o t e t h a t w e u s e h e r e t h e c l a s s i c a l b i n a r y ( l o g i c a l ) a l g e b r a .
I n p a r t i c u l a r w e h a v e a2 = a, a n d a + a = 0 . S o t h e p r o b l e m i s i n
f a c t n o t t h a t d i c u l t , e v e n f o r l a r g e i n s t a n c e s , a l s o f o r t h e r e u s u a l l y
a r e s e v e r a l s o l u t i o n s . S o m e a u t h o r s d o s o l v e s o m e i n s t a n c e s w i t h 9000v a r i a b l e s [ G L O 0 2 ] , o n a t e n p r o c e s s o r s C r a y t h o u g h . I d o n ' t h a v e
o n e a t h a n d , j u s t a s m a l l l a p t o p , s o t h e e x a m p l e b e l o w w i l l b e f a r
m o r e m o d e s t , w i t h D = 100
.
2 . 2 . 3 M u l t i m o d a l p r o b l e m s
W e u s e h e r e t h e r a n d o m p r o b l e m g e n e r a t o r d e n e d i n [ K E N 9 8 ] .
T h e p a r a m e t e r s a r e t h e d i m e n s i o n D
a n d t h e n u m b e r o f p e a k s . T h e
m i n i m u m v a l u e i s 0.
F i r s t , t h e p e a k s a r e r a n d o m l y p u t o n t h e s e a r c h s p a c e . T h e
l a n d s c a p e i s d e n e d b y t h e f o l l o w i n g C c o d e :
f o r ( i = 0 ; i < p e a k s ; i + + )
f o r ( j = 0 ; j < D ; j + + ) l a n d s c a p e [ i ] [ j ] = r a n d ( ) & 0 1 ;
A f t e r t h a t , f o r e a c h p o s i t i o n x
, t h e t n e s s i s c o m p u t e d a s f o l l o w s :
f = 0 . 0 ;
f o r ( j = 0 ; j < p e a k s ; j + + )
{
f 1 = 0 . 0 ;
f o r ( k = 0 ; k < D ; k + + ) i f ( x [ k ] = = l a n d s c a p e [ j ] [ k ] ) f 1 + + ;
i f ( f 1 > f ) f = f 1 ;
}
f = 1 - f / ( d o u b l e ) D ;
7
7/30/2019 Binary PSO
8/42
3 B i n a r y P S O d e r i v a t i o n s
A c t u a l l y , I h a v e w r i t t e n a b o u t t w e n t y P S O d e r i v a t i o n s f o r b i n a r y
o p t i m i s a t i o n , f o r i t i s q u i t e e a s y b y u s i n g t h e t a b l e 1 . I p r e s e n t h e r e
j u s t t h e m o s t i n t e r e s t i n g o n e s ( t h e i r c o d e n u m b e r i s p u r e l y a r b i t r a r y ,
a n d r e f e r r i n g t o t h e C s o u r c e c o d e y o u c a n d o w n l o a d f r o m m y s i t e
M a t h s t u a b o u t P S O h t t p : / / c l e r c . m a u r i c e . f r e e . f r / p s o / i n d e x . h t m
) .
3 . 1 D e r i v a t i o n 0
A c c o r d i n g t o t h e t a b l e 1 i t s c o d i c a t i o n i s A 1 - A 5 - A 5 - B 2 - C 2 - D 2 - D 3 .
F o r t h i s r s t o n e , l e t ' s g i v e a m o r e c o m p l e t e e x p l a n a t i o n . A s a x
c o m p o n e n t i s e i t h e r 0 o r 1 , t o n d a n o t h e r v a l u e w e c a n a d d 0 , 1( m o d u l o 2) , o r 1 ( m o d u l o 2 ) . S o t h e i d e a i s t o u s e v e l o c i t i e s w h o s e c o m p o n e n t s h a v e j u s t t h e s e t h r e e p o s s i b l e v a l u e s
{1, 0, 1
}, a n d t o
c o m b i n e t h e t h r e e t e n d e n c i e s s o t h a t t h e r e s u l t i s a l w a y s 0 o r 1 j u s tb y u s i n g t h e m o d u l o f u n c t i o n . T h e p s e u d o - c o d e o f t h e a l g o r i t h m i s
g i v e n b e l o w .
F o r e a c h p a r t i c l e
I n i t i a l i s e e a c h
xc o m p o n e n t a t r a n d o m i n {0, 1} . S e t g =
xa n d
p = x .I n i t i a l i s e e a c h v c o m p o n e n t a t r a n d o m i n {1, 0, 1} .S a y t h e p a r t i c l e i n f o r m s i t s e l f .
I n i t i a l i s e i n f o r m a t i o n l i n k s a t r a n d o m t o w a r d s K1 p a r t i c l e s ( n o t n e c e s s a r i l y d i f f e r e n t ) . L o o p a s l o n g a s t h e s t o p c r i t e r i o n i s n o t s a t i s f i e d :
F o r e a c h p a r t i c l e
C h o o s e a t r a n d o m a c o e f f i c i e n t c2 i n {1, 1}C h o o s e a t r a n d o m a c o e f f i c i e n t
c3 i n {1, 1}F i n d t h e b e s t i n f o r m a n t ( t h e o n e t h a t h a s t h e b e s t p r e v i o u s p o s i t i o n
g)
A p p l y t h e f o l l o w i n g t r a n s f o r m a t i o n s : v v + c2 (p x) + c3 (g x)x x + vx (4 + x) mod 2v (3 + v) mod 3 1
C o m p u t e t h e f i t n e s s f(x)I f f(x) < f (p)t h e n p x
I f t h e r e h a s b e e n n o i m p r o v e m e n t o f t h e b e s t p o s i t i o n i n t h e w h o l e s w a r m , r e - i n i
A s u s u a l l y , t h e s t o p c r i t e r i o n i s e i t h e r " t h e s o l u t i o n h a s b e e n f o u n d "
o r " a g i v e n m a x i m u m n u m b e r o f e v a l u a t i o n s h a s b e e n d o n e . "
T h i s a l g o r i t h m l o o k s q u i t e s i m i l a r t o t h e c l a s s i c a l P S O . H o w e v e r ,
t h e r e i s a t r i c k , i t i s a l m o s t a h o a x f o r i t w o r k s e x t r e m e l y w e l l o n t h e
8
7/30/2019 Binary PSO
9/42
pd gd 0 10 0
rand{
0, 1}
1
rand {0, 1} 1
T a b l e 2 : C h o i c e o f t h e n e w xd v a l u e a t t h e m a j o r i t y f o r a l l p o s s i b l e v a l u e s o f t h e t w o b i t s pdgd
t h r e e a b o v e " d e c e p t i v e d e c e p t i v e " p r o b l e m s , a n d n o t a t a l l o n t h e
o t h e r s . T r y t o g u e s s w h y . . .
3 . 2 D e r i v a t i o n 7
T h i s o n e i s m o r e s e r i o u s . I t s c o d i c a t i o n i s A 1 - A 4 - A 4 - B 6 - C 1 - D 1 . T h e
s t r u c t u r e o f t h e a l g o r i t h m i s t h e s a m e a s i n D e r i v a t i o n 0 b u t h e r e t h e
v e l o c i t y i s n o t u s e d , a n d t h e t w o o t h e r t e n d e n c i e s a r e c o m p u t e d b y
m o d i f y i n g a t r a n d o m s o m e b i t s .
T h e n , f o r e a c h d i m e n s i o n d
, w e h a v e t o c h o o s e b e t w e e n t h r e e p o s s i b l e
v a l u e s . T h e n a l o n e i s c h o s e n " a t t h e m a j o r i t y " , a c c o r d i n g t o t h e
t a b l e 2
T o i m p r o v e t h e c o n v e r g e n c e , t h e n u m b e r s o f m o d i e d b i t s , i . e .
r e s p e c t i v e l y np , a n d ng , a r e r e g u l a r l y d e c r e a s e d , a c c o r d i n g t o t h e
n u m b e r o f e v a l u a t i o n s T
, i f t h e p r e v i o u s i t e r a t i o n g a v e a n
i m p r o v e m e n t ( t h e b e s t v a l u e f o u n d b y t h e s w a r m i s b e t t e r t h a n t h e
p r e v i o u s o n e ) . T h e f o l l o w i n g f o r m u l a s a r e n o t a r b i t r a r y , b u t n o t
r e a l l y p r o v e d e i t h e r , s o , f o r t h e m o m e n t , j u s t s a y t h e y a r e r u l e s o f
t h u m b :
A f t e r i n i t i a l i s a t i o n c0 = 0.5 l n (D)
ln(K)ln(S)
z = KSA t e a c h t i m e s t e p , i f n o i m p r o v e m e n t , z = z + z0
np =c0
ln(z)D
ng =
npln(K1) i f K > 2
np e l s e
3 . 3 D e r i v a t i o n 1 1
T h i s i s a s i m p l i c a t i o n a n d a b i n a r y a d a p t a t i o n o f t h e p i v o t m e t h o d
[ S E R 9 7 ] . A s w e h a v e s e e n , i t s c o d i c a t i o n i s A 1 - A 1 - A 3 - B 1 - C 1 - D 1 .
T h e i d e a i s t o j u s t l o o k " a r o u n d " t h e b e s t p r e v i o u s p o s i t i o n g
o f t h e
b e s t i n f o r m a n t , t h a t i s t o s a y t o m o d i f y a t r a n d o m a f e w n u m b e r o f
gc o m p o n e n t s . T h e b a s i c a l g o r i t h m i s t h e f o l l o w i n g
9
7/30/2019 Binary PSO
10/42
x g
IN T(ln(D))
1 + IN T (rand (1, ))c h o o s e a t r a n d o m c o m p o n e n t s o f x, a n d s w i t c h t h e m .
D i c u l t t o d e n e s o m e t h i n g m o r e s i m p l e ! I n p r a c t i c e , f o r s m a l l D
v a l u e s ( 20
) , i t i s s o m e t i m e s a g o o d i d e a t o k e e p
e q u a l t o 3
. I t i s
i m p o r t a n t t o n o t e t h a t d u e t o t h e i n t e g e r p a r t f u n c t i o n
IN T, t h e
v a l u e i s n e v e r e q u a l t o
+ 1. S o , f o r
= 3, w e c h o o s e 2 o r t h r e e
c o m p o n e n t s t o s w i t c h . T h e r e i s h e r e a s u b t i l i t y : i t d o e s n o t
m e a n
w e n e v e r s w i t c h j u s t o n e b i t , f o r t h e r e i s a s m a l l p r o b a b i l i t y t h a t t h e
c o m p o n e n t s c h o s e n a t r a n d o m a r e i n f a c t t h e s a m e . A c t u a l l y , t h e
m o r e i n t u i t i v e v a r i a n t w i t h rand (1, 2, . . . , )w o r k s s o m e t i m e s f a r
b e t t e r ( f o r e x a m p l e o n M u l t i m o d a l p r o b l e m ) , b u t a l s o s o m e t i m e s f a r
w o r s e : i t s e e m s i t i s l e s s r o b u s t .
3 . 4 D e r i v a t i o n 1 0 0
T h i s d e r i v a t i o n i s a n i m p r o v e m e n t o f t h e o r i g i n a l a l g o r i t h m d e n e d
b y J i m K e n n e d y a n d R u s s E b e r h a r t [ K E N 9 7 ] . I t s c o d i c a t i o n i s A 7 -
A 5 - A 5 - B 2 - C 2 - D 4 - D 1 . T h e o n l y d i e r e n c e c o m p a r e d t o t h e c l a s s i c a l
( h i s t o r i c a l ) c o n t i n u o u s P S O i s t h a t e a c h n e w c o m p o n e n t i s s e t t o 0 o r1 b y a p p l y i n g a s i g m o i d t r a n s f o r m a t i o n a n d a p r o b a b i l i s t i c r u l e .
A l s o , n o t e t h a t h e r e t h e i n f o r m a n t g r o u p i s u s u a l l y t h e c l a s s i c a l c i r c u -
l a r o n e , a n d i t i s c o m p u t e d j u s t o n c e , a t t h e b e g i n n i n g . F o r e x a m p l e ,
f o rK = 3 a n d i f t h e p a r t i c l e s a r e n u m b e r e d f r o m 0 t o S 1 , t h e i n -
f o r m a n t s o f t h e p a r t i c l e i
a r e p a r t i c l e s (i
1) mod+S, i , (i + 1) mod+S .O f c o u r s e , y o u c a n a l s o u s e i t w i t h t h e r a n d o m i n f o r m a t i o n l i n k s w e
h a v e d e n e d a b o v e . A c t u a l l y , i t i s t h e n o f t e n b e t t e r .
T h e m o v e m e n t e q u a t i o n s a r e
c1 = 1c2 = 2c3 = 2vd c1vd + rand (0, c2) (pd xd) + rand (0, c3) (gd xd)u xd + vdu 11+eur = rand (0, 1)
r < u xd 1r u xd 0
N o t e t h a t f o r t h i s a l g o r i t h m i t i s s o m e t i m e s b e t t e r t o u s e t h e " g l o b a l
b e s t " m e t h o d t o d e n e t h e i n f o r m a n t s , i . e . K = S.
1 0
7/30/2019 Binary PSO
11/42
A l g o r i t h m 3 0 D 6 0 D 9 0 D 1 5 0 D
G A 0 . 5 8 ( 1 0 0 0 0 0 ) 4 . 0 5 ( 1 0 0 0 0 0 ) 5 . 5 5 ( 1 0 0 0 0 0 ) 1 3 . 2 6 ( 1 0 0 0 0 0 )
M - D i P S O 0 ( 5 4 1 7 ) 0 ( 2 6 3 6 8 ) 0 ( 3 9 8 8 5 ) 0 ( 7 5 1 5 0 )
D e r i v a t i o n
0 S 2 K 2
0 ( 3 0 ) 0 ( 3 1 ) 0 ( 3 2 ) 0 ( 3 2 )
D e r i v a t i o n
0 S 3 5 K 3
0 ( 3 7 2 ) 0 ( 4 0 0 ) 0 ( 4 1 1 ) 0 ( 4 2 6 )
T a b l e 3 : G o l d b e r g ' s o r d e r - 3 p r o b l e m f o r d i e r e n t d i m e n s i o n s . F i t n e s s a n d n u m -
b e r o f e v a l u a t i o n , a v e r a g e d o v e r 10 t r i a l s f o r G A a n d M - D i P S O , o v e r 1000 f o rD e r i v a t i o n 0
4 R e s u l t s
4 . 1 P u r e s t r a t e g i e s
W e n o w a p p l y e a c h d e r i v a t i o n o n e a c h p r o b l e m , j u s t a s i t i s . W e w i l l
s e e l a t e r h o w t o a d d m o r e a d a p t a t i o n o r t o c o m b i n e s o m e o f t h e m . F o r
e a s i e r c o m p a r i s o n , w e u s e h e r e m o s t o f t h e t i m e t h e s a m e s w a r m s i z e
( 35 ) , a l t h o u g h f o r s o m e p r o b l e m s b e s t r e s u l t s c a n b e o b t a i n e d w i t h a d i e r e n t v a l u e . A s u s u a l l y , a s m a l l
Kp a r a m e t e r i s o f t e n b e t t e r f o r
d i c u l t p r o b l e m s , s o w e u s e e i t h e r 2
o r 3 . F o r D e r i v a t i o n 1 1 a n d
D e r i v a t i o n 1 0 0 , w e a l s o t r y
K = S. A s p o i n t e d o u t i n [ C L E 0 5 ] , u s i n g
j u s t s u c h " e x t r e m e " v a l u e s i s e n o u g h t o g i v e u s a p r e t t y g o o d i d e a
o f t h e a l g o r i t h m e c i e n c y . I n t h e f o l l o w i n g r e s u l t s , e a c h s t r a t e g y i s
c o d e d b y s o m e t h i n g l i k e " 1 1 S 3 5 K 3 " , m e a n i n g :
u s e o f D e r i v a t i o n 1 1
s w a r m s i z e 35
e a c h p a r t i c l e i n f o r m s i t s e l f , a n d 2 p a r t i c l e s c h o s e n a t r a n d o m a f t e r e a c h t i m e s t e p i f t h e r e h a s b e e n n o i m p r o v e m e n t
4 . 2 D e r i v a t i o n 0 o n " d e c e p t i v e d e c e p t i v e p r o b l e m s "
F i r s t , l e t u s t r y o u r h o a x o n t h e t h r e e d e c e p t i v e d e c e p t i v e p r o b l e m s
w e h a v e s e e n i n s e c t i o n 2 . R e s u l t s w i t h G A a n d M - D i P S O a r e c o m i n g
f r o m [ A L K 0 2 ] . A s y o u c a n s e e o n t h e t a b l e s 3 t o 5 , r e s u l t s w i t h
D e r i v a t i o n 0 a r e i n d e e d t o o g o o d t o b e h o n e s t . N o t e t h a t f o r G A
a n d M - D i P S O , o n l y 10 r u n s h a d b e e n l a u n c h e d b y t h e a u t h o r s , a s D e r i v a t i o n 0 h a s b e e n r a n
1000t i m e s i n o r d e r t o r e d u c e t h e s t a n d a r d
d e v i a t i o n ( n o t n o t e d h e r e ) . I n t h e t a b l e s t h e r s t n u m b e r i s t h e m e a n
b e s t t n e s s v a l u e f o u n d a n d t h e s e c o n d o n e ( i n p a r e n t h e s i s ) t h e m e a n
n u m b e r o f e v a l u a t i o n s . T h e s t o p c r i t e r i o n i s e i t h e r a s o l u t i o n i s f o u n d
o r t h e n u m b e r o f e v a l u a t i o n s i s 100000
.
1 1
7/30/2019 Binary PSO
12/42
A l g o r i t h m 3 0 D 6 0 D 9 0 D 1 5 0 D
G A 0 . 3 2 ( 1 0 0 0 0 0 ) 1 . 5 2 ( 1 0 0 0 0 0 ) 3 . 0 8 ( 1 0 0 0 0 0 ) n o n e
M - D i P S O 0 ( 1 5 6 9 0 ) 0 ( 4 5 9 0 2 ) 0 ( 8 3 3 4 8 ) n o n e
D e r i v a t i o n
0 S 2 K 2
0 ( 2 1 ) 0 ( 2 2 ) 0 ( 2 2 ) 0 ( 2 1 )
D e r i v a t i o n
0 S 3 5 K 2
0 ( 2 5 4 ) 0 ( 2 6 5 ) 0 ( 2 6 6 ) 0 ( 2 6 6 )
T a b l e 4 : B i p o l a r o r d e r - 6 p r o b l e m . F i t n e s s a n d n u m b e r o f e v a l u a t i o n , a v e r a g e d
o v e r 10 t r i a l s f o r G A a n d M - D i P S O , o v e r 1000 f o r D e r i v a t i o n 0
A l g o r i t h m 3 0 D 6 0 D 9 0 D 1 5 0 D
G A 0 . 9 5 ( 1 0 0 0 0 0 ) 1 1 . 7 ( 1 0 0 0 0 0 ) 2 4 . 1 ( 1 0 0 0 0 0 ) 5 5 . 7 5 ( 1 0 0 0 0 0 )
M - D i P S O 0 ( 5 3 5 4 ) 0 ( 1 5 3 4 4 ) 0 ( 4 2 3 5 8 ) 0 ( 8 8 4 8 8 )
D e r i v a t i o n
0 S 2 K 2
0 ( 2 4 ) 0 ( 2 5 ) 0 ( 2 5 ) 0 ( 2 5 )
D e r i v a t i o n
0 S 3 5 K 2
0 ( 2 6 8 ) 0 ( 2 8 5 ) 0 ( 2 9 4 ) 0 ( 2 9 9 )
T a b l e 5 : M h l e n b e i n ' s o r d e r - 5 p r o b l e m . F i t n e s s a n d n u m b e r o f e v a l u a t i o n ,
a v e r a g e d o v e r 10 t r i a l s f o r G A a n d M - D i P S O , o v e r 1000 f o r D e r i v a t i o n 0
O f c o u r s e , t h e r e i s a t r i c k . T h e p o i n t i s D e r i v a t i o n 0 w o r k s w e l l o n l y
o n t h i s k i n d o f p r o b l e m . B y " t h i s k i n d o f p r o b l e m " , I m e a n a p r o b l e m
f o r w h i c h e i t h e r 111...111 o r 000...000 i s a s o l u t i o n . A n d t h e t r i c k i s i t i s q u i t e d i c u l t t o g u e s s i t j u s t b y r e a d i n g t h e a l g o r i t h m . F o r o t h e r
p r o b l e m s , a s w e w i l l s e e n o w , i t d o e s n ' t w o r k a t a l l .
4 . 3 A l l d e r i v a t i o n s o n a l l p r o b l e m s
4 . 3 . 1 P e r f o r m a n c e c u r v e s
F o r e a c h p r o b l e m a n d f o r e a c h d e r i v a t i o n , w e p l o t t h e s u c c e s s r a t e
o v e r 100 r u n s , f o r a r a n g e o f m a x i m u m n u m b e r s o f e v a l u a t i o n s T.T h e s w a r m s i z e i s a l w a y s e q u a l t o 35 , a n d s e v e r a l K v a l u e s h a v e b e e n t e s t e d . O n l y t h e b e s t o n e i s r e t a i n e d , e x c e p t f o r D e r i v a t i o n 1 0 0
f o r w h i c h t h e r e a r e t w o p l o t s f o r t h e t w o b e s t o n e s , j u s t t o s e e t h e
d i e r e n c e . T h e p u r p o s e o f t h e s e g u r e s i s n o t t o d e c i d e w h e t h e r a n
a l g o r i t h m i s b e t t e r t h a n a n o t h e r o n e o r n o t , f o r i t i s h e r e i m p o s s i b l e
( t h e b e n c h m a r k p r o b l e m s h a v e p r e c i s e l y b e e n c h o s e n f o r t h a t ! ) , b u t
t o p o i n t o u t s o m e r u l e s a n d , i f I d a r e s a y , s o m e n o n r u l e s :
o n a g i v e n p r o b l e m , i f a l g o r i t h m A i s b e t t e r t h a n a l g o r i t h m B f o r a g i v e n T
, i t i s b e t t e r f o r a n y g r e a t e r
Tv a l u e . F a l s e : s e e f o r e x a m p l e 5 a n d
d e r i v a t i o n s 7 a n d 1 1
1 2
7/30/2019 Binary PSO
13/42
i f a n a l g o r i t h m i s e x c e l l e n t o n s o m e p r o b l e m s , i t i s v e r y b a d o n s o m e o t h e r s . I t s e e m s t o b e t r u e , a c c o r d i n g t o t h e g u r e s , b u t i t i s n o t , a s w e
w i l l s e e l a t e r
a p r o b l e m w i t h a l o t o f l o c a l o p t i m a i s m o r e d i c u l t . M e a n i n g l e s s : i t d e p e n d s o n t h e a l g o r i t h m . S e e f o r e x a m p l e t h e g u r e 6 , w h e r e D e r i v a t i o n
1 0 0 i s e x c e l l e n t o n t h e M u l t i m o d a l p r o b l e m
F i g u r e 1 : G o l d b e r g ' s o r d e r 3 . S u c c e s s r a t e v s m a x i m u m n u m b e r o f e v a l u a t i o n s
F i g u r e 2 : B i p o l a r o r d e r 6 . S u c c e s s r a t e v s m a x i m u m n u m b e r o f e v a l u a t i o n s
1 3
7/30/2019 Binary PSO
14/42
F i g u r e 3 : M h l e n b e i n ' s o r d e r 5 . S u c c e s s r a t e v s m a x i m u m n u m b e r o f e v a l u a t i o n s
F i g u r e 4 : Z e b r a 3 . S u c c e s s r a t e v s m a x i m u m n u m b e r o f e v a l u a t i o n s
1 4
7/30/2019 Binary PSO
15/42
F i g u r e 5 : Q u a d r a t i c . S u c c e s s r a t e v s m a x i m u m n u m b e r o f e v a l u a t i o n s
F i g u r e 6 : M u l t i m o d a l . S u c c e s s r a t e v s m a x i m u m n u m b e r o f e v a l u a t i o n s
F o r t h e M u l t i m o d a l p r o b l e m ( 100 d i m e n s i o n s , 20 p e a k s ) , t h e c h o i c e K = 3 g i v e s v e r y b a d r e s u l t s . F o r e x a m p l e , f o r D e r i v a t i o n 7 , t h e s u c c e s s r a t e f o r a t m o s t
20000e v a l u a t i o n s i s c o m p l e t e l y n u l l . W i t h
K =2
, w e o b t a i n m o r e r e a s o n a b l e s u c c e s s r a t e s . H o w e v e r , f o r D e r i v a t i o n
1 5
7/30/2019 Binary PSO
16/42
0 S 3 5 7 S 3 5 1 1 S 3 5 1 0 0 S 3 5
G o l d b e r g 1 0 0 % 6 0 % 7 8 % 9 9 %
B i p o l a r 1 0 0 % 5 8 % 8 9 % 8 4 %
M h l e n b e i n 1 0 0 % 8 5 % 1 8 % 0 %
Z e b r a 3 0 % 6 0 % 7 8 % 4 %
Q u a d r a t i c 2 2 % 7 4 % 8 7 % 7 2 %
M u l t i m o d a l 0 % 5 4 % 2 5 % 8 6 %
M e a n 5 4 % 6 5 % 6 3 % 5 8 %
S t a n d a r d d e v . 4 7 % 1 1 % 2 9 % 4 0 %
T a b l e 6 : M e a n s u c c e s s r a t e s a n d s t a n d a r d d e v i a t i o n s
1 0 0 , t h e b e s t i n f o r m a t i o n l i n k s t o p o l o g y i s w h a t i s u s u a l l y c a l l e d t h e
g l o b a l b e s t o n e , i . e . e a c h p a r t i c l e i s i n f o r m e d b y t h e w h o l e s w a r m
( K = S = 35) .
4 . 3 . 2 R o b u s t n e s s v e r s u s e c i e n c y
W h a t d o y o u p r e f e r : n e v e r b a d r e s u l t s o r
s o m e t i m e s e x c e l l e n t o n e s ?
U n f o r t u n a t e l y , i t a p p e a r s t h a t t h e a n d
i s n o t r e a l l y p o s s i b l e , a t l e a s t
w i t h j u s t t h e s i m p l e m o n o - s t r a t e g i e s w e h a v e d e n e d . T a b l e 6 i n -
d i c a t e s t h e a v e r a g e d s u c c e s s r a t e s a n d t h e s t a n d a r d d e v i a t i o n s o v e r
t h e s i x p r o b l e m s . W e c l e a r l y s e e t h a t D e r i v a t i o n 0 a n d D e r i v a t i o n
1 0 0 c a n b e u s e d i n t h e s e c o n d c a s e , a s D e r i v a t i o n 7 i s t h e o n l y o n e
t h a t i s n e v e r r e a l l y b a d , a n d q u i t e r o b u s t ( s m a l l s t a n d a r d d e v i a t i o n ) .
H o w e v e r , i t i s a l s o n e v e r e x c e l l e n t .
N o w , i t w o u l d n ' t b e v e r y i n t e r e s t i n g t o j u s t n o t i c e t h a t w h i t o u t t r y -
i n g t o e x p l a i n w h a t h a p p e n s . T h e t w o k e y w o r d s a r e a d a p t a t i o n
a n d
D P N P
( D i s t r i b u t i o n o f P o s s i b i l i t i e s f o r t h e N e x t P o s i t i o n s ) , a s e x -
p l a i n e d i n [ C L E 0 5 ] . F o r a l l d e r i v a t i o n s b u t D e r i v a t i o n 1 0 0 , t h e r e
i s a r u d i m e n t a r y a d a p t a t i o n o f t h e i n f o r m a t i o n l i n k s , f o r t h e y a r e
m o d i e d a t r a n d o m i f t h e r e h a s b e e n n o i m p r o v e m e n t . H o w e v e r ,
D e r i v a t i o n 0 h a s t h e p o o r e s t D P N P , f o r t h e c o n d e n c e c o e c i e n t s
h a v e j u s t t w o p o s s i b l e v a l u e s , 1
a n d1
. I t i s t h e n n o t s u r p r i s i n g t h a t
t h i s a l g o r i t h m i s v e r y g o o d o n s o m e s u i t a b l e p r o b l e m s , b u t m o s t o f
t h e t i m e v e r y b a d . T h e D P N P f o r D e r i v a t i o n 1 0 0 i s m o r e c o m p l e t e ,
s o i t i s a b i t b e t t e r , b u t s t i l l n o t v e r y r o b u s t , f o r t h e t o p o l o g y o f
t h e i n f o r m a t i o n l i n k s i s c o n s t a n t : o n s o m e p r o b l e m s , t h i s c i r c u l a r
t o p o l o g y i s n o t a g o o d o n e .
D e r i v a t i o n 7 a n d 1 1 b o t h h a v e a q u i t e g o o d D P N P , b u t 7 i s m o r e
a d a p t i v e , f o r t h e n u m b e r o f m o d i e d b i t s i s d e c r e a s e d i f t h e r e h a s
b e e n s o m e i m p r o v e m e n t . T h a t i s w h y i t i s t h e m o s t r o b u s t ( t h e
1 6
7/30/2019 Binary PSO
17/42
s m a l l e s t s t a n d a r d d e v i a t i o n ) . H o w e v e r , i t i s p o s s i b l e t o d e s i g n s o m e -
t h i n g b e t t e r , b y a d d i n g m o r e a d a p t a t i o n o r b y c o m b i n i n g t w o p u r e
s t r a t e g i e s
5 A d a p t i v e s t r a t e g i e s
A s s o m e p e r f o r m a n c e s a r e s o m e t i m e s v e r y d i e r e n t f o r d i e r e n t
Kv a l u e s , a m o r e r o b u s t a l g o r i t h m m a y b e o b t a i n e d j u s t b y m o d i f y i n g
Kd u r i n g t h e p r o c e s s . S i m i l a r l y , i t i s p e r f e c t l y p o s s i b l e t o u s e s e v e r a l
d e r i v a t i o n s c h o s e n m o r e o r l e s s c l e v e r l y a f t e r a g i v e n n u m b e r o f n o n
e c i e n t t i m e s t e p s ( n o i m p r o v e m e n t ) . A l s o , s o m e m o r e c l e v e r a d a p -
t i v e r u l e s c a n b e u s e d , l i k e a k i n d o f t a b o o t o l i m i t t h e D P N P . A s
i t i s n o t t h e p u r p o s e o f t h i s p a p e r t o d e s c r i b e i n d e t a i l a n a d a p t i v e
b i n a r y P S O , I j u s t g i v e b e l o w a f e w e x a m p l e s o f w h a t c a n b e d o n e
e v e n w i t h v e r y s i m p l e r u l e s .
5 . 1 D e r i v a t i o n 1 6 = D e r i v a t i o n 1 1 w i t h t a b o o
O n e o f t h e t h r e e t e n d a n c i e s i n t h e c l a s s i c a l P S O e q u a t i o n s c a n b e s e e n
a s k e e p i n g m o r e o r l e s s t h e s a m e v e l o c i t y . H o w e v e r , j u s t a p p l i e d
a s i t i s f o r a b i n a r y p r o b l e m , i t i s m e a n i n g l e s s . I f t h e p o s i t i o n i s
0a n d t h e v e l o c i t y i s
1, a p p l y i n g t w o t i m e s t h e s a m e v e l o c i t y t o t h e
p o s i t i o n g i v e s a g a i n 0
, a s t h e u n d e r l y i n g i d e a o f t h i s t e n d e n c y i s o n
t h e c o n t r a r y k e e p m o v i n g i n t h i s
d i r e c t i o n .
A p o s s i b l e w a y t o c o n v e y t h i s i d e a f o r a b i n a r y p r o b l e m i s t o s a y
s o m e t h i n g l i k e i f a c o m p o n e n t h a s j u s t b e e n m o d i e d , d o n ' t m o d i f y
i t a g a i n f o r t h e n e x t m o v e . S o t h e p a r t i c l e n e e d s a t l e a s t t h r e e m o v e s
t o p o s s i b l y g o b a c k t o t h e s a m e p o s i t i o n .
L e t ' s a p p l y t h i s t a b o o r u l e t o t h e s i m p l e s t d e r i v a t i o n w e h a v e s e e n ,
i . e . D e r i v a t i o n 1 1 . N o t e t h a t t h i s p i v o t m e t h o d i s a l r e a d y q u i t e g o o d
f o r a l m o s t a l l o u r t e s t f u n c t i o n s , e x c e p t f o r t h e M u l t i m o d a l p r o b l e m .
A s w e c a n s e e o n g u r e 7 , t h e r e s u l t i n g a l g o r i t h m i s t h e n n e v e r b a d
. . . a s s u m i n g t h a t w e c h o o s e t h e r i g h t K
v a l u e f o r e a c h p r o b l e m .
T h i s i l l u s t r a t e s t h a t a d d i n g j u s t o n e a d a p t a t i o n r u l e i s s o m e t i m e s n o t
e n o u g h . H e r e , w e w o u l d n e e d a n o t h e r r u l e s a y i n g h o w t o m o d i f y K
d u r i n g t h e p r o c e s s .
5 . 2 C o m b i n i n g s t r a t e g i e s
A s i t c l e a r l y a p p e a r s t h a t s o m e d e r i v a t i o n s a r e p r e t t y g o o d o n s o m e
p r o b l e m s , a n d p r e t t y b a d o n s o m e o t h e r s , a n o t h e r i d e a i s t o a u t o m a t -
i c a l l y d e c i d e d u r i n g t h e s e a r c h p r o c e s s w h i c h o n e h a s t o b e u s e d . S o ,
f r o m t i m e t o t i m e , t h e a l g o r i t h m h a s t o c h e c k i f i t w o u l d b e a g o o d
1 7
7/30/2019 Binary PSO
18/42
F i g u r e 7 : A d d i n g a t a b o o r u l e t o D e r i v a t i o n 1 1 . O n l y r e s u l t s w i t h t h e b e s t Kv a l u e s a r e s h o w n
1 6 S 3 5 ( 1 1 + T a b o o ) 1 6 / 0 _ p a r a l l S 3 5 K 3 1 6 / 0 _ s e q S 3 5 K 3
G o l d b e r g 6 7 % K 3 9 9 % 9 9 %
B i p o l a r 8 3 % K 3 5 9 8 % 9 9 %
M h l e n b e i n 8 9 % K 1 9 9 % 9 9 %
Z e b r a 3 6 7 % K 3 5 0 % 5 2 %
Q u a d r a t i c 8 5 % K 3 7 7 % 8 1 %
M u l t i m o d a l 7 7 % K 3 5 6 8 % 7 9 %
M e a n 7 8 % 8 2 % 8 5 %
S t a n d a r d d e v . 8 % 1 8 % 1 7 %
T a b l e 7 : M e a n s u c c e s s r a t e s a n d s t a n d a r d d e v i a t i o n s w h e n u s i n g s o m e a d a p -
t a t i o n s . O n t h e w h o l e , t h e a l g o r i t h m e i s b e t t e r . W i t h t h e t a b o o o p t i o n , i t i s
a l s o m o r e r o b u s t ( s m a l l s t a n d a r d d e v i a t i o n ) , b u t t h e b e s t
Kv a l u e i s n o t a l w a y s
t h e s a m e . S o t h e s e q u e n t i a l a p p r o a c h , i n w h i c h a n o t h e r s t r a t e g y ( d e r i v a t i o n ) i s
c h o s e n i f t h e r e h a s b e e n n o i m p r o v e m e n t f o r a w h i l e , i s t h e m o s t i n t e r e s t i n g
1 8
7/30/2019 Binary PSO
19/42
i d e a t o s w i t c h t o a n o t h e r s t r a t e g y . A t h e o r e t i c a l r e a s o n i n g d e t a i l e d
i n [ C L E 0 5 ] s h o w s t h a t a g o o d e s t i m a t i o n o f t h e n u m b e r o f t i m e s t e p s
b e t w e e n t w o s u c h a d a p t a t i o n s i s A = SK1 ( t h e i d e a i s t o g i v e e n o u g h t i m e s o t h a t i n f o r m a t i o n c a n s p r e a d a l l o v e r t h e s w a r m ) . N o t e t h a t
i n c o m p l e t e a d a p t i v e s y s t e m s , n e i t h e r S
n o rK
a r e c o n s t a n t , b u t w e
d o n ' t c o n s i d e r h e r e t h i s c a s e . T o g i v e a n i d e a o f t h e p r o c e s s , l e t ' s
s u p p o s e w e h a v e t o c h o o s e j u s t b e t w e e n t w o s t r a t e g i e s . T h e r e a r e
m a i n l y t w o w a y s t o d o t h a t : b y d o i n g p a r a l l e l t r i a l s o r s e q u e n t i a l
t r i a l s .
5 . 2 . 1 P a r a l l e l t r i a l s
T h i s m e t h o d i s q u i t e e x p e n s i v e i n t e r m s o f n u m b e r o f e v a l u a t i o n s b u t
n e v e r t h e l e s s b e t t e r t h a n a l l t h e o n e s w e h a v e s e e n . A t a g i v e n t i m e
ta l l v a l u e s d e n i n g t h e c u r r e n t s t a t u s o f t h e s w a r m a r e s a v e d a n d ,
f r o m t h i s s t a r t i n g p o i n t , t h e a l g o r i t h m t r i e s t h e s t r a t e g y a l r e a d y i n
u s e a n d a f t e r t h a t a n o t h e r o n e f o r A
i t e r a t i o n s . I f t h e n a l r e s u l t i s
b e t t e r , t h i s s e c o n d s t r a t e g y i s k e p t u n t i l t h e n e x t c h e c k t i m e .
A s D e r i v a t i o n 1 6 w a s a l r e a d y t h e b e s t , w e c a n n o w t r y t o c o m b i n e i t
w i t h s a y D e r i v a t i o n 0 . O f c o u r s e , i t i s j u s t t o i l l u s t r a t e t h e p r o c e s s
f o r , i n p r a c t i c e , D e r i v a t i o n 0 i s f a r t o o s p e c i c t o r e a l l y b e u s e f u l .
T i m e s
ta t w h i c h t h e t r i a l s a r e d o n e a r e
A,
2A,
3A, e t c . A s w e c a n
s e e o n t a b l e 7 , t h e r e s u l t s a r e o n t h e w h o l e b e t t e r , b u t t h e s t a n d a r d
d e v i a t i o n i s n o t a s s m a l l a s w i t h t h e p r e v i o u s m e t h o d ( w i t h t a b o o ) :
1 8 % v e r s u s 8 % . H o w e v e r , t h e g o o d p o i n t i s t h a t t h e r e i s n o n e e d t o
l o o k f o r t h e b e s t K
v a l u e : t h e s t a n d a r d o n e 3 c a n b e k e p t f o r a l l p r o b l e m s o f o u r b e n c h m a r k f u n c t i o n s e t .
5 . 2 . 2 S e q u e n t i a l t r i a l s
H e r e t h e i t e r a t i o n s a r e n o t r e p e a t e d w i t h a n o t h e r m e t h o d . S i m p l y , i f
t h e r e h a s b e e n n o i m p r o v e m e n t d u r i n g A
i t e r a t i o n s , a n o t h e r s t r a t e g y
i s c h o s e n . L e t ' s t r y a g a i n w i t h D e r i v a t i o n 1 6 a n d 0 . O n t a b l e 7 w e s e e
t h a t i t i s s l i g h t l y b e t t e r t h a n t h e p r e v i o u s o n e , a n d h a v e t h e s a m e
r o b u s t n e s s p r o p e r t y f o r t h e K
v a l u e . I t i s a l s o e a s i e r t o c o d e . S o w e
m a y s a y i t i s o u r b e s t c h o i c e .
5 . 3 S a v i n g c o m p u t a t i o n t i m e
A s y o u m a y h a v e n o t e d , f o r s o m e o f t h e o b j e c t i v e f u n c t i o n s t h e t -
n e s s i s c o m p u t e d b y a c c u m u l a t i n g s o m e p o s i t i v e e l e m e n t s ( G o l d -
b e r g , B i p o l a r , M h l e n b e i n , Z e b r a 3 ) . I n s u c h a c a s e i t i s n o t a l w a y s
n e c e s s a r y t o c o m p l e t e l y c o m p u t e t h e t n e s s : w e c a n s t o p a s s o o n a s
t h e r e i s n o h o p e t o n d a b e t t e r v a l u e t h a n t h e o n e t h a t i s m e m o -
r i s e d . N o t e t h a t t h i s t r i c k i s n o t s p e c i c t o b i n a r y o p t i m i s a t i o n . F o r
1 9
7/30/2019 Binary PSO
20/42
F i g u r e 8 : S a v e d c o m p u t a t i o n a l t i m e ( m e a n o v e r 1 0 r u n s f o r e a c h m a x i m u m
n u m b e r o f e v a l u a t i o n s ) . B y n o t c o m p l e t e l y c o m p u t i n g s o m e t n e s s v a l u e s , a s
s o o n a s i t i s a b s o l u t e l y s u r e t h e p o s i t i o n h a s n o t b e e n i m p r o v e d , i t i s p o s s i b l e
t o s i g n i c a n t l y r e d u c e t h e c o m p u t a t i o n a l t i m e i f e a c h t n e s s e v a l u a t i o n i s q u i t e
t i m e c o m s u m i n g
e x a m p l e i t c a n b e u s e d f o r a l l o p t i m i s a t i o n p r o b l e m s w h e r e t h e t n e s s
i s a d i s t a n c e , u s u a l l y a n E u c l i d e a n o n e .
T h i s c a n b e s e e n a s a k i n d o f s m a l l a d a p t a t i o n . L e t u s s e e i n d e t a i l t h e
p r o c e s s f o r t h e Z e b r a 3 f u n c t i o n . L e t
fbestb e t h e m e m o r i s e d t n e s s
v a l u e . I t m e a n s t h e m a x i m u m v a l u e e v e r f o u n d b y t h e c u r r e n t p a r t i c l e
i sfmax = D/3 fbest . N o w t h e t n e s s i s c o m p u t e d b y p r o g r e s s i v e l y
a d d i n g D/3 v a l u e s , e a c h o n e b e i n g a t m o s t e q u a l t o 1 . L e t f(d) t h e
p a r t i a l s u m o f t h e d
r s t 3 - b i t s u b - s t r i n g s . T h e m a x i m u m v a l u e t h a t
w e c a n h o p e f u l l y r e a c h i s t h e n
f(d) + D/3 d. I f t h i s v a l u e i s e q u a l
t o o r s m a l l e r t h a n
fmax t h e r e i s n o n e e d t o c o n t i n u e : i n a n y c a s e w e w o n ' t u s e t h e r e a l t n e s s v a l u e , f o r w e n e e d i t o n l y i f t h e p o s i t i o n
i s i m p r o v e d . O f c o u r s e f o r i n i t i a l i s a t i o n t h e c o m p u t a t i o n m u s t
b e
c o m p l e t e , b u t a f t e r t h a t i t c a n s a v e t i m e .
H o w m u c h ? F o r s m a l l K
v a l u e s , a s i m p l i e d m o d e l c a n e s t i m a t e i t
a s a f u n c t i o n o f t h e n u m b e r o f b e s t n e i g h b o u r s a n d o f t h e s w a r m
s i z e ( s e e 7 . 6 . 4 ) . A s w e c a n s e e o n g u r e 8 t h e s a v i n g m a y b e q u i t e
s i g n i c a n t . N o t e t h a t i n t h i s g u r e t h e s a v i n g i s n o t g i v e n i n t e r m s
o f t i m e ( w h i c h i s , a n w a y , d e p e n d i n g o n t h e c o m p u t e r i n u s e ) , b u t
i n t e r m s o f e l e m e n t a r y o p e r a t i o n s . F o r Z e b r a 3 , i f a g i v e n t n e s s
e v a l u a t i o n i s s t o p p e d a f t e r h a v i n g a d d e d t h e p a r t i a l v a l u e s o f d
3 b i t s
2 0
7/30/2019 Binary PSO
21/42
s u b s t r i n g s , t h e s a v i n g i s e s t i m a t e d b y (D 3d) /D .
6 S o m e p o s s i b l e f u t u r e g e n e r a l i m p r o v e m e n t s
T h e i m p r o v e m e n t t e c h n i q u e s p r e s e n t e d b e l o w a r e i n s p i r e d b y s o m e
l e s s s p e c i c ( c o n t i n u o u s ) P S O v e r s i o n s , b u t m a y a l s o b e a s s o u r c e o f
i n s p i r a t i o n f o r s o m e o t h e r v e r s i o n s . T h a t i s w h y I c a l l t h e m g e n e r a l .
6 . 1 I n i t i a l i s a t i o n
W h e n y o u h a v e d e c i d e d t o u s e
Sp a r t i c l e s , y o u a l s o h a v e t o d e n e t h e
s t a r t i n g c o n g u r a t i o n . U s u a l l y t h e i n i t i a l p o s i t i o n s a r e c o m p l e t e l y a t
r a n d o m . H o w e v e r , i t h a s b e e n e x p e r i m e n t a l l y s h o w n t h a t s t a r t i n g
f r o m a m o r e e v e n l y d i s t r i b u t i o n ( b y u s i n g c e n t r o i d a l V o r o n o i t e s s e -
l a t i o n s ) s i g n i c a n t l y i m p r o v e s t h e p e r f o r m a n c e f o r s o m e c o n t i n u o u s
t e s t f u n c t i o n s a s s o o n a s t h e d i m e n s i o n i s h i g h [ R I C 0 3 ] . S o i t w o u l d
b e i n t e r e s t i n g t o d o t h e s a m e f o r b i n a r y p r o b l e m s . T h e r s t q u e s t i o n
i s t h e n H o w t o d o t h a t ? i n t h i s s p e c i c c a s e . M o r e p r e c i s e l y , i s
i t p o s s i b l e t o d e n e a s p e c i c a l g o r i t h m b e t t e r t h a n t h e o n e u s e d i n
[ R I C 0 3 ] , t h a t n e e d s a l o t o f c o m p u t a t i o n . A n d t h e s e c o n d o n e i s o f
c o u r s e I s i t u s e f u l ? P r e l i m i n a r y r e s u l t s s e e m t o s h o w i t i s n o t s o
o b v i o u s .
6 . 1 . 1 D e n i t i o n o f a r e g u l a r d i s t r i b u t i o n
F i r s t , l e t u s g i v e a p r e c i s e d e n i t i o n o f w h a t m e a n s h e r e a m o r e
e v e n l y d i s t r i b u t i o n , o r r e g u l a r d i s t r i b u t i o n
. W e h a v e S
b i n a r y p o s i -
t i o n s
{s1,...,si, ...sS}t o d e n e i n t h e b i n a r y s e a r c h s p a c e
B. F o r a g i v e n
si l e t Ii i t s i n u e n c e d o m a i n , d e n e d b y
Ii = {x, x B, j, j#i, d (x, si) d (x, sj)}
w h e r e d
i s t h e H a m m i n g d i s t a n c e . A c t u a l l y , w e d e n e h e r e a b i n a r y
V o r o n o i t e s s e l l a t i o n . L e t Vi b e t h e v o l u m e o f Ii , i . e . i t s n u m b e r o f
e l e m e n t s . T h e d i s t r i b u t i o n i s p e r f e c t l y r e g u l a r i f a l l
Vi h a v e t h e s a m e v a l u e . H o w e v e r , i t i s n o t a l w a y s p o s s i b l e , s o a r e g u l a r d i s t r i b u t i o n w i l l
s i m p l y b e o n e t h a t m i n i m i s e t h e v a r i a n c e o f t h e
Vi , i . e . t h e q u a n t i t y v
d e n e d b y
v = 1S
S
i=1 (Vi m)2
w i t h
m = 1S
Si=1
Vi
2 1
7/30/2019 Binary PSO
22/42
6 . 1 . 2 B u i l d i n g a r e g u l a r d i s t r i b u t i o n
I t i s q u i t e e a s y t o w r i t e a d e t e r m i n i s t i c a l g o r i t h m t h a t p r o g r e s s i v e l y
b u i l d s a r e g u l a r d i s t r i b u t i o n . T h e i d e a i s t o a d d t h e p a r t i c l e s o n e a t
a t i m e , a n d f o r e a c h b i t t o t r y b o t h v a l u e s 0 a n d 1 , t r y i n g t o k e e p t h e
d i s t a n c e s b e t w e e n p a r t i c l e s a s b i g a s p o s s i b l e . P s e u d o - c o d e
s1 = 000...000F o r e a c h p a r t i c l e i , f r o m 2 t o S{
F o r e a c h d i m e n s i o n d, f r o m 1 t o D{
si (d) = 0 / / T r y 0 C o m p u t e t h e d i s t a n c e s f r o m
si t o t h e sj w i t h j < iC o m p u t e t h e m e a n m0 , a n d t h e v a r i a n c e v0 o f t h e s e d i s t a n c e s D o t h e s a m e w i t h
si (d) =1 , a n d c o m p u t e t h e m e a n m1 , a n d t h e v a r i a n c e v1
I f m1 > m0 t h e n si (d) = 1; c o n t i n u e w i t h n e x t dI f m1 < m0 t h e n si (d) = 0; c o n t i n u e w i t h n e x t d/ / C a s e m1 = m0I f v1 < v0 t h e n si (d) = 1 e l s e si (d) = 0 ;}
}
E x a m p l e s
F o rD = 4 , S = 3 t h e a l g o r i t h m g i v e s
s1 = 0000s2 = 1111s3 = 0101
T h e v o l u m e s o f t h e i n u e n c e d o m a i n s a r e r e s p e c t i v e l y 9 , 1 0 , a n d 9 .
T h e r e i s n o w a y t o d o b e t t e r , s i m p l y f o r 24
i s n o t d i v i s i b l e b y 3 . F o r
a n y p o s i t i o n
x, t h e r e e x i s t s a t l e a s t o n e p a r t i c l e
si s o t h a t d (x, si) 2 . F o r D = 3, a n d S = 4 , w e h a v e 2D/S = 2 , a n d t h e a l g o r i t h m s i n d e e d g i v e s a p e r f e c t l y r e g u l a r d i s t r i b u t i o n
{000, 111, 010, 101}, w i t h a l l v o l u m e s e q u a l t o 3 :
I1 = {000, 001, 100}I2 = {111, 011, 110}I3 = {010, 011, 110}I4 = {101, 001, 100}
2 2
7/30/2019 Binary PSO
23/42
R a n d o m i n i t i t i a l i -
s a t i o n
R e g u l a r i n i t i a l i s a t i o n
+ r a n d o m r o t a t i o n
G o l d b e r g 8 0 , 3 6 % 8 0 , 4 8 %
B i p o l a r 9 0 , 3 7 % 9 0 , 5 6 %
M h l e n b e i n 1 1 , 7 2 % 1 2 , 5 2 %
Z e b r a 3 8 0 , 6 7 % 8 0 , 5 6 %
Q u a d r a t i c 8 5 , 3 4 % 8 5 , 4 4 %
M u l t i m o d a l 5 3 , 5 5 % 5 4 , 7 5 %
M e a n 6 7 , 0 0 % 6 7 , 3 9 %
T a b l e 8 : I n u e n c e o f a r e g u l a r i n i t i a l i s a t i o n o n t h e s u c c e s s r a t e . H e r e t h e s w a r m
s i z e i s o p t i m u m , a n d t h e i m p r o v e m e n t i s v e r y s m a l l
I n p r a c t i c e , o n c e y o u h a v e s u c h a r e g u l a r d i s t r i b u t i o n , i t i s a g o o d
i d e a t o b u i l d s o m e o t h e r s , o b t a i n e d b y r a n d o m l y r o t a t i n g i t . Y o u
j u s t h a v e t o a d d t h e s a m e r a n d o m b i n a r y v e c t o r t o a l l t h e
s1 . N o t e t h a t f o r a d d i n g y o u h a v e t o u s e t h e b i n a r y a l g e b r a , f o r w h i c h
1 + 1 = 0.
6 . 1 . 3 R e s u l t c o m p a r i s o n
W e n o w t r y t o c o m p a r e t h e r e s u l t w i t h t h e c l a s s i c a l p u r e r a n d o m
i n i t i a l i s a t i o n o n t h e o n e h a n d , a n d w i t h r a n d o m l y r o t a t e d r e g u l a r
d i s t r i b u t i o n s o n t h e o t h e r h a n d . I t i s e a s i e r t o s e e t h e d i e r e n c e s
w h e n u s i n g s m a l l s w a r m s . W e u s e h e r e t h e o p t i m a l s w a r m s i z e , a s
c o m p u t e d b e l o w i n 7 . 1 . 2 , i . e .
S = 12f o r
D = 30, a n d
S = 20f o r
D = 100.
T a b l e 8 i s b u i l d a s t h e o n e i n 4 . 3 . 2 . H o w e v e r h e r e o n l y D e r i v a t i o n 1 1
w i t h
K = 3h a s b e e n u s e d . A s w e c a n s e e , w i t h t h e s e s w a r m s i z e s t h e r e
i s a l m o s t n o d i e r e n c e w i t h r e g u l a r i n i t i a l i s a t i o n , j u s t m o s t o f t h e t i m e
a v e r y s l i g h t i m p r o v e m e n t . A l s o ( i t i s n o t r e p o r t e d i n t h e t a b l e ) , t h e
s t a n d a r d d e v i a t i o n o f t h e m e a n b e s t v a l u e i s s l i g h t l y s m a l l e r . S o ,
a t l e a s t f o r s m a l l d i m e n s i o n s ( 100) i t i s n o t r e a l l y w o r t h w h i l e t o
u s e a r e g u l a r d i s t r i b u t i o n . H o w e v e r i t w o u l d b e i n t e r e s t i n g t o c h e c k
i t i n h i g h d i m e n s i o n , f o r t h e r a t e s w a r m _ s i z e / s e a r c h _ s p a c e _ v o l u m e
b e c o m e s q u i t e s m a l l .
6 . 2 W h e n t h e u n i t i s t h e t r i b e
W e h a v e a l w a y s u s e d e x p r e s s i o n s l i k e u p d a t e t h e m e m o r y o f t h e
p a r t i c l e . H o w e v e r i t m a y b e i n t e r e s t i n g t o w o r k a t a h i g h e r l e v e l ,
b y c o n s i d e r i n g a w h o l e s e t o f p a r t i c l e s a s a n u n i t a n d b y m o d i f y i n g
t h e m e m o r y o f t h i s u n i t .
2 3
7/30/2019 Binary PSO
24/42
L e t ' s c a l l h e r e t r i b e
a t t i m e s t e p t
t h e s e t o f t h e i n f o r m a n t s o f a
p a r t i c l e xt , i n c l u d i n g i t s e l f , i . e . w h a t w e h a v e a b o v e c a l l e d i t s i n -
f o r m a n t g r o u p . N o t e t h a t i t i s n o t e x a c t l y t h e s a m e c o n c e p t t h a t
h a s b e e n u s e d f o r a c o m p l e t e a d a p t i v e P S O v e r s i o n ( p r e c i s e l y c a l l e d
T R I B E S ) , i n w h i c h t h e s w a r m s i z e a n d t h e i n f o r m a t i o n l i n k s a r e j u -
d i c i o u s l y m o d i e d d u r i n g t h e p r o c e s s [ O N W 0 4 , C L E 0 5 ] . H e r e ,
t h e m e a n i n g i s w e a k e r , a n d t h e s w a r m s i z e i s s t i l l c o n s t a n t . T h e
v e r y b a s i c p r i n c i p l e o f a s i m p l e P S O c a n n o w b e s y m b o l i c a l y w r i t t e n
xt+1 tribal _ memory creativity
w h e r e t r i b a l _ m e m o r y m e a n s t h e s e t o f t h e b e s t k n o w n p o s i t i o n s
b y t h e t r i b e / i n f o r m a n t g r o u p , a n d c r e a t i v i t y m e a n s s o m e r a n d o m -
n e s s . N o t e t h a t t h i s e q u a t i o n i s q u i t e i m p o r t a n t f o r i t s u m m a r i s e s
a l l P S O v e r s i o n s . F o r e x a m p l e i n D e r i v a t i o n 1 1 , a n e w p o s i t i o n o f a
g i v e n p a r t i c l e i s c o m p u t e d b y
1 . l o o k i n g f o r g , t h e b e s t o f t h e b e s t p o s i t i o n s k n o w n b y t h e i n f o r m a n t s o f t h e p a r t i c l e ( m a k e u s e o f t h e t r i b a l m e m o r y )
2 . c h o o s i n g t h e n e w p o s i t i o n x a t r a n d o m a r o u n d g ( c r e a t i v i t y )
3 . i f x i s b e t t e r t h a n t h e b e s t p o s i t i o n p k n o w n b y x, t h e n r e p l a c e p i t b y x
H o w e v e r , i f w e w o r k a t t h e t r i b e l e v e l , t h e r e a r e s o m e o t h e r w a y s f o r
t h e s t e p 3 . I n p a r t i c u l a r , t h i s t w o o n e s a r e q u i t e i n t u i t i v e
3 a . f o r a l l b e s t p o s i t i o n s p k n o w n b y t h e t r i b e , i f x i s b e t t e r t h a n p,t h e n r e p l a c e p b y x . I t m e a n s s e v e r a l m e m o r i e s m a y b e m o d i e d .
3 b . i f p i s t h e w o r s t o f t h e b e s t p o s i t i o n s k n o w n b y t h e t r i b e , a n d i f x i sb e t t e r t h a n p, t h e n r e p l a c e p b y x . I t m e a n s t h e m o d i e d m e m o r y i s n o t n e c e s s a r i l y t h e o n e o f t h e c u r r e n t p a r t i c l e .
R e f e r e n c e s
[ A L K 0 2 ] A l - K a z e m i , B . , M o h a n , C . K . , " M u l t i - p h a s e d i s c r e t e p a r t i c l e s w a r m
o p t i m i z a t i o n . P r o c e e d i n g o f F o u r t h I n t e r n a t i o n a l W o r k s h o p o n F r o n -
t i e r s i n E v o l u t i o n a r y A l g o r i t h m s ( F E A ) , " 2 0 0 2
[ B A R 0 3 ] B a r i t o m p a , W . P . , H e n d r i x , E . M . T . , " O n t h e i n v e s t i g a t i o n o f
S t o c h a s t i c G l o b a l O p t i m i z a t i o n a l g o r i t h m s , " J o u r n a l o f G l o b a l O p -
t i m i z a t i o n , 2 0 0 3 .
[ C L E 0 4 ] C l e r c , M . , " D i s c r e t e P a r t i c l e S w a r m O p t i m i z a t i o n , i l l u s t r a t e d b y t h e
T r a v e l i n g S a l e s m a n P r o b l e m , " i n N e w O p t i m i z a t i o n T e c h n i q u e s i n
E n g i n e e r i n g . H e i d e l b e r g , G e r m a n y : S p r i n g e r , 2 0 0 4 , p . 2 1 9 - 2 3 9 .
2 4
7/30/2019 Binary PSO
25/42
[ C L E 0 5 ] C l e r c , M . , L ' o p t i m i s a t i o n p a r e s s a i m s p a r t i c u l a i r e p a r a m t r i q u e e t
a d a p t a t i v e , H e r m s S c i e n c e , 2 0 0 5 .
[ G L O 0 2 ] G l o v e r , F . , A l i d a e e , B . , R e g o , C . , K o c h e n b e r g e r , G . A . , " O n e - P a s s
H e u r i s t i c s f o r L a r g e - S c a l e U n c o n s t r a i n e d B i n a r y Q u a d r a t i c P r o b -
l e m s , " E u r o p e a n J o u r n a l o f O p e r a t i o n a l R e s e a r c h , 2 0 0 2 .
[ K E N 9 7 ] K e n n e d y , J . , E b e r h a r t , R . C . , " A d i s c r e t e b i n a r y v e r s i o n o f t h e p a r -
t i c l e s w a r m a l g o r i t h m , " p r e s e n t e d a t C o n f e r e n c e o n S y s t e m s , M a n ,
a n d C y b e r n e t i c s , 1 9 9 7 , p . 4 1 0 4 - 4 1 0 9 .
[ K E N 9 8 ] K e n n e d y , J . , S p e a r s , W . M . , " M a t c h i n g A l g o r i t h m s t o P r o b l e m s : A n
E x p e r i m e n t a l T e s t o f t h e P a r t i c l e S w a r m a n d S o m e G e n e t i c A l g o -
r i t h m s o n t h e M u l t i m o d a l P r o b l e m G e n e r a t o r , " p r e s e n t e d a t I n t e r -
n a t i o n a l C o n f e r e n c e o n E v o l u t i o n a r y C o m p u t a t i o n , 1 9 9 8 , p . 7 8 - 8 3 .
[ O N W 0 4 ] G . C . O n w u b o l u , " T R I B E S a p p l i c a t i o n t o t h e o w s h o p s c h e d u l i n g
p r o b l e m , " i n N e w O p t i m i z a t i o n T e c h n i q u e s i n E n g i n e e r i n g . H e i d e l -
b e r g , G e r m a n y : S p r i n g e r , 2 0 0 4 , p . 5 1 7 - 5 3 6 .
[ R I C 0 3 ] R i c h a r d s , M . , I m p r o v i n g P a r t i c l e S w a r m O p t i m i z a t i o n , M a s t e r o f
S c i e n c e t h e s i s , B r i g h a m Y o u n g U n i v e r s i t y , 2 0 0 3
[ S E R 9 7 ] S e r r a , P . , S t a n t o n , A . F . , K a i s , S . , " P i v o t m e t h o d f o r g l o b a l o p t i -
m i z a t i o n , " i n P h y s i c a l R e v i e w , v o l . 5 5 , 1 9 9 7 , p . 1 1 6 2 - 1 1 6 5 .
7 A p p e n d i x f o r a m a t h e u r s
A r e m a r k a b l e p r o p e r t y o f b i n a r y P S O i s t h a t a l o t o f b e h a v i o u r s c a n
b e m o d e l l e d j u s t b y c a r e f u l l y c o u n t i n g s o m e w e l l c h o s e n c o n g u r a -
t i o n s , i n o r d e r t o c o m p u t e s o m e p r o b a b i l i t i e s . I t i s t h e n p o s s i b l e t o
g i v e s o m e p r a c t i c a l f o r m u l a s f o r t h e m a i n p a r a m e t e r s , n a m e l y t h e
s w a r m s i z e , t h e n u m b e r o f i n f o r m a n t s o f a p a r t i c l e a n d t h e n u m b e r
o f b i t s t o s w i t c h a t e a c h t i m e s t e p .
7 . 1 S w a r m s i z e
7 . 1 . 1 A s p h e r i c a l s e a r c h s p a c e
I n a c l a s s i c a l ( d i s c r e t e ) E u c l i d e a n s p a c e , t h e n u m b e r o f p o i n t s a t
d i s t a n c e
f r o m
gi s i n c r e a s i n g l i k e
D. I n a b i n a r y s p a c e w i t h t h e
H a m m i n g d i s t a n c e ( n u m b e r o f b i t s t o s w i t c h ) i t i s e q u a l t o CD ( t h e
n u m b e r o f p o s s i b i l i t i e s t o c h o o s e
e l e m e n t s a m o n g s t
D, w h i c h g i v e s
a w e l l k n o w n b e l l s h a p e c u r v e , c e n t e r e d o n D/2. I n p a r t i c u l a r t h e r e
i s j u s t o n e p o i n t a t d i s t a n c e D
. L i k e o n a s p h e r e o f r a d i u s D/2 , t h e
n u m b e r o f p o i n t s a t d i s t a n c e
b e g i n s t o i n c r e a s e a n d t h e n d e c r e a s e s .
2 5
7/30/2019 Binary PSO
26/42
7 . 1 . 2 S w a r m s i z e e s t i m a t i o n
L e t ' s s u p p o s e t h e i n i t i a l i s a t i o n i s p e r f e c t , t h a t i s t o s a y e a c h p a r t i c l e
h a s a b o u t t h e s a m e n u m b e r o f p o s i t i o n s i n t h e s e a r c h s p a c e t h a t a r e
c l o s e r t o i t t h a n t o t h e o t h e r p a r t i c l e s . T h e s e a r c h s p a c e c a n t h e n b e
s e e n a s a u n i o n o f c e l l s , a n d e a c h c e l l c o n t a i n s a b o u t 2/S
p o s i t i o n s .
L e t
gb e a p a r t i c l e , a n d w e a r e l o o k i n g a r o u n d
gb y s w i t c h i n g a t m o s t
b i t s , a s i n D e r i v a t i o n 1 1 . T h e n u m b e r o f p o s i t i o n s w e c a n r e a c h t h i s w a y i s
=0 C
D . S o , i n o r d e r t o b e a b l e t o r e a c h a n y p o s i t i o n i n
t h e c e l l , w e h a v e t o n d t h e s m a l l e s t r a d i u s s o t h a t
=0
CD 2D
S( 1 )
A l t h o u g h t h e r e i s n o s i m p l e f o r m u l a t o d e r i v e f r o m 1 , i t i s a l w a y s p o s s i b l e t o n u m e r i c a l l y c o m p u t e i t w h e n D a n d S a r e g i v e n , a n d t o t a b u l a t e s o m e c u r v e s
v s
S. T h e g o o d n e w s i s t h a t a s s o o n a s
Si s
g r e a t e r t h a n a g i v e n v a l u e ( w h i c h i s a p r i o r i d e p e n d i n g o n D
) , t h i s
r a d i u s d e c r e a s e s v e r y s l o w l y w h e n S
i n c r e a s e s .
S o , a s w e c a n s e e o n g u r e 9 , t h e r a d i u s i s a l m o s t t h e s a m e ( a b o u t 1 0
f o rD = 30, a n d a b o u t 4 0 f o r D = 100) f o r a n y s w a r m s i z e b e t w e e n 2 0
a n d 5 0 . I t m e a n s t h a t f o r f o r a g i v e n s e a r c h e o r t o f T
e v a l u a t i o n s ,
u s i n g S = 20 o r S = 50 w i l l g i v e m o r e o r l e s s t h e s a m e s u c c e s s r a t e , a n d
m o r e o r l e s s t h e s a m e m e a n n u m b e r o f e v a l u a t i o n s f o r t h e s u c c e s s f u l
r u n s . A c t u a l l y , b e c a u s e o f t h e w a y P S O w o r k s , i t i s b e t t e r t o h a v e a s
m a n y i t e r a t i o n s a s p o s s i b l e , f o r t h e i n f o r m a t i o n h a s t h e n m o r e t i m e t o
b e s p r e a d b e t w e e n p a r t i c l e s [ C L E 0 5 ] . A s t h i s n u m b e r o f i t e r a t i o n s
i s e q u a l t o T /S
, i t m e a n s t h e s m a l l e s t a c c e p t a b l e S
v a l u e i s t h e b e s t
o n e .
I t i s t h e n p o s s i b l e t o b u i l d a s i m p l i e d f o r m u l a g i v i n g a s w a r m s i z e
t h a t i s g o o d f o r a l a r g e r a n g e o f d i m e n s i o n s . I n o r d e r t o d o t h a t , f o r
e a c h
Dt h e c u r v e
v s
Si s i n t e r p o l a t e d b y a t h r e e t i m e s d i e r e n t i a b l e
o n e , a n d w e a r e l o o k i n g f o r t h e
S0 v a l u e t h a t m i n i m i s e t h e c u r v a t u r e r a d i u s . A f t e r t h a t , a g o o d e s t i m a t i o n o f t h e w a n t e d
Smin v a l u e c a n b e p e r f o r m e d i n t h r e e s t e p s :
1 . n d t h e p o i n t O = (S0, (S0)) w h e r e t h e o s c u l a t o r c i r c l e h a s t h e s m a l l e s t r a d i u s R
2 . n d t h e c e n t e r C o f t h i s c i r c l e . L e t S b e i t s r s t c o o r d i n a t e
3 . d e n e Smin b y Smin = IN T(S + 0.5) , i . e . t h e n e a r e s t i n t e g e r v a l u e .
A c c o r d i n g t o t h e s h a p e o f t h e c u r v e , w e c o u l d s a y i t i s i n d e e d a p o i n t
w h e r e t h e a t p a r t b e g i n s .
2 6
7/30/2019 Binary PSO
27/42
F i r s t , l e t u s n d a d i e r e n t i a b l e f u n c t i o n t h a t a p p r o x i m a t e s
=0 C
D .
I t i s q u i t e e a s y b y u s i n g a l o g i s t i c c u r v e , f o r e x a m p l e
H() =2D
1 + e(D)
B y s o l v i n g t h e e q u a t i o n H() = 2D/S w e n d a f o r m u l a f o r
(S) = D ln (S 1)
( 2 )
T h e
c o e c i e n t c a n b e t a b u l a t e d , b u t i t i s e a s i e r t o u s e a g o o d
a p p r o x i m a t i o n g i v e n b y
=1
1 + D2
w i t h
1 = 4.5 a n d 2 = 0.54 .
W e h a v e t h e n (S) = 1(S1) , (S) = 1(S1)2 , a n d (S) = 2(S1)3 .
N o w , f o r
i s a l w a y s p o s i t i v e , t h e r a d i u s c u r v a t u r e i s g i v e n b y t h e
c l a s s i c a l f o r m u l a
R =
1 + 23/2
W e a r e l o o k i n g f o r t h e S
v a l u e f o r w h i c h i t i s m i n i m u m . T h e e q u a t i o n
R = 0g i v e s u s
3 1 + 2 = 0a n d w e n a l l y h a v e t o s o l v e
3(S 1)6 + 2 (S 1)2 + 2 = 0
L e t u s d e n e X = (S 1)2
a n dp = 2/3
. T h e n t h e e q u a t i o n b e c o m e s
X3 + pX + p = 0 . B y a p p l y i n g t h e C a r d a n f o r m u l a , w e n d t h a t t h e r e a l s o l u t i o n i s
S0 = 1 +
3
p
2
+p2
4
+p3
27
+3
p
2 p2
4
+p3
27
a n d t h e v a l u e w e a r e l o o k i n g f o r i s t h e n
Smin = IN T
S0 1 +
2
+ 0.5
2 7
7/30/2019 Binary PSO
28/42
F i g u r e 9 : M a x i m u m r a d i u s . I f t h e d i s t r i b u t i o n o f t h e p a r t i c l e i s e n o u g h e v e n l y ,
a n y p o i n t o f t h e s e a r c h s p a c e i s a t a d i s t a n c e o f t h e n e a r e s t p a r t i c l e a t m o s t
e q u a l t o t h i s r a d i u s . A s e x p e c t e d , t h i s r a d i u s d e c r e a s e s w h e n t h e s w a r m s i z e
i n c r e a s e s , b u t v e r y s l o w l y a s s o o n a s t h e s w a r m i s b i g e n o u g h . T h e s e c u r v e s c a n
b e a p p r o x i m a t e d b y a d i e r e n t i a b l e m o d e l
A s
i s n e g a t i v e a n d
p o s i t i v e , i t i s a s e x p e c t e d g r e a t e r t h a n
S0 .F o r
D = 30 , w e n d S0 = 2.41, a n d Smin = 12 . F o r D = 100 , S0 = 2.56 , a n d Smin
21. T h e w h o l e p r o c e s s i s q u i t e c o m p l i c a t e d b u t n o w w e h a v e a
t h e o r e t i c a l f o r m u l a , w e c a n n d s o m e f a r m o r e s i m p l e e m p i r i c a l o n e s
t h a t g i v e s i m i l a r v a l u e s , a t l e a s t f o r n o t t o o h i g h d i m e n s i o n ( t y p i c a l l y
s m a l l e r t h a n 5 0 0 ) , f o r e x a m p l e
Smin = IN T (9.5 + 0.124(D 9)) ( 3 )
U s i n g s u c h o p t i m a l s w a r m s i z e s u s u a l l y s l i g h t l y i n c r e a s e s t h e e f -
f e c t i v e n e s s , p a r t i c u l a r l y w h e n
Ti s t o o s m a l l t o o b t a i n a h i g h s u c c e s s
r a t e . F o r e x a m p l e , f o r t h e 3 0 D Z e b r a 3 f u n c t i o n a n d
T = 15000t h e s u c -
c e s s r a t e i s 2 9 % w i t h S = 12 , a s i t i s 2 2 % w i t h S = 35 ( w i t h D e r i v a t i o n
1 1 ) .
7 . 2 P e r f o r m a n c e c u r v e m o d e l
L e t ' s t r y t o m o d e l t h e p e r f o r m a n c e c u r v e s " S u c c e s s r a t e v s M a x i m u m
n u m b e r o f e v a l u a t i o n s " . L e t s (T) b e s u c h a c u r v e . I t m a y b e e a s i e r t o
u n d e r s t a n d w h a t h a p p e n s i f w e s u p p o s e e a c h s u c c e s s r a t e i s e s t i m a t e d
b y r u n n i n g N
t i m e s t h e a l g o r i t h m ( o n a g i v e n p r o b l e m ) . S o N s (T) i s
2 8
7/30/2019 Binary PSO
29/42
t h e n u m b e r o f s u c c e s s f u l r u n s , t h a t i s t o s a y t h e n u m b e r o f r u n s t h a t
h a v e f o u n d a s o l u t i o n a f t e r a t m o s t T
e v a l u a t i o n s .
N o w l e t ' s c o n s i d e r
Nr u n s w i t h a g r e a t e r m a x i m u m e v a l u a t i o n n u m b e r
T + T. I t i s q u i t e o b v i o u s t h e r e a r e a t l e a s t N s (T) s u c c e s s f u l o n e s ( w e n e g l e c t h e r e t h e p r o b a b i l i s t i c u c t u a t i o n s ) , f o u n d d u r i n g t h e r s t
Te v a l u a t i o n s . W h a t a b o u t t h e
N N s (T) o t h e r o n e s ? T h e y s t i l l h a v e T e v a l u a t i o n s t o p o s s i b l y n d a s o l u t i o n . I t s e e m s r e a s o n a b l e t o a p p l y t o t h e m a s u c c e s s r a t e p r o p o r t i o n a l t o t h e p r e v i o u s o n e ,
i . e . s (T) T. S o , n a l l y , t h e t o t a l n u m b e r o f s u c c e s s f u l r u n s i s
N s (T) + s (T) (N N s (T)) T . B y d i v i d i n g b y N, w e o b t a i n t h e n e w s u c c e s s r a t e :
s (T + T) = s (T) + s (T) (1 s (T)) T ( 4 )
T h i s i s a c l a s s i c a l i t e r a t i v e e q u a t i o n f o r a l o g i s t i c c u r v e . T h e s
f u n c t i o n
i s g i v e n b y : =
1s(T0)
1
eT0
s (T) = 11+eT
( 5 )
T h e o r e t i c a l l y , i f t h e m o d e l w a s p e r f e c t , w e c o u l d t a k e T0 = 1 a n d
t h e n , i f t h e r e i s j u s t o n e s o l u t i o n , s (T0) = 2D ( i . e . t h e p r o b a b i l i t y t o
n d t h e s o l u t i o n j u s t b y c h a n c e a t t h e v e r y b e g i n n i n g ) . H o w e v e r , o f
c o u r s e , t h e m o d e l i s n o t
p e r f e c t , a n d i t d o e s n ' t m a t c h t h e n v e r y w e l l
( f a r t o o p e s s i m i s t i c ) , s o i t i s b e t t e r t o " f o r g e t " t h e r s t e q u a t i o n , a n d
t o c o n s i d e r t h e r e a r e t w o i n d e p e n d e n t p a r a m e t e r s ,
a n d
( a n o t h e r
w a y , w h i c h i s e q u i v a l e n t a n d m i g h t b e m o r e i n t u i t i v e , i s t o s t a r t f r o m
a r e a s o n a b l e T0 v a l u e , s a y 1000, t o c o n s i d e r t h a t s (T0) i s a p a r a m e t e r ,
a n d t o c o m p u t e
) . T h e n , b y r u n n i n g t h e a l g o r i t h m N
t i m e s w i t h
t w o d i e r e n t m a x i m u m n u m b e r o f e v a l u a t i o n s T1 a n d T2 w e o b t a i n
t w o s u c c e s s r a t e e s t i m a t i o n s s (T1)a n d s (T2) . F r o m t h e n , i t i s e a s y t o
c o m p u t e t h e t w o p a r a m e t e r s , b y s o l v i n g t h e s y s t e m s (T1) =
11+eT1
s (T2) =1
1+eT2
W e n d
=1
T2T1ln 1/s(T1)11/s(T2)1
= 1
s(T1) 1 eT1
2 9
7/30/2019 Binary PSO
30/42
F i g u r e 1 0 : M o d e l f o r p e r f o r m a n c e c u r v e s f o r t h e M u l t i m o d a l p r o b l e m . T h a n k s
t o s u c h a m o d e l , i t i s s o m e t h i n g p o s s i b l e t o e s t i m a t e h o w m a n y e v a l u a t i o n s
w i l l b e n e e d e d t o r e a c h a g i v e n s u c c e s s r a t e , j u s t a f t e r h a v i n g r a n t h e o p t i m i s e r
w i t h t w o d i e r e n t s m a l l m a x i m u m n u m b e r s o f e v a l u a t i o n ( s e e D e r i v a t i o n 7 ) .
H o w e v e r i t d o e s n o t w o r k f o r a l l s t r a t e g i e s ( s e e D e r i v a t i o n 1 1 )
F o r e x a m p l e , w e c a n t r y t h i s m o d e l f o r s o m e s t r a t e g i e s o n t h e M u l t i -
m o d a l 1 0 0 D p r o b l e m . A s w e c a n s e e o n g u r e 1 0 , w i t h j u s t t w o p o i n t s
r a p i d l y c o m p u t e d w i t h q u i t e s m a l l n u m b e r s o f e v a l u a t i o n s , w e s o m e -
t i m e s c a n h a v e a p r e t t y g o o d i d e a o f t h e w h o l e p e r f o r m a n c e c u r v e
( s e e M o d e l 7 S 3 5 K 2 ) . H o w e v e r w i t h s o m e l e s s e c i e n t s t r a t e g i e s
t h e a d e q u a c y i s n o t t h a t g o o d ( s e e M o d e l 1 1 S 3 5 K 2 ) , f o r t h e m o d e l
t e n d s h e r e t o b e t o o o p t i m i s t i c f o r h i g h n u m b e r o f e v a l u a t i o n s . S o i t
s t i l l h a s t o b e r e n e d .
H o w e v e r , i t i s a l w a y s p o s s i b l e t o a d j u s t q u i t e w e l l t h e s i g m o i d c u r v e
t o t h e r e a l o n e b y d i r e c t l y c a r e f u l l y c h o o s i n g t h e t w o p a r a m e t e r s
a n d
. A f t e r a l l , i t i s j u s t a 2 D o p t i m i s a t i o n p r o b l e m ! A s w e c a n
s e e f r o m t h e e q u a t i o n s 5 , t h e
p a r a m e t e r i s t h e m o s t i m p o r t a n t :
i t c h a r a c t e r i z e s h o w e c i e n t i s t h e a l g o r i t h m o n t h e g i v e n p r o b l e m .
F o r e x a m p l e , f o r t h e b a s i c s t r a t e g i e s , t h e s e c h a r a c t e r i s t i c v a l u e s a r e
r e s p e c t i v e l y
0f o r D e r i v a t i o n 0 , w h i c h i s c o m p l e t e l y u n e c i e n t ,
0.0009f o r D e r i v a t i o n 7 , 0.0002 f o r D e r i v a t i o n 1 1 , a n d 0.004 f o r D e r i v a t i o n 1 0 0 , w h i c h i s l a r g e l y t h e b e s t o n e .
3 0
7/30/2019 Binary PSO
31/42
7 . 3 P r o b a b i l i t y d i s t r i b u t i o n s
7 . 3 . 1 S w i t c h i n g b i t s
L e tg
b e a p o s i t i o n ( a D - v e c t o r ) . L e t ' s s u p p o s e w e a r e l o o k i n g a t
r a n d o m a r o u n d g
, m o r e o r l e s s l i k e i n D e r i v a t i o n 1 1 . I t m e a n s :
1 . c h o o s e a m a x i m u m n u m b e r o f b i t s t o s w i t c h , i n [1, D]
2 . c h o o s e a t r a n d o m ( u n i f o r m d i s t r i b u t i o n ) a g i v e n n u m b e r
ko f b i t s t o
s w i t c h ,
ki n [1, ] . N o t e t h a t f o r D e r i v a t i o n 1 1 , k i s i n [2, ].
3 . c h o o s e
kt i m e s a t r a n d o m ( u n i f o r m d i s t r i b u t i o n ) a b i t i n
g, a n d s w i t c h i t
T h e q u e s t i o n i s : w h a t i s t h e p r o b a b i l i t y
(D,, )t o n d a p o i n t t h a t
i s a t t h e H a m m i n g d i s t a n c e
o f
g? O r , i n o t h e r w o r d s , w h a t i s t h e
p r o b a b i l i t y d i s t r i b u t i o n a r o u n d g
? L e t ' s s e e w h a t h a p p e n s f o r e a c h
p o s s i b l e k
v a l u e . O b v i o u s l y , i f k <
t h e r e i s n o w a y t o n d s u c h
a p o i n t . F o r g r e a t e r k
v a l u e s , w e h a v e t o c o m p u t e t h e n u m b e r o f
s u r j e c t i o n s s (k, ) f r o m a s e t w i t h k e l e m e n t s t o a s e t w i t h e l e m e n t s .
F o r = 1, t h i s n u m b e r i s o f c o u r s e j u s t 1 , a n d f o r o t h e r v a l u e s , w e
h a v e t h e c l a s s i c a l f o r m u l a
s (k, ) = (s (k 1, ) + s (k, 1))
a n d w e c a n t h e n p r o g r e s s i v e l y c o m p u t e a l l t h e s e n u m b e r s o f s u r j e c -
t i o n s . N o w , f o r a g i v e n
Da n d a g i v e n
, t h e r e a r e
CD p o s s i b l e c o m b i n a - t i o n s . F o r a g i v e n
kw e c o n s i d e r a l l p o s s i b l e
v a l u e s , a n d , a t l a s t , e a c h
kv a l u e h a s t h e p r o b a b i l i t y 1/ t o b e c h o s e n . S o , n a l l y , w e o b t a i n o u r
p r o b a b i l i t y b y t h e f o r m u l a
(D,, ) =1
k=1
s (k, ) CD
i=1
s (k, i) CiD
T h i s q u a n t i t y t e n d s t o w a r d s 1/ w h e n /D t e n d s t o w a r d s z e r o . S o t h e r e s u l t i n g d i s t r i b u t i o n t e n d s t o b e u n i f o r m , a l t h o u g h i t i s n o t f o r
s m a l l
Dv a l u e s , a s s h o w n o n g u r e 1 1 .
I n t u i t i v e l y , i t c o u l d s e e m b e t t e r t o u s e f o r
ka b e l l - s h a p e d i s t r i b u t i o n
i n o r d e r t o p r i v i l e g i a t e s m a l l
v a l u e s , f o r e x a m p l e s o m e t h i n g l i k e
proba (k = ) =1/
i=1
1/i
( 6 )
3 1
7/30/2019 Binary PSO
32/42
F i g u r e 1 1 : P r o b a b i l i t y t o n d a p o s i t i o n a t d i s t a n c e w h e n t h e r a d i u s i se q u a l t o 3, a n d w h i t h k {1, } . I t t e n d s t o b e u n i f o r m w h e n t h e d i m e n s i o n i n c r e a s e s
F i g u r e 1 2 : T h e r s t t h r e e c u r v e s s h o w t h e p r o b a b i l i t y t o n d a p o s i t i o n a t
d i s t a n c e w h e n t h e r a d i u s i s e q u a l t o 3 , a n d w i t h k {2, } a s i n D e r i v a t i o n 1 1 . T h e p r o b a b i l i t y t o s w i t c h j u s t o n e b i t i s n o t n u l l , b u t v e r y l o w . T h e l a s t
c u r v e i s o b t a i n e d w h e n t h e k d i s t r i b u t i o n i s a b e l l - s h a p e o n e g i v e n b y e q u a t i o n ? ?
3 2
7/30/2019 Binary PSO
33/42
S o m e p r e l i m i n a r y t e s t s a r e n o t r e a l l y c o n v i n c i n g . A l s o , D e r i v a t i o n
1 1 w o r k s p r e t t y w e l l w i t h a d i s t r i b u t i o n t h a t g i v e s o n t h e c o n t r a r y a
v e r y l o w w e i g h t t o p o s i t i o n s a t d i s t a n c e 1 ( s e e g u r e 1 2 ) . H o w e v e r ,
t h e s e a r c h p o w e r , a s d e n e d b e l o w , i s a b i t h i g h e r , s o i t m a y b e
w o r t h y t o m o r e c a r e f u l l y s t u d y t h i s a p p r o a c h .
7 . 4 I n f o r m a n t g r o u p s i z e
7 . 4 . 1 E x a c t f o r m u l a
W e h a v e s e e n t h a t e a c h p a r t i c l e g e n e r a t e s a t r a n d o m
K1i n f o r m a t i o n
l i n k s . I t i s p e r f e c t l y p o s s i b l e t h a t t w o o r m o r e o f t h e s e l i n k s p o i n t
t o w a r d s t h e s a m e p a r t i c l e . S o , a n i n t e r e s t i n g q u e s t i o n i s t o e s t i m a t e
h o w m a n y i n f o r m a t i o n l i n k s a g i v e n p a r t i c l e r e c e i v e s
, o r , i n o t h e r
w o r d s , w h a t i s t h e m e a n s i z e o f i t s i n f o r m a n t g r o u p .
L e t ' s c a l l A t h i s p a r t i c l e . W h e n a n o t h e r p a r t i c l e B g e n e r a t e s i t s l i n k s ,
t h e p r o b a b i l i t y t h a t n o n e o f t h e m r e a c h s A i s s i m p l y ((S 1) /S). A n d o f c o u r s e o n t h e c o n t r a r y t h e p r o b a b i l i t y t h a t B d o e s i n f o r m A i s t h e
c o m p l e m e n t t o 1 o f t h i s v a l u e . N o w , i f t h e i n f o r m a n t g r o u p s i z e i s
e x a c t l y L
( n o t t a k i n g A i n t o a c c o u n t ) , i t m e a n s t h a t L
o t h e r p a r t i c l e s
d o i n f o r m A a n d t h a t t h e S 1 L o t h e r d o n ' t . T h e r e a r e CLS1 s u c h
p o s s i b i l i t i e s . S o , n a l l y , t h e p r o b a b i l i t y t h a t e x a c t l y
Lo t h e r p a r t i c l e s
i n f o r m A i s g i v e n b y
(S,K,L) = CLS1
1
S 1S
K1L S 1
S
(K1)(S1L)( 7 )
T h e m e a n v a l u e w e a r e l o o k i n g f o r i s t h e n
L = S1L=0
(S,K,L) ( 8 )
W e j u s t h a v e t o a d d 1 f o r t h e c o m p l e t e i n f o r m a n t g r o u p t h a t i n c l u d e
t h e p a r t i c l e i t s e l f .
7 . 4 . 2 E x a m p l e
W e c a n a p p l y t h e s e f o r m u l a s t o a n e x a m p l e w i t h s a y S = 35. F o r t h e t h r e e c u r v e s o n 1 3 ( o n t h e l e f t ) t h e m e a n v a l u e s a r e r e s p e c t i v e l y 1 . 9 f o r K = 3 , 7 . 8 f o r
K = 10 , a n d 2 1 . 3 f o r K = S = 35. S o , a l t h o u g h i t c o u l d i n t u i t i v e l y s e e m t h a t t h e s e n u m b e r s s h o u l d b e m o r e o r l e s s e q u a l t o S/K, t h e r e a r e a l w a y s s m a l l e r ,e v e n f o r K = S.
3 3
7/30/2019 Binary PSO
34/42
F i g u r e 1 3 : I n f o r m a n t g r o u p e s i z e f o r d i e r e n t K v a l u e s ( o n t h e l e f t ) , a n d m e a n g r o u p s i z e ( o n t h e r i g h t ) . T h e s w a r m s i z e S i s e q u a l t o 3 5 . A s t h e l i n k s a r e r a n d o m l y c h o s e n , e v e n w h e n K = S t h e m e a n n u m b e r o f i n f o r m a n t s o f a g i v e n p a r t i c l e i s s i g n i c a n t l y s m a l l e r t h a n S
7 . 4 . 3 S i m p l i e d f o r m u l a
F o r m u l a 8 t o n d t h e m e a n i n f o r m a n t g r o u p s i z e i s a b i t c o m p l i c a t e d .
W e c a n m a k e a n a p p r o x i m a t i o n b y n o t i n g t h a t t h e c u r v e s o n g u r e
1 3 a r e a l m o s t s y m m e t r i c a l , a n d t h e m a x i m u m v a l u e f o r (S,K,L) i s
t h e n r e a c h e d o n a
Lv a l u e j u s t a b i t s m a l