class_docstr: Experimental evolution-strategy-like algorithm
  The API is going to evolve
  
  Parameters
  ----------
  recombination_ratio: float
      probability of using a recombination (after the mutation) for generating new offsprings
  popsize: int
      population size of the parents (lambda)
  offsprings: int
      number of generated offsprings (mu)
  only_offsprings: bool
      use only offsprings for the new generation if True (True: lambda,mu, False: lambda+mu)
  ranker: str
      ranker for the multiobjective case (defaults to NSGA2)
class_docstr_tok: ["Experimental","evolution-strategy-like","algorithm","The","API","is","going","to","evolve","Parameters","--","--","--","--","--","recombination_ratio",":","float","probability","of","using","a","recombination","(","after","the","mutation",")","for","generating","new","offsprings","popsize",":","int","population","size","of","the","parents","(","lambda",")","offsprings",":","int","number","of","generated","offsprings","(","mu",")","only_offsprings",":","bool","use","only","offsprings","for","the","new","generation","if","True","(","True",":","lambda",",","mu",",","False",":","lambda+mu",")","ranker",":","str","ranker","for","the","multiobjective","case","(","defaults","to","NSGA2",")"]
code: def __init__(
      self,
      *,
      recombination_ratio: float = 0,
      popsize: int = 40,
      offsprings: tp.Optional[int] = None,
      only_offsprings: bool = False,
      ranker: str = "nsga2",
  ) -> None:
      super().__init__(_EvolutionStrategy, locals(), as_config=True)
      assert (
          offsprings is None
          or not only_offsprings
          or offsprings > popsize
      )
      if only_offsprings:
          assert (
              offsprings is not None
          ), "only_offsprings only work if offsprings is not None (non-DE mode)"
      assert 0 <= recombination_ratio <= 1
      assert ranker in ["simple", "nsga2"]
      self.recombination_ratio = recombination_ratio
      self.popsize = popsize
      self.offsprings = offsprings
      self.only_offsprings = only_offsprings
      self.ranker = ranker
  
file_path: nevergrad/nevergrad/optimization/es.py
imports: import warnings
  import nevergrad.common.typing
  from nevergrad.parametrization import parameter
  from nevergrad.optimization.utils import UidQueue
  from .None import base
  from .multiobjective import nsga2
label_desc: Use image node_id 1 to create a new EvolutionStrategy object from inherited base classes: base with example: obj = EvolutionStrategy()