It's not used yet. I have not exactly decided the best way to name
stochastic variators, and 'sv_dif' is temporary name for the variator used
in differential evolution. I can change to 'diff' if you think it's better.


On Wed, Jun 4, 2014 at 3:12 PM, Jason Ansel <notifications@github.com>
wrote:

> In opentuner/search/manipulator.py:
>
> > +    d = int(round(self.size*strength))
> > +    if d<1:
> > +      log.warning('Crossover length too small. Cannot create new solution.')
> > +    if  d>=self.size:
> > +      log.warning('Crossover length too big. Cannot create new solution.')
> > +    getattr(self, cname)(new, cfg1, cfg2, d=self.size*strength)
> > +
> > +  def sv_swarm(self, position, global_best, local_best, c_choice, omega=1, phi_g=0.5, phi_l=0.5,  strength=0.3 ):
> > +    if random.uniform(0,1)>omega:
> > +      if random.uniform(0,1)<phi_l:
> > +      # Select crossover operator
> > +        self.sv_cross(position, position, global_best, c_choice, strength)
> > +      else:
> > +        self.sv_cross(position, position, local_best, c_choice, strength)
> > +
> > +  def sv_dif(self):
>
> Is this used? Should it be diff?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jansel/opentuner/pull/22/files#r13404649>.
>