ed233350fa0580747d9f9e247c9aa7933c1526e9,tensorforce/tests/test_naf_agent.py,TestNAFAgent,test_naf_agent,#TestNAFAgent#,16

Before Change



        runner.run(episodes=5000, episode_finished=episode_finished)
        print("NAF Agent: " + str(runner.episode))
        self.assertTrue(runner.episode < 5000)

After Change



    def test_naf_agent(self):

        passed = 0

        for _ in xrange(5):
            environment = MinimalTest(continuous=True)
            config = Configuration(
                batch_size=8,
                learning_rate=0.0025,
                // exploration="OrnsteinUhlenbeckProcess",
                // exploration_kwargs=dict(
                //     sigma=0.1,
                //     mu=0,
                //     theta=0.1
                // ),
                discount=0.99,
                memory_capacity=800,
                first_update=80,
                repeat_update=4,
                target_update_frequency=20,
                states=environment.states,
                actions=environment.actions,
                clip_gradients=10.0,
                network=layered_network_builder([dict(type="dense", size=32), dict(type="dense", size=32)])
            )
            agent = NAFAgent(config=config)
            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)
            // print("NAF Agent: " + str(runner.episode))
            if runner.episode < 10000:
                passed += 1
                print("passed")
            else:
                print("failed")

        print("NAF Agent passed = {}".format(passed))
        self.assertTrue(passed >= 4)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: reinforceio/tensorforce
Commit Name: ed233350fa0580747d9f9e247c9aa7933c1526e9
Time: 2017-06-11
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/tests/test_naf_agent.py
Class Name: TestNAFAgent
Method Name: test_naf_agent


Project Name: reinforceio/tensorforce
Commit Name: 4bf79226f8f36f96938359b429a86889bc99c94e
Time: 2017-06-11
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/tests/test_trpo_agent.py
Class Name: TestTRPOAgent
Method Name: test_discrete


Project Name: reinforceio/tensorforce
Commit Name: 5a53752858608a6a8dd8812c56acc9f074e85861
Time: 2017-06-10
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/tests/test_dqfd_agent.py
Class Name: TestDQFDAgent
Method Name: test_dqfd_agent