Exemplo n.º 1
0
    def test_run_hrl_td3(self):
        # Run the script; verify it executes without failure.
        args = parse_options('',
                             '',
                             args=[
                                 "MountainCarContinuous-v0",
                                 "--initial_exploration_steps",
                                 "1",
                                 "--batch_size",
                                 "32",
                                 "--meta_period",
                                 "5",
                                 "--total_steps",
                                 "500",
                                 "--log_interval",
                                 "500",
                             ])
        run_hrl(args, 'data/goal-conditioned')

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

        # Clear anything that was generated.
        shutil.rmtree(os.path.join(os.getcwd(), "data"))
Exemplo n.º 2
0
    def test_run_hrl_td3(self):
        # Run the script; verify it executes without failure.
        args = parse_options(
            '', '', args=["MountainCarContinuous-v0", "--total_steps", "2000"])
        run_hrl(args, 'data/goal-conditioned')

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

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