class_docstr: Covariance Matrix Adaptation Evolution Strategy.
  
  Note:
      The CMA-ES method can hardly learn a successful policy even for
      simple task. It is still maintained here only for consistency with
      original rllab paper.
  
  Args:
      env_spec (EnvSpec): Environment specification.
      policy (garage.np.policies.Policy): Action policy.
      sampler (garage.sampler.Sampler): Sampler.
      n_samples (int): Number of policies sampled in one epoch.
      discount (float): Environment reward discount.
      sigma0 (float): Initial std for param distribution.
class_docstr_tok: ["Covariance","Matrix","Adaptation","Evolution","Strategy",".","Note",":","The","CMA-ES","method","can","hardly","learn","a","successful","policy","even","for","simple","task",".","It","is","still","maintained","here","only","for","consistency","with","original","rllab","paper",".","Args",":","env_spec","(","EnvSpec",")",":","Environment","specification",".","policy","(","garage.np.policies.Policy",")",":","Action","policy",".","sampler","(","garage.sampler.Sampler",")",":","Sampler",".","n_samples","(","int",")",":","Number","of","policies","sampled","in","one","epoch",".","discount","(","float",")",":","Environment","reward","discount",".","sigma0","(","float",")",":","Initial","std","for","param","distribution","."]
code: def __init__(
      self,
      env_spec,
      policy,
      sampler,
      n_samples,
      discount=0.99,
      sigma0=1.0,
  ):
      self.policy = policy
      self.max_episode_length = env_spec.max_episode_length
      self._sampler = sampler
  
      self._env_spec = env_spec
      self._discount = discount
      self._sigma0 = sigma0
      self._n_samples = n_samples
      self._episode_reward_mean = collections.deque(maxlen=100)
  
      self._es = None
      self._all_params = None
      self._cur_params = None
      self._all_returns = None
  
file_path: garage/src/garage/np/algos/cma_es.py
imports: import collections
  import cma
  from dowel import logger, tabular
  import numpy
  from garage import log_performance
  from garage.np.algos.rl_algorithm import RLAlgorithm
label_desc: Use image node_id 1 to create a new CMAES object from inherited base classes: RLAlgorithm with example: obj = CMAES(env_spec, policy, sampler, n_samples, discount, sigma0)