def test_q_iteration(self):
    params = {'num_itrs': 1000, 'ent_wt': 0.0, 'discount': 0.95}
    qvals = q_iteration.softq_iteration(self.env, **params)
    self.env.reset()
    rews = 0
    for _ in range(200):
        a_qvals = qvals[self.env.get_state()]
        (_, rew, _, _) = self.env.step(np.argmax(a_qvals))
        rews += rew
    self.assertGreater(rews, 0.0)
def test_q_iteration(self):
    params = {'num_itrs': 1000, 'ent_wt': 0.0, 'discount': 0.95}
    qvals = q_iteration.softq_iteration(self.env, **params)
    self.env.reset()
    rews = 0
    for _ in range(200):
        a_qvals = qvals[self.env.get_state()]
        (_, rew, _, _) = self.env.step(np.argmax(a_qvals))
        rews += rew
    self.assertGreater(rews, 0.0)