2010 Second World Congress on Nature and Biologically Inspired Computing Dec.

15-17, 2010 in Kitakyushu, Fukuoka, Japan

Binary Invasive Weed Optimization
Christian Veenhuis Berlin University of Technology Berlin, Germany veenhuis@googlemail.com

Abstract—Recently, a new evolutionary algorithm for optimization in continuous spaces called Invasive Weed Optimization (IWO) was introduced. Since IWO employs a real-valued vector representation, the question arises whether it can also be used for problem domains that need a binary encoding. This paper introduces a binary IWO (BinIWO) concept in which the weeds and seeds are defined as bitstrings. The reproduction operation determines the offspring in a normally distributed neighborhood in the space of bitstrings. Thereby, the normal distribution is not defined over the bitstrings, but over the number of bits to be different in the offspring. BinIWO is applied to four typical benchmark functions known from literature and exhibits promising results.

this, in section III, the Binary Invasive Weed Optimization approach is defined. In sections IV and V the conducted experiments and some results are presented. Finally, in section VI, some conclusions are drawn. II. I NVASIVE W EED O PTIMIZATION In [5] the authors introduced the Invasive Weed Optimization (IWO) algorithm, which is based on the colonization behavior of invasive weeds. Generally speaking, a weed is a plant that grows where it is not desired. In agriculture this term is used especially for plants whose growth habits are a threat to cultivated plants. Weeds exhibit interesting properties as for instance robustness and adaptivity. In IWO a weed is substituted by a point in a search space in which a colony of those points grows to the optima. Let D be the dimension of the problem (i.e., the dimension of the search space ℝD ), Pinit the initial size of the weed colony / population, Pmax the maximum size of the colony (1 ≤ Pinit ≤ Pmax ) and W the set of weeds W = {W1 , ...,W∣W ∣ }. Each weed Wi ∈ ℝD is a point in the search space. To compute the fitness of a weed, a fitness function F : ℝD → ℝ is used. Initialization. Firstly, the generation counter G is set to 0. Then, the initial colony W is created by randomly creating Pinit uniformly distributed weeds Wi (Wi ∼ U (Xmin , Xmax )D ). The lower and upper bounds (Xmin and Xmax ) of the search space are problem-dependent. Iteration. The iteration works as follows. Each weed Wi in the current colony is reproduced by a certain number of seeds. The number of seeds Snum is determined proportional to the weeds fitness, whereby it is linearly mapped based on the colonies best and worse fitness Fbest and Fworse : Snum = Smin + F(Wi ) − Fworse (Smax − Smin ) Fbest − Fworse (1)

I. I NTRODUCTION In [5] the authors introduced a new evolutionary algorithm for optimization called Invasive Weed Optimization (IWO). Invasive weeds are an annoyance in agriculture, because of their robustness and adaptivity they can not be removed reliably. But their colonization behavior can be used to solve optimization tasks, as realized by the IWO algorithm. IWO maintains a colony of weeds in a search-space. Weeds reproduce by placing their offspring in their neighborhood. The fitter a weed, the more offspring it creates. After a certain time, the colony grows to the optima in the searchspace. The representation used in IWO is a real-valued vector, as typical for most optimizers. This raises the question, whether IWO can also be used for problem domains that need a binary encoding. Other works, as for instance the Binary Particle Swarm Optimization [2], show that optimizers can be successfully transformed from a real-vector to a bitstring representation. This paper introduces the Binary Invasive Weed Optimization (BinIWO) approach. In standard IWO a weed is reproduced by adding a normally distributed step-size, whose standard deviation decreases over time. But a stepsize in a binary space does not make sense. Thus, in BinIWO the normal distribution is defined over the number of bits to be different in the offspring. This favors a less number of differences and the less bits are different, the less the distance to the parental weed. The results obtained are promising. This paper is organized as follows. Section II introduces the Invasive Weed Optimization algorithm. Derived from

The Smin and Smax parameters are the minimum and maximum number of allowed seeds per weed. All Snum seeds S j are created in the neighborhood of the current weed Wi by using a normal distribution with zero mean and varying standard deviation: 1
1 Sometimes in this paper a distribution is used like a function although this is not valid in a strict mathematical sense. In these cases it means what one expects: it returns a draw according to the distribution.

