title: Evolution strategy with individual stepsizes
body: <p>I'm trying to find a good solution with an evolution strategy for a 30 dimensional minimization problem. Now I have developed with success a simple (1,1) ES and also a self-adaptive (1,lambda) ES with one step size.</p>
  
  <p>The next step is to create a (1,lambda) ES with individual stepsizes per dimension. The problem is that my MATLAB code doesn't work yet. I'm testing on the sphere objective function:</p>
  
  <pre><code>function f = sphere(x)
      f = sum(x.^2);
  end
  </code></pre>
  
  <p>The plotted results of the ES with one step size vs. the one with individual stepsizes:</p>
  
  <p><a href="https://i.stack.imgur.com/hLRqI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hLRqI.png" alt="results"></a></p>
  
  <p>The blue line is the performance of the ES with individual step sizes and the red one is for the ES with one step size.</p>
  
  <p>The code for the (1,lambda) ES with multiple stepsizes:</p>
  
  <pre><code>% Strategy parameters
  tau = 1 / sqrt(2 * sqrt(N));
  tau_prime = 1 / sqrt(2 * N);
  lambda = 10;
  
  % Initialize
  xp = (ub - lb) .* rand(N, 1) + lb;
  sigmap = (ub - lb) / (3 * sqrt(N));
  fp = feval(fitnessfct, xp');
  evalcount = 1;
  
  % Evolution cycle
  while evalcount &lt;= stopeval
  
      % Generate offsprings and evaluate
      for i = 1 : lambda
          rand_scalar = randn();
  
          for j = 1 : N
              Osigma(j,i) = sigmap(j) .* exp(tau_prime * rand_scalar + tau * randn());
          end
  
          O(:,i) = xp + Osigma(:,i) .* rand(N,1);
          fo(i) = feval(fitnessfct, O(:,i)');
      end
  
      evalcount = evalcount + lambda;
  
      % Select best
      [~, sortindex] = sort(fo);
      xp = O(:,sortindex(1));
      fp = fo(sortindex(1));
      sigmap = Osigma(:,sortindex(1));
  end
  </code></pre>
  
  <p>Does anybody see the problem? </p>