def METHOD_NAME(self,
               on_policy=False,
               sac=True,
               use_rnn=False,
               priority_replay=False):
    logging.info(
        "sac=%d on_policy=%s use_rnn=%s" % (sac, on_policy, use_rnn))
    env_class = PolicyUnittestEnv
    iterations = 500
    num_env = 128
    if on_policy:
        num_env = 128
    steps_per_episode = 12
    env = env_class(
        num_env, steps_per_episode, action_type=ActionType.Continuous)
    eval_env = env_class(
        100, steps_per_episode, action_type=ActionType.Continuous)
    algorithm = _create_algorithm(
        env,
        on_policy=on_policy,
        sac=sac,
        use_rnn=use_rnn,
        priority_replay=priority_replay)
    env.reset()
    eval_env.reset()
    for i in range(iterations):
        algorithm.train_iter()
        eval_env.reset()
        eval_time_step = unroll(eval_env, algorithm, steps_per_episode - 1)
        logging.log_every_n_seconds(
            logging.INFO,
            "%d reward=%f" % (i, float(eval_time_step.reward.mean())),
            n_seconds=1)
    self.assertAlmostEqual(
        1.0, float(eval_time_step.reward.mean()), delta=0.3)