978-1-4244-7376-2/10/$26.00 ©2010 IEEE

449

E XPERIMENTS To evaluate the capabilities of BinIWO. σG )D = N (Wi . the probability of a single bit to be changed is computed in a second step. 2010 in Kitakyushu..12. 1 >) = 0 2 Sampling out of N + (0. the closer lies the seed to its parental weed. Rosenbrock. Finally. Griewank). This includes a re-definition of the + operator and a change in the meaning of N (0. N (0.00 ©2010 IEEE 450 . The fitness function changes to F : 𝔹D → ℝ. Fukuoka. σG ): 2 The standard deviation σG starts at σinit and is nonlinearly reduced over the whole run to σ f inal . But a step-size does not make sense if bits are used. ⋅ ⋅ ⋅ . Such a stepsize could either be 0 or 1. σ ) can be done. σG ) := N (Wi . σG ) ⇔ Number of bits to be changed Based on the number of bits. This way the number of bits to be changed reduces. ⋅ ⋅ ⋅ . representing all four combinations of unimodal/multimodal with/without dependencies between the variables. σG )D returns a normally distributed step-size. σG )D .048. Each weed Wi ∈ 𝔹D as well as all reproduced seeds are now points in the space of bitstrings. As first step. The worse ones are removed. the new colony is sorted according to fitness and the Pmax best weeds are kept.2010 Second World Congress on Nature and Biologically Inspired Computing Dec. The meaning of the normally distributed random numbers (Xmin . If the size of this new colony reaches Pmax . but it is a bit more difficult as Sphere. σG ) allows also negative values. These numbers of bits are drawn from a normal distribution to keep a senseful standard deviation σG . Xmax ) := (−5.048) : f (< 1. IV.12) Global minimum : f (< 0. It’s defined as this: f (< xi >) (Xmin . too. For the current generation G it is computed as σG = σ f inal + (Niter − G)σmod (σinit − σ f inal ) (Niter )σmod (3) whereby Niter denotes the maximum number of iterations and σmod a non-linear modulation index. whereby the question raises what 1 + 1 means for bits or what is a senseful definition of +. 2. What is needed is a neighborhood operator N(Wi . Xmax ) Global minimum = n−1 i=1 ∑ (100 ⋅ (xi+1 − xi2 )2 + (xi − 1)2 ) := (−2. To be able to use IWO for problems that need a binary encoding. Thus. were chosen. two aspects of IWO need to be changed. Finally. (The standard IWO approach uses N(Wi . the given weed Wi is copied to the seed S and all D bits of this seed S are changed according to the pre-computed probability. the real vector space ℝD changes to a bitstring space 𝔹D with 𝔹 = {0.g. On the other hand. σG ) that produces seeds being near to the weed Wi . which make no sense as numbers of bits. σG )D (1 ≤ j ≤ Snum ) (2) N (0. 0 >) = 0 Rosenbrock is also a unimodal function. the random numbers are only sampled out of the positive half denoted as N + (0. σG )D . σG )D (4) N + (0. e. Rastrigin. But S j = Wi + N (0. the next colony is built by a union of the current colony with all created seeds (offspring) of all weeds. whereby the degree of nearness can be controlled by the σG parameter to maintain the reduction mechanism of IWO. the representation dependent operation Wi + N (0. The core of this procedure resembles the typical mutation operation in genetic algorithms. σG ) or by computing a histogram and using roulette wheel sampling. In IWO. four typical benchmark functions as known from literature (Sphere.g. because there are some dependencies between the variables. To get rid of the + operator. which is added to the current weed Wi . too. Japan changes from a step-size to a degree of ’mutation’. The difference is that the mutation probability is not pre-defined. the number of those bits is determined that have to be different in the seed. 5. the normal distribution is lost here including the (reduction) mechanism of the standard deviation σG . Sphere is the following simple unimodal function without dependencies between the variables: f (< xi >) = i=1 ∑ xi2 n is merely a point in the normally distributed neighborhood of the weed. Although one can imagine operations for + (e.) The Binary Invasive Weed Optimization (BinIWO) defines N(Wi . but based on a normal distribution whose standard deviation decreases over time. The less bits to change.. On the one hand. σG )D needs to be adapted. 978-1-4244-7376-2/10/$26. by simply throwing away G all drawn negative values from N (0. σG ) as presented in Algorithm 1. exclusive / inclusive or). III. B INARY I NVASIVE W EED O PTIMIZATION The representation used in IWO is a real-valued vector. 15-17. a more general view on the operation is employed and uses the fact that a seed S j = Wi + N (0. 1}.

the particle neighborhood topologies used are the star and ring structures [3]. // Draw uniform random number Rastrigin is the following multimodal function without dependencies between the variables: f (< xi >) (Xmin .12) : f (< 0. Afterwards. Nbits } do 4: ni ← ni ≪ 1 // Shift all one to left 5: ni ← ni + (vi )d // Add next bit 6: end for 2) Then. which uses a binary encoding. a real value is encoded as a vector of Nbits bits. 1].. 1. This is realized by performing the following steps for each vi : 1) The bitstring of a value vi is interpreted as a natural number ni and converted by this: 1: ni ← (vi )1 // Start with first bit. Two successive natural numbers n and n + 1 produce a difference of 978-1-4244-7376-2/10/$26. 15-17. 0.and append all others 3: for all d ∈ {2. 1) if r < pchange then Sd ← ¬Sd end if end for return S rbits D // Number of bits to be changed // Probability of a bit to be changed // Overtake weed as seed. 1. 0. 1)T if Nbits = 10. 1.2010 Second World Congress on Nature and Biologically Inspired Computing Dec. ⋅ ⋅ ⋅ . the BinIWO approach... 600) : f (< 0.. Xmax ]. its bitstring needs to be converted to a real-valued vector.12. vn )T (5) := (−5.e. this natural number ni is divided by the maximum possible value that can be represented by the bitstring to normalize it to the interval [0. Japan Algorithm 1 Binary Neighbor Operator N(Wi . BinIWO is compared to the typical gbest and lbest variants. D} do r ∼ U (0.00 ©2010 IEEE 451 . the dimension of 𝔹D is computed as Nbits times the dimension of the benchmark problem. 0 >) = 0 Griewank is a multimodal function with strong dependencies between the variables and is defined as follows: f (< xi >) (Xmin . v2 . 1.. 0 >) = 0 For each of these benchmark functions. encoding reals as bitstrings leads to some imprecision. 2: // . e. σG ) pchange ← S ← Wi // . A binary Of course. i. Xmax ) Global minimum = 1+ ∑ n 2 xi xi − ∏ cos( √ ) i i=1 i=1 4000 n To evaluate a binary weed. ⋅ ⋅ ⋅ . 2010 in Kitakyushu. 0. The whole procedure is defined as the function Nat2Real : ℕ → ℝ: Nat2Real(n) = Xmin + n (Xmax − Xmin ) 2Nbits − 1 (6) := (−600. ⋅ ⋅ ⋅ . ⋅ ⋅ ⋅ ..g. the standard IWO method as well as the Binary PSO method were conducted. 5.: vi = (0.and change rbits bits for all d ∈ {1. The Binary PSO [2] is the Particle Swarm Optimization as introduced by Kennedy and Eberhart [1] [4]. Xmax ) Global minimum = 2 10 ⋅ n + ∑ (xi − 10 ⋅ cos(2 ⋅ π ⋅ xi )) i=1 n weed for an n-dimensional benchmark problem is encoded as: Wi = (v1 . σG ) 1: input: Wi 2: input: σG 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: rbits ∼ N + (0. 1. Since the used benchmark functions are defined for realvalued vectors. Fukuoka.. Thus.. it is mapped to the problem-specific interval [Xmin . ⋅ ⋅ ⋅ ..

In Table I the Sphere benchmark for 10 dimensions is solved by all binary methods with a standard deviation of 0. V. ⋅⋅⋅ ⋅⋅⋅ .3 g-1 . This can be observed for all dimensions (not all presented due to space limitations). If one of both closest bitstring approximations to 0 is taken (524287 or 524288) and the best possible real-value is used as minimizer for the Sphere benchmark. the numerical results for dimensions D = 10 and D = 30 are presented in Tables I and II. all binary approaches outperformed the real-valued one. A value in column ’Avg.. 50 for each benchmark function.’ is the average g value over 100 runs. . it can be expected that not all problems are perfectly solvable.50 ∈ ℕ The range [Xmin . ⋅ ⋅ ⋅. Rastrigin). On the one hand. .) Thus. The experiments were conducted with the dimensions 10. . An eye-catching aspect is that no one of the used methods could solve the problems exactly (leading to a perfect hit rate of 0% for all). Thus. BinIWO performs comparable to the best PSO variant. Increasing the length of the bitstrings increases the precision.e. the gbest PSO is the winner in 3 of 4 cases. another reason is that the minimizers of the used benchmark functions are either ⃗ or ⃗ vectors. For Binary PSO. 0.50 ∈ ℕ / Nat2Real −1 (1) = 780287. a perfect hit needs to find bitstrings 0 1 that represent the real-values 0 or 1.26 ∈ ℕ / Nat2Real −1 (0) = 524287. (The fact that 3 benchmark functions have the same ’natural’ is due to the symmetry of the used bounds. g is the generation. Nbits gbest 20 6 1 2 2 20 lbest 20 6 1 2 2 1 20 The plots in Figure 1 reveal that BinIWO’s performance is close to the appropriate best PSO variant (three times gbest and one time lbest). Gen.000000000238 i=1 10 10 which is the solution found by all binary methods. the column ’Perfect hits (%)’ shows how many of the runs could find a perfect solution. The column ’Avg. There.1) occurred.0 and the same fitness. 0. Japan Xmax − Xmin Nat2Real(n + 1) − Nat2Real(n) = N 2 bits − 1 (7) Thus. 20. 0. D is the dimension of the benchmark problem multiplied by Nbits bits for each real-value.8 1 . perfect hits are not possible. Assumed. Gen. Fukuoka.50 ∈ ℕ / Nat2Real −1 (0) = 524287. 978-1-4244-7376-2/10/$26. the following parameters were used: Num. ⋅⋅⋅ ⋅⋅⋅ .2010 Second World Congress on Nature and Biologically Inspired Computing Dec. 2010 in Kitakyushu. for one benchmark (Rastrigin). but increases also the computational cost and feeds the curse of dimensionality. i=1 ∑ xi2 = ∑ Nat2Real(524287)2 = 0. the PSO variant is slightly better than BinIWO.1 g . i. the trade-off used is a length of Nbits = 20 bits per real-value throughout all experiments and methods. 0. Merely. too. For each benchmark function 100 independent runs with 1000 iterations were performed. 15-17. Two times (Sphere. This solution is a perfect hit according to the imprecision caused by the encoding. The Tables I and II present numerical results for the dimensions D = 10 and D = 30. But if we take the Nat2Real(n) = r mapping and use its inverse function Nat2Real −1 (r) = n = r − Xmin (2Nbits − 1) Xmax − Xmin (8) to determine the natural number (or bitstring) that is mapped to a specific real. there are no bitstrings that represent 0 or 1. Griewank). On the other hand. Then.0 20 Note that the dimension D is the dimension of the weed bitstrings. Xmax ] is set according to the benchmark functions (see above).0 3. In the other two cases (Rosenbrock. . Additionally. R ESULTS In Figure 1 the results over all considered dimensions are presented. one obtains is the convergence graph of a single run with 1000 iterations. In this work. ( 9. .1 g+1 . Among the two PSO variants. so it is not surprising that the binary approaches with a lower precision cannot find perfect hits.00 ©2010 IEEE 452 .1 ) 1000 Since Nat2Real −1 (0) and Nat2Real −1 (1) deliver nonnaturals. . The parameters used for the BinIWO approach were: Pinit Pmax Smin Smax σinit σ f inal σmod Nbits = = = = = = = = 5 20 1 10 D 1.’ presents the average number of needed generations to find a solution and is computed the following way. even the real-valued IWO has a perfect hit rate of 0%. of Particles Vmax Inertia Weight Cognitive Weight Social Weight Radius of Neighb. as would one expect. we find the following naturals for the given benchmarks: Sphere: Rosenbrock: Rastrigin: Griewank: / Nat2Real −1 (0) = 524287. where the best fitness of this run (0. The standard IWO approach with a real-valued representation is better than all binary approaches.

0 0.000041989707 0.00 881. Gen. F ITNESS ’.000000070369 2.06 984. one may wonder why BinIWO should be used in place of BinPSO.40 985.08 996.’ THE AVERAGE NUMBER OF NEEDED GENERATIONS FOR THE BEST SOLUTION OF A RUN .527573774841 24.000001444926 0.2010 Second World Congress on Nature and Biologically Inspired Computing Dec.001416908213 1.070853902972 0.99 995. Neither BinIWO nor BinPSO could solve the problems exactly. its performance is more or less comparable to the best PSO variant used.600389953540 10. 2010 in Kitakyushu.99 997.0 0.078311634243 123.25 660.092224937911 9.566266355693 5.093981767718 0. Gen.’ THE APPROPRIATE STANDARD DEVIATION .000000000238 0.525359415933 6. Thus. Since the performance of BinIWO is merely comparable to BinPSO for the used benchmarks.005876557490 43.057624284281 9.69 Table II R ESULTS FOR ALL BENCHMARK PROBLEMS FOR dimension D = 30.45 835.65 844.493473253314 s.427209396743 75.876940119625 0.874385446716 3. Compared to PSO.000000000238 0.430066007963 8.’ THE APPROPRIATE STANDARD DEVIATION .000015015993 0.06 995.109664950282 0. 993. According to the No Free Lunch theorem.120559346051 0. ’ S .d.074808695492 9.93 997.884085958674 7. Fitness 0.20 516.40 791.137714264290 4.643981351458 62.24 771. Thus.80 996.117605271792 Perfect hits (%) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Avg.117438932557 0.110612090161 53. which real-values a minimizer needs.90 998.241482425977 Perfect hits (%) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Avg. there will be problems.00 ©2010 IEEE 453 . but only approximately.115230752441 0.590889108129 0.757662691348 2.000001613151 0. G EN .443839274939 71. W ITHIN EACH BENCHMARK FUNCTION THE METHODS ARE RANKED ACCORDING TO ’AVG .74 993. ’P ERFECT HITS (%)’ THE PERCENTAGE OF PERFECT SOLUTIONS (F(Wi ) = 0) AND ’AVG . there is no algorithm that performs best in all possible problem domains. W ITHIN EACH BENCHMARK FUNCTION THE METHODS ARE RANKED ACCORDING TO ’AVG .99 995. D . F ITNESS ’. Japan Table I R ESULTS FOR ALL BENCHMARK PROBLEMS FOR dimension D = 10.000000206383 0.17 878.87 998. G EN .37 997.163435732997 11.000001395091 0.009591044672 0.481830805268 11.’ THE AVERAGE NUMBER OF NEEDED GENERATIONS FOR THE BEST SOLUTION OF A RUN .434003743979 0.009164015524 0.601224275027 12. 459.120543247779 0.000000000238 0.067283835514 0.029956724761 0.60 991.42 VI. C ONCLUSIONS In this paper an Invasive Weed Optimization with binary encoding (BinIWO) was introduced and applied to four typical benchmark functions. where BinPSO is not better 978-1-4244-7376-2/10/$26. Benchmark Sphere Sphere Sphere Sphere Rosenbrock Rosenbrock Rosenbrock Rosenbrock Rastrigin Rastrigin Rastrigin Rastrigin Griewank Griewank Griewank Griewank Method IWO BinPSO (gbest) BinIWO BinPSO (lbest) IWO BinIWO BinPSO (lbest) BinPSO (gbest) BinPSO (gbest) BinIWO BinPSO (lbest) IWO IWO BinPSO (gbest) BinIWO BinPSO (lbest) Avg. The normal distribution is realized over the number of different bits.000000016380 0. if the needed real-values are not represented exactly. One reason is the inherent imprecision of encoding reals as bitstrings. this needs not to be true in general.21 998. Nat2Real −1 (1) ∈ ℕ. T HE COLUMN ’AVG .28 533. T HE COLUMN ’AVG .09 995.340225946420 52. A possible solution (at least for lower dimensions) could be to use asymmetric bounds in a way that Nat2Real −1 (0).0 0. But in realworld applications one did not know. it fulfills this demand. Fitness 0.142093859528 0.62 999.200027882953 50.89 749.244865545201 51.183255949024 s. F ITNESS ’ IS THE BEST FITNESS VALUE REACHED ON AVERAGE . 0.049852115054 0. D . comparable to the standard IWO. The results indicate that IWO can also be used for binary problems. F ITNESS ’ IS THE BEST FITNESS VALUE REACHED ON AVERAGE . ’ S .473119685946 27.89 563.316101657106 68.878241293134 19. Fukuoka. a binary approach should also work. BinIWO determines its binary seeds (offspring) in a normally distributed neighborhood in the space of bitstrings.d.806654167004 3. Because BinIWO performs not worse than the Binary PSO method. ’P ERFECT HITS (%)’ THE PERCENTAGE OF PERFECT SOLUTIONS (F(Wi ) = 0) AND ’AVG .001061702228 27. Although BinIWO has no significant benefit for the four problems used as benchmarks. 0.93 997. Benchmark Sphere Sphere Sphere Sphere Rosenbrock Rosenbrock Rosenbrock Rosenbrock Rastrigin Rastrigin Rastrigin Rastrigin Griewank Griewank Griewank Griewank Method BinPSO (gbest) BinIWO BinPSO (lbest) IWO IWO BinPSO (lbest) BinIWO BinPSO (gbest) BinIWO BinPSO (lbest) IWO BinPSO (gbest) IWO BinPSO (lbest) BinIWO BinPSO (gbest) Avg. 15-17.42 984.

NJ.C.C. A novel numerical optimization algorithm inspired from weed colonization. Kennedy and R.06 250 Binary IWO Real-valued IWO Binary PSO (g-best) Binary PSO (l-best) Fitness for Rosenbrock Benchmark 0. of the World Multiconference on Systemics. Swarm Intelligence. Lucas. 2010 in Kitakyushu. Ecological Informatics.02 50 0 -0. 2001 [5] A. 4104-4109.2 Fitness 0. pp. Kennedy and R. 355-366. vol. IEEE Service Center. Piscataway. Perth. R EFERENCES [1] J. which sort of problem domains clearly benefit from BinIWO and which not. pp. In: Proc. 1931-1938.4 60 40 20 0 10 20 30 Dimension 40 50 10 20 0. Eberhart. Proceedings of the 1999 Conference on Evolutionary Computation. ISBN: 1-55860-595-9.4 Binary IWO Real-valued IWO Binary PSO (g-best) Binary PSO (l-best) Fitness for Griewank Benchmark 1.08 150 Fitness Fitness 0. Future works should work out. 1999 [4] J.1 0.04 100 0.2010 Second World Congress on Nature and Biologically Inspired Computing Dec. Kennedy. Fukuoka. Japan Fitness for Sphere Benchmark 0. IEEE International Conference on Neural Networks. than BinIWO. Eberhart.00 ©2010 IEEE 454 . pp. Mehrabian and C. Volume 3. Eberhart. Cybernetics and Informatics.C. Australia. 15-17.6 0 30 Dimension 40 50 Figure 1. 1995 [2] J. 1997 [3] J. 1. Morgan Kaufmann Publishers. A Discrete Binary Version of the Particle Swarm Algorithm.2 0. 2006 978-1-4244-7376-2/10/$26. Particle Swarm Optimization. Kennedy and R. The averaged fitness values obtained for all benchmark functions.12 Binary IWO Real-valued IWO Binary PSO (g-best) Binary PSO (l-best) 200 0. Small worlds and mega-minds: Effects of neighborhood topology on particle swarm performance.R.8 Binary IWO Real-valued IWO Binary PSO (g-best) Binary PSO (l-best) 1.02 10 20 30 Dimension 40 50 0 10 20 30 Dimension 40 50 Fitness for Rastrigin Benchmark 200 180 160 1 140 120 Fitness 100 80 0.

Sign up to vote on this title
UsefulNot useful