3882ff98e3a8e2a4e16393e72f7107e191c06cf7,tensorforce/tests/test_dqfd_agent.py,TestDQFDAgent,test_dqfd_agent,#TestDQFDAgent#,31

Before Change


        agent.pre_train(10000)

        // If pretraining worked, we should not need much more training
        for n in xrange(1000):
            action = agent.get_action(state=state)
            if action == 0:
                state = (1, 0)
                reward = 0.0
                terminal = False
            else:
                state = (0, 1)
                reward = 1.0
                terminal = False

            agent.add_observation(state=state, action=action, reward=reward, terminal=terminal)
            rewards[n % 100] = reward

            if sum(rewards) == 100.0:
                print("Passed after steps = {:d}".format(n))

                return
            print("sum = {:f}".format(sum(rewards)))

            // We don"t assert here because there is some randomness in the test and while
            // we can find a deterministic setting with a working random seed, that same
            // random seed will not work on travis
            // assert (sum(rewards) == 100.0)

After Change


        def episode_finished(r):
            return r.episode < 100 or not all(x >= 1.0 for x in r.episode_rewards[-100:])

        runner.run(episodes=10000, episode_finished=episode_finished)
        self.assertTrue(runner.episode < 10000)

            // We don"t assert here because there is some randomness in the test and while
            // we can find a deterministic setting with a working random seed, that same
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: reinforceio/tensorforce
Commit Name: 3882ff98e3a8e2a4e16393e72f7107e191c06cf7
Time: 2017-05-15
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/tests/test_dqfd_agent.py
Class Name: TestDQFDAgent
Method Name: test_dqfd_agent


Project Name: pymc-devs/pymc3
Commit Name: 964029ec58213aec07fd87a0463c07746a89375c
Time: 2016-05-27
Author: chris.fonnesbeck@vanderbilt.edu
File Name: pymc3/examples/python_vs_c.py
Class Name:
Method Name:


Project Name: reinforceio/tensorforce
Commit Name: 3882ff98e3a8e2a4e16393e72f7107e191c06cf7
Time: 2017-05-15
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/tests/test_dqn_agent.py
Class Name: TestDQNAgent
Method Name: test_dqn_agent


Project Name: pymc-devs/pymc3
Commit Name: 964029ec58213aec07fd87a0463c07746a89375c
Time: 2016-05-27
Author: chris.fonnesbeck@vanderbilt.edu
File Name: pymc3/examples/logistic.py
Class Name:
Method Name: