':param n_itr: Number of iterations.
:param max_path_length: Maximum length of a single rollout.
:param batch_size: # of samples from trajs from param distribution, when this
is set, n_samples is ignored
:param discount: Discount.
:param plot: Plot evaluation run after each iteration.
:param init_std: Initial std for param distribution
:param extra_std: Decaying std added to param distribution at each iteration
:param extra_decay_time: Iterations that it takes to decay extra std
:param n_samples: #of samples from param distribution
:param best_frac: Best fraction of the sampled params
:param n_evals: # of evals per sample from the param distr. returned score is mean - stderr of evals
:return:'

def __init__(self, env, policy, n_itr=500, max_path_length=500, discount=0.99, init_std=1.0, n_samples=100, batch_size=None, best_frac=0.05, extra_std=1.0, extra_decay_time=100, plot=False, n_evals=1, **kwargs):

    Serializable.quick_init(self, locals())
    self.env = env
    self.policy = policy
    self.batch_size = batch_size
    self.plot = plot
    self.extra_decay_time = extra_decay_time
    self.extra_std = extra_std
    self.best_frac = best_frac
    self.n_samples = n_samples
    self.init_std = init_std
    self.discount = discount
    self.max_path_length = max_path_length
    self.n_itr = n_itr
    self.n_evals = n_evals
