':type algo: BatchPolopt
:param n_backtrack: Number of past policies to update from
:param n_is_pretrain: Number of importance sampling iterations to
perform in beginning of training
:param init_is: (True/False) set initial iteration (after pretrain) an
importance sampling iteration
:param skip_is_itrs: (True/False) do not do any importance sampling
iterations (after pretrain)
:param hist_variance_penalty: penalize variance of historical policy
:param max_is_ratio: maximum allowed importance sampling ratio
:param ess_threshold: minimum effective sample size required'

def __init__(self, algo, n_backtrack='all', n_is_pretrain=0, init_is=0, skip_is_itrs=False, hist_variance_penalty=0.0, max_is_ratio=0, ess_threshold=0):

    self.n_backtrack = n_backtrack
    self.n_is_pretrain = n_is_pretrain
    self.skip_is_itrs = skip_is_itrs
    self.hist_variance_penalty = hist_variance_penalty
    self.max_is_ratio = max_is_ratio
    self.ess_threshold = ess_threshold
    self._hist = []
    self._is_itr = init_is
    super(ISSampler, self).__init__(algo)
