':param env: Environment
:param policy: Policy
:type policy: Policy
:param baseline: Baseline
:param scope: Scope for identifying the algorithm. Must be specified if running multiple algorithms
simultaneously, each using different environments and policies
:param n_itr: Number of iterations.
:param start_itr: Starting iteration.
:param batch_size: Number of samples per iteration.
:param max_path_length: Maximum length of a single rollout.
:param discount: Discount.
:param gae_lambda: Lambda used for generalized advantage estimation.
:param plot: Plot evaluation run after each iteration.
:param pause_for_plot: Whether to pause before contiuing when plotting.
:param center_adv: Whether to rescale the advantages so that they have mean 0 and standard deviation 1.
:param positive_adv: Whether to shift the advantages so that they are always positive. When used in
conjunction with center_adv the advantages will be standardized before shifting.
:param store_paths: Whether to save all paths data to the snapshot.'

def __init__(self, env, policy, baseline, scope=None, n_itr=500, start_itr=0, batch_size=5000, max_path_length=500, discount=0.99, gae_lambda=1, plot=False, pause_for_plot=False, center_adv=True, positive_adv=False, store_paths=False, whole_paths=True, sampler_cls=None, sampler_args=None, **kwargs):

    self.env = env
    self.policy = policy
    self.baseline = baseline
    self.scope = scope
    self.n_itr = n_itr
    self.current_itr = start_itr
    self.batch_size = batch_size
    self.max_path_length = max_path_length
    self.discount = discount
    self.gae_lambda = gae_lambda
    self.plot = plot
    self.pause_for_plot = pause_for_plot
    self.center_adv = center_adv
    self.positive_adv = positive_adv
    self.store_paths = store_paths
    self.whole_paths = whole_paths
    if (sampler_cls is None):
        sampler_cls = BatchSampler
    if (sampler_args is None):
        sampler_args = dict()
    self.sampler = sampler_cls(self, **sampler_args)
