Beispiel #1
0
    def test_run_multi_fcnet_td3_independent(self):
        # Run the script; verify it executes without failure.
        args = parse_train_options(
            '',
            '',
            args=[
                "multiagent-ring-v0",
                "--initial_exploration_steps",
                "1",
                "--total_steps",
                "500",
                "--log_interval",
                "500",
            ],
            multiagent=True,
            hierarchical=False,
        )
        run_multi_fcnet(args, 'data/multi-fcnet')

        # Check that the folders were generated.
        self.assertTrue(
            os.path.isdir(
                os.path.join(os.getcwd(),
                             "data/multi-fcnet/multiagent-ring-v0")))

        # Clear anything that was generated.
        shutil.rmtree(os.path.join(os.getcwd(), "data"))
Beispiel #2
0
    def test_run_multi_fcnet_td3_maddpg_shared(self):
        # Run the script; verify it executes without failure.
        args = parse_options('',
                             '',
                             args=[
                                 "multiagent-ring_small",
                                 "--shared",
                                 "--maddpg",
                                 "--initial_exploration_steps",
                                 "1",
                                 "--total_steps",
                                 "500",
                                 "--log_interval",
                                 "500",
                             ])
        run_multi_fcnet(args, 'data/multi-fcnet')

        # Check that the folders were generated.
        self.assertTrue(
            os.path.isdir(
                os.path.join(os.getcwd(),
                             "data/multi-fcnet/multiagent-ring_small")))

        # Clear anything that was generated.
        shutil.rmtree(os.path.join(os.getcwd(), "data"))
    def test_run_multi_fcnet_td3_independent(self):
        # Run the script; verify it executes without failure.
        args = parse_options(
            '', '', args=["multiagent-ring0", "--total_steps", "2000"])
        run_multi_fcnet(args, 'data/multi-fcnet')

        # Check that the folders were generated.
        self.assertTrue(
            os.path.isdir(
                os.path.join(os.getcwd(),
                             "data/multi-fcnet/multiagent-ring0")))

        # Clear anything that was generated.
        shutil.rmtree(os.path.join(os.getcwd(), "data"))