3882ff98e3a8e2a4e16393e72f7107e191c06cf7,tensorforce/tests/test_dqn_agent.py,TestDQNAgent,test_dqn_agent,#TestDQNAgent#,30

Before Change



        state = (1, 0)
        rewards = [0.0] * 100
        for n in xrange(10000):
            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:
                return

        assert(sum(rewards) == 100.0)

After Change


            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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


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: tensorflow/tensorflow
Commit Name: 1427bfc12ec5a3a2c6a4ffd57fc5b465d3eedfae
Time: 2020-11-19
Author: gardener@tensorflow.org
File Name: tensorflow/python/kernel_tests/relu_op_test.py
Class Name: ReluTest
Method Name: testGradientFloat16


Project Name: tensorflow/tensorflow
Commit Name: e818c9e626fc5c95516e68fb2282f07d0232eea9
Time: 2020-11-18
Author: gardener@tensorflow.org
File Name: tensorflow/python/kernel_tests/relu_op_test.py
Class Name: ReluTest
Method Name: testGradientFloat16