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

After Change


        network_builder = layered_network_builder([{"type": "dense", "num_outputs": 16}, {"type": "linear", "num_outputs": 2}])
        agent = DQNAgent(config=config, network_builder=network_builder)

        runner = Runner(agent=agent, environment=environment)

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

Frequency: 3

Non-data size: 5

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: rlworkgroup/garage
Commit Name: 3a3bdf17ca08052309016bdfa481a58c70112abd
Time: 2019-04-26
Author: ahtsans@gmail.com
File Name: tests/garage/tf/policies/test_deterministic_mlp_policy_with_model.py
Class Name: TestDeterministicMLPPolicyWithModel
Method Name: test_is_pickleable


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