예제 #1
0
    def test_run_multi_hrl_td3_shared(self):
        # Run the script; verify it executes without failure.
        args = parse_train_options(
            '',
            '',
            args=[
                "multiagent-ring-v0-fast",
                "--shared",
                "--initial_exploration_steps",
                "1",
                "--total_steps",
                "500",
                "--log_interval",
                "500",
            ],
            multiagent=True,
            hierarchical=True,
        )
        run_multi_hrl(args, 'data/multi-goal-conditioned')

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

        # Clear anything that was generated.
        shutil.rmtree(os.path.join(os.getcwd(), "data"))
예제 #2
0
    def test_run_multi_hrl_sac_independent(self):
        # Run the script; verify it executes without failure.
        args = parse_train_options('',
                                   '',
                                   args=[
                                       "multiagent-ring_small",
                                       "--initial_exploration_steps", "1",
                                       "--total_steps", "500",
                                       "--log_interval", "500", "--alg", "SAC"
                                   ])
        run_multi_hrl(args, 'data/multi-goal-conditioned')

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

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