Пример #1
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "blocks"
    # benchmark_dir = BENCHMARK_DIR
    benchmark_dir = PYPERPLAN_BENCHMARK_DIR
    # domain_dir = "gripper"

    prob01 = dict(
        lp_max_weight=10,
        benchmark_dir=benchmark_dir,
        instances="task01.pddl",
        num_states=500,
        num_sampled_states=None,
        random_seed=12,
        max_concept_size=20,
        max_concept_grammar_iterations=3,
        concept_generator=None,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    parameters = {
        "task01": prob01,
    }.get(experiment_name or "test")

    return generate_experiment(domain_dir, domain, **parameters)
Пример #2
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "childsnacks"
    benchmark_dir = BENCHMARK_DIR

    childsnacks_1_incremental = dict(
        experiment_class=IncrementalExperiment,
        lp_max_weight=10,
        benchmark_dir=benchmark_dir,
        instances=[
            'child-snack_pfile01.pddl',
        ],
        test_instances=['child-snack_pfile01-2.pddl'],
        test_domain=domain,
        #distance_feature_max_complexity=10,
        num_states=200,
        initial_sample_size=8,
        max_concept_grammar_iterations=3,
        initial_concept_bound=8,
        max_concept_bound=12,
        concept_bound_step=2,
        batch_refinement_size=5,
        clean_workspace=False,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    parameters = {
        "childsnacks_1_incremental": childsnacks_1_incremental,
    }.get(experiment_name or "test")

    return generate_experiment(domain_dir, domain, **parameters)
Пример #3
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "storage"
    benchmark_dir = DOWNWARD_BENCHMARKS_DIR

    storage_incremental = dict(
        experiment_class=IncrementalExperiment,
        lp_max_weight=10,
        benchmark_dir=benchmark_dir,
        instances = ['p01.pddl',
                     'p02.pddl',
                     'p03.pddl',
                     'p04.pddl',
                     'p05.pddl',
                     'p06.pddl',
                     'p07.pddl',],
        test_instances=['p08.pddl',
                        'p09.pddl',
                        'p10.pddl',
                        'p11.pddl',
                        'p12.pddl',
                        'p13.pddl',
                        'p14.pddl',
                        'p15.pddl',
                        'p16.pddl',
                        'p17.pddl',
                        'p18.pddl',
                        'p19.pddl',
                        'p20.pddl',
                        'p21.pddl',
                        'p22.pddl',
                        'p23.pddl',
                        'p24.pddl',
                        'p25.pddl',
                        'p26.pddl',
                        'p27.pddl',
                        'p28.pddl',
                        'p29.pddl',
                        'p30.pddl',],
        test_domain=domain,
        distance_feature_max_complexity=6,
        num_states=10000,
        initial_sample_size=100,
        max_concept_grammar_iterations=3,
        initial_concept_bound=8, max_concept_bound=16, concept_bound_step=2,
        batch_refinement_size=50,
        clean_workspace=False,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    parameters = {
        "storage_incremental": storage_incremental,
    }.get(experiment_name or "test")

    return generate_experiment(domain_dir, domain, **parameters)
Пример #4
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "logistics"
    benchmark_dir = PYPERPLAN_BENCHMARK_DIR

    # Logistics is currently  not working
    logistics_1 = dict(
        lp_max_weight=10,
        benchmark_dir=benchmark_dir,
        instances=["task01.pddl"],
        test_instances=[
            "task02.pddl",
        ],
        test_domain=domain,
        distance_feature_max_complexity=0,
        num_states=20000,
        num_sampled_states=None,
        random_seed=12,
        max_concept_size=10,
        max_concept_grammar_iterations=3,
        concept_generator=None,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    logistics_1_incremental = dict(
        lp_max_weight=10,
        benchmark_dir=benchmark_dir,
        instances=["task01.pddl"],
        test_instances=[
            "task02.pddl",
        ],
        test_domain=domain,
        distance_feature_max_complexity=0,
        num_states=20000,
        initial_sample_size=8,
        max_concept_grammar_iterations=3,
        initial_concept_bound=8,
        max_concept_bound=12,
        concept_bound_step=2,
        batch_refinement_size=5,
        clean_workspace=False,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    parameters = {
        "logistics_1": logistics_1,
        "logistics_1_incremental": logistics_1_incremental,
    }.get(experiment_name or "test")

    return generate_experiment(domain_dir, domain, **parameters)
Пример #5
0
def experiment(experiment_name):
    domain = "domain.pddl"
    domain_dir = "grid"
    benchmark_dir = BENCHMARK_DIR

    experiments = dict()
    experiments["prob01"] = dict(
        lp_max_weight=10,
        benchmark_dir=benchmark_dir,
        instances="prob01.pddl",
        test_instances=["prob02.pddl"],
        test_domain=domain,
        # instances="task01.pddl",
        num_states=300,  # num_sampled_states=None,  random_seed=12,
        max_concept_size=10,
        max_concept_grammar_iterations=3,
        concept_generator=None,
        # concept_generator=generate_chosen_concepts,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    experiments["grid_inc"] = dict(
        # domain_dir="blocks-downward",
        lp_max_weight=10,
        experiment_class=IncrementalExperiment,
        instances=["prob01.pddl", "prob02.pddl"],
        test_instances=["prob03.pddl", "prob04.pddl", "prob05.pddl"],
        test_domain=domain,
        # This is number of sampled states *per training instance*. In an increm. experiment, they will be processed
        # in batches, so we can set them high enough.
        num_states=500,
        initial_sample_size=20,
        max_concept_grammar_iterations=3,
        initial_concept_bound=8,
        max_concept_bound=8,
        concept_bound_step=2,
        batch_refinement_size=5,
        # quiet=True,
        clean_workspace=False,
        # concept_generator=generate_chosen_concepts,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    # Select the actual experiment parameters according to the command-line option
    parameters = experiments[experiment_name]
    parameters["domain_dir"] = parameters.get("domain_dir", domain_dir)
    parameters["domain"] = parameters.get("domain", domain)
    return generate_experiment(**parameters)
Пример #6
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "spanner"
    benchmark_dir = BENCHMARK_DIR

    # Experiment used in the paper
    spanner_1_incremental = dict(
        experiment_class=IncrementalExperiment,
        lp_max_weight=5,
        benchmark_dir=benchmark_dir,
        instances=[
            'training-1-1-5.pddl',
            'training-2-1-5.pddl',
            'training-2-2-5.pddl',
            'training-3-1-5.pddl',
            'training-3-3-5.pddl',
            'training-4-2-5.pddl',
            'training-4-4-5.pddl',
            'training-5-3-5.pddl',
            'training-5-4-5.pddl',
            'training-5-5-5.pddl',
            'training-1-1-6.pddl',
            'training-1-1-20.pddl',
        ],
        test_instances=[
            "prob-3-3-3-1540903410.pddl", "prob-4-3-3-1540907466.pddl",
            "prob-4-3-3-1540907466.pddl", "prob-10-10-10-1540903568.pddl",
            "prob-15-10-8-1540913795.pddl", "prob-10-10-25.pddl",
            "prob-15-15-25.pddl"
        ],
        # "prob-20-15-40.pddl",
        # "prob-20-20-50.pddl",],
        test_domain=domain,
        num_states=12000,
        initial_sample_size=100,
        max_concept_grammar_iterations=None,
        initial_concept_bound=8,
        max_concept_bound=12,
        concept_bound_step=2,
        batch_refinement_size=50,
        clean_workspace=False,
        parameter_generator=None,  # add_domain_parameters,
    )

    parameters = {
        "spanner_1_incremental": spanner_1_incremental,
    }.get(experiment_name or "test")

    return generate_experiment(domain_dir, domain, **parameters)
Пример #7
0
def experiment(experiment_name):
    domain = "domain.pddl"
    domain_dir = "gripper"
    benchmark_dir = PYPERPLAN_BENCHMARK_DIR

    experiments = dict()

    experiments["incremental"] = dict(
        lp_max_weight=10,
        experiment_class=IncrementalExperiment,
        benchmark_dir=benchmark_dir,
        instances=['task01.pddl',
                   'task02.pddl',
                   'task03.pddl',
                   'task04.pddl',],
        test_instances=['task05.pddl',
                        'task06.pddl',
                        'task07.pddl',
                        'task08.pddl',
                        'task09.pddl',
                        'task10.pddl',
                        'task11.pddl',
                        'task12.pddl',
                        'task13.pddl',
                        'task14.pddl',
                        'task15.pddl',
                        'task16.pddl',
                        'task17.pddl',
                        'task18.pddl',
                        'task19.pddl',
                        'task20.pddl',],
        test_domain=domain,
        # This is number of sampled states *per training instance*. In an increm. experiment, they will be processed
        # in batches, so we can set them high enough.
        num_states=3000,
        initial_sample_size=100,
        max_concept_grammar_iterations=3,
        initial_concept_bound=8, max_concept_bound=12, concept_bound_step=2,
        batch_refinement_size=10,
        clean_workspace=False,
        parameter_generator=None,
        feature_namer=feature_namer,
    )

    # Select the actual experiment parameters according to the command-line option
    parameters = experiments[experiment_name]
    parameters["domain_dir"] = parameters.get("domain_dir", domain_dir)
    parameters["domain"] = parameters.get("domain", domain)
    return generate_experiment(**parameters)
Пример #8
0
def experiment():
    benchmark_dir = DOWNWARD_BENCHMARKS_DIR

    experiments = dict()
    list_of_experiments = []

    list_of_domains = domains  #[x for x in os.listdir(benchmark_dir)]
    for domain in list_of_domains:
        domain_dir = os.path.join(DOWNWARD_BENCHMARKS_DIR, domain)
        if not os.path.isdir(domain_dir):
            continue
        if "domain.pddl" not in os.listdir(domain_dir):
            continue

        instances = []
        experiment_name = "experiment_" + domain
        for problem in os.listdir(domain_dir):
            if problem == "domain.pddl":
                continue
            instances.append(problem)

        experiments[experiment_name] = dict(
            lp_max_weight=5,
            experiment_class=IncrementalExperiment,
            benchmark_dir=benchmark_dir,
            instances=[instances[1], instances[2]],
            test_instances=[instances[1]],
            test_domain='domain.pddl',
            # This is number of sampled states *per training instance*. In an increm. experiment, they will be processed
            # in batches, so we can set them high enough.
            num_states=2000,
            initial_sample_size=50,
            max_concept_grammar_iterations=3,
            initial_concept_bound=7,
            max_concept_bound=12,
            concept_bound_step=2,
            batch_refinement_size=10,
            clean_workspace=False,
            parameter_generator=None,
        )

        # Select the actual experiment parameters according to the command-line option
        parameters = experiments[experiment_name]
        parameters["domain_dir"] = parameters.get("domain_dir", domain_dir)
        parameters["domain"] = parameters.get("domain", 'domain.pddl')
        list_of_experiments.append(generate_experiment(**parameters))

    return list_of_experiments
Пример #9
0
def experiment(experiment_name):
    domain = "domain.pddl"
    domain_dir = "gripper-m"
    benchmark_dir = BENCHMARK_DIR

    experiments = dict()

    # Experiment used in the paper
    experiments["gripper_std_inc"] = dict(
        lp_max_weight=5,
        experiment_class=IncrementalExperiment,
        instances=['test01.pddl',
                   'test02.pddl',
                   'test03.pddl',
                   'test04.pddl',
                   'test05.pddl',
                   'test06.pddl',
                   'prob03.pddl',
                   'prob_3balls_3rooms_1rob.pddl'],
        test_instances=["prob01.pddl",
                        "prob02.pddl",
                        "prob03.pddl",
                        "prob04.pddl",
                        "prob05.pddl",
                        "prob06.pddl",
                        'prob_3balls_3rooms_1rob.pddl',
                        "prob_4balls_4rooms_1rob.pddl",
                        "prob_4balls_4rooms_2rob.pddl",
                        "prob_10balls_4rooms_1rob.pddl",],
        test_domain=domain,
        # This is number of sampled states *per training instance*. In an increm. experiment, they will be processed
        # in batches, so we can set them high enough.
        num_states=12000,
        initial_sample_size=100,
        max_concept_grammar_iterations=None, random_seed=19,
        initial_concept_bound=8, max_concept_bound=12, concept_bound_step=2,
        batch_refinement_size=50,
        clean_workspace=False,
        parameter_generator=None,  # add_domain_parameters,
        feature_namer=feature_namer,
    )

    # Select the actual experiment parameters according to the command-line option
    parameters = experiments[experiment_name]
    parameters["domain_dir"] = parameters.get("domain_dir", domain_dir)
    parameters["domain"] = parameters.get("domain", domain)
    return generate_experiment(**parameters)
Пример #10
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "blocks"
    # benchmark_dir = BENCHMARK_DIR
    benchmark_dir = PYPERPLAN_BENCHMARK_DIR
    # domain_dir = "gripper"

    experiments = dict()
    experiments["task01_inc"] = dict(
        lp_max_weight=5,
        benchmark_dir=benchmark_dir,
        experiment_class=IncrementalExperiment,
        instances=['task01.pddl',
                   'task02.pddl',
                   'task03.pddl',
        ],
        test_instances=['task04.pddl',
                        'task05.pddl',
                        'task06.pddl',
                        'task07.pddl',
                        'task08.pddl',
        ],
        test_domain=domain,
        # This is number of sampled states *per training instance*. In an increm. experiment, they will be processed
        # in batches, so we can set them high enough.
        num_states=12000,
        initial_sample_size=125,
        max_concept_grammar_iterations=3,
        initial_concept_bound=12, max_concept_bound=12, concept_bound_step=2,
        batch_refinement_size=10,
        clean_workspace=False,
        parameter_generator=None,
        concept_generator=generate_chosen_concepts,
        feature_namer=feature_namer,
    )


    parameters = experiments[experiment_name]
    parameters["domain_dir"] = parameters.get("domain_dir", domain_dir)
    parameters["domain"] = parameters.get("domain", domain)
    return generate_experiment(**parameters)
Пример #11
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "blocks"

    exps = dict()

    exps["clear_5"] = dict(
        instances="instance_5_clear_x_1.pddl",
        test_domain=domain,
        test_instances=[
            "instance_5_clear_x_2.pddl",
            "instance_8_clear_x_0.pddl"
        ],
        lp_max_weight=5,
        num_states=2000, max_width=[-1],
        num_sampled_states=300,
        max_concept_size=6,
        max_concept_grammar_iterations=None,
    )

    exps["on_x_y_big"] = dict(
        instances=[
            "inst_on_x_y_10.pddl",
            "inst_on_x_y_14.pddl",
            "holding_a_b_unclear.pddl",
        ],
        test_domain=domain,
        test_instances=[
            "inst_on_x_y_5.pddl",
            "inst_on_x_y_6.pddl",
            "inst_on_x_y_7.pddl",
            "inst_on_x_y_7_2.pddl",
        ],
        lp_max_weight=5,
        num_states=2000, max_width=[-1],
        num_sampled_states=50,
        max_concept_size=6,
        max_concept_grammar_iterations=None,
    )

    exps["on_x_y_inc"] = dict(
        lp_max_weight=5,
        experiment_class=IncrementalExperiment,
        instances=[
            "inst_on_x_y_10.pddl",
        ],
        test_instances=[
            "inst_on_x_y_11.pddl",
        ],
        test_domain=domain,
        # This is number of sampled states *per training instance*. In an increm. experiment, they will be processed
        # in batches, so we can set them high enough.
        num_states=12000,
        initial_sample_size=50,
        initial_concept_bound=6, max_concept_bound=12, concept_bound_step=2,
        batch_refinement_size=10,
        clean_workspace=False,
    )

    parameters = exps[experiment_name]
    parameters["domain_dir"] = parameters.get("domain_dir", domain_dir)
    parameters["domain"] = parameters.get("domain", domain)
    return generate_experiment(**parameters)
Пример #12
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "miconic"
    benchmark_dir = BENCHMARK_DIR

    miconic_1_simple = dict(
        experiment_class=IncrementalExperiment,
        lp_max_weight=10,
        benchmark_dir=benchmark_dir,
        instances=[
            's1-0.pddl',
            's1-1.pddl',
            's1-2.pddl',
            's1-3.pddl',
            # 's1-4.pddl',
            's2-0.pddl',
            's2-1.pddl',
            's2-2.pddl',
            's2-3.pddl',
            # 's2-4.pddl',
            # 's3-0.pddl',
            # 's3-1.pddl',
            # 's3-2.pddl',
            # 's3-3.pddl',
            # 's3-4.pddl',
            # 's4-0.pddl',
            # 's4-1.pddl',
            # 's4-2.pddl',
            # 's4-3.pddl',
            # 's4-4.pddl',
        ],
        test_instances=['s1-4.pddl', 's2-4.pddl', 's3-4.pddl'],
        test_domain=domain,
        # distance_feature_max_complexity=10,
        num_states=20000,
        initial_sample_size=100,
        max_concept_grammar_iterations=10,
        initial_concept_bound=8,
        max_concept_bound=16,
        concept_bound_step=2,
        batch_refinement_size=50,
        clean_workspace=False,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
        concept_generator=generate_chosen_concepts,
    )

    # Experiment used in the paper
    miconic_1_incremental = dict(
        experiment_class=IncrementalExperiment,
        lp_max_weight=4,
        benchmark_dir=benchmark_dir,
        instances=[
            's1-0.pddl',
            's1-1.pddl',
            's1-2.pddl',
            's1-3.pddl',
            's1-4.pddl',
            's2-0.pddl',
            's2-1.pddl',
            's2-2.pddl',
            's2-3.pddl',
            's2-4.pddl',
            's3-0.pddl',
            's3-1.pddl',
            's3-2.pddl',
            's3-3.pddl',
        ],
        test_instances=[
            's5-0.pddl',
            's5-1.pddl',
            's5-2.pddl',
            's5-3.pddl',
            's5-4.pddl',
            's6-0.pddl',
            's6-1.pddl',
            's6-2.pddl',
            's6-3.pddl',
            's6-4.pddl',
            's7-0.pddl',
            's7-1.pddl',
            's7-2.pddl',
            's7-3.pddl',
            's7-4.pddl',
            's8-0.pddl',
            's8-1.pddl',
            's8-2.pddl',
            's8-3.pddl',
            's8-4.pddl',
            's9-0.pddl',
            's9-1.pddl',
            's9-2.pddl',
            's9-3.pddl',
            's9-4.pddl',
            's10-0.pddl',
            's10-1.pddl',
            's10-2.pddl',
            's10-3.pddl',
            's10-4.pddl',
            's1-0.pddl',
            's11-0.pddl',
            's11-1.pddl',
            's11-2.pddl',
            's11-3.pddl',
            's11-4.pddl',
            's1-1.pddl',
            's12-0.pddl',
            's12-1.pddl',
            's12-2.pddl',
            's12-3.pddl',
            's12-4.pddl',
            's1-2.pddl',
            's13-0.pddl',
            's13-1.pddl',
            's13-2.pddl',
            's13-3.pddl',
            's13-4.pddl',
            's1-3.pddl',
            's14-0.pddl',
            's14-1.pddl',
            's14-2.pddl',
            's14-3.pddl',
            's14-4.pddl',
            's1-4.pddl',
            's15-0.pddl',
            's15-1.pddl',
            's15-2.pddl',
            's15-3.pddl',
            's15-4.pddl',
            's16-0.pddl',
            's16-1.pddl',
            's16-2.pddl',
            's16-3.pddl',
            's16-4.pddl',
            's17-0.pddl',
            's17-1.pddl',
            's17-2.pddl',
            's17-3.pddl',
            's17-4.pddl',
            's18-0.pddl',
            's18-1.pddl',
            's18-2.pddl',
            's18-3.pddl',
            's18-4.pddl',
            's19-0.pddl',
            's19-1.pddl',
            's19-2.pddl',
            's19-3.pddl',
            's19-4.pddl',
            's20-0.pddl',
            's20-1.pddl',
            's20-2.pddl',
            's20-3.pddl',
            's20-4.pddl',
            's2-0.pddl',
            's21-0.pddl',
            's21-1.pddl',
            's21-2.pddl',
            's21-3.pddl',
            's21-4.pddl',
            's2-1.pddl',
            's22-0.pddl',
            's22-1.pddl',
            's22-2.pddl',
            's22-3.pddl',
            's22-4.pddl',
            's2-2.pddl',
            's23-0.pddl',
            's23-1.pddl',
            's23-2.pddl',
            's23-3.pddl',
            's23-4.pddl',
            's2-3.pddl',
            's24-0.pddl',
            's24-1.pddl',
            's24-2.pddl',
            's24-3.pddl',
            's24-4.pddl',
            's2-4.pddl',
            's25-0.pddl',
            's25-1.pddl',
            's25-2.pddl',
            's25-3.pddl',
            's25-4.pddl',
            's26-0.pddl',
            's26-1.pddl',
            's26-2.pddl',
            's26-3.pddl',
            's26-4.pddl',
            's27-0.pddl',
            's27-1.pddl',
            's27-2.pddl',
            's27-3.pddl',
            's27-4.pddl',
            's28-0.pddl',
            's28-1.pddl',
            's28-2.pddl',
            's28-3.pddl',
            's28-4.pddl',
            's29-0.pddl',
            's29-1.pddl',
            's29-2.pddl',
            's29-3.pddl',
            's29-4.pddl',
            's30-0.pddl',
            's30-1.pddl',
            's30-2.pddl',
            's30-3.pddl',
            's30-4.pddl',
        ],
        test_domain=domain,
        #distance_feature_max_complexity=5,
        num_states=12000,
        initial_sample_size=50,
        max_concept_grammar_iterations=10,
        initial_concept_bound=8,
        max_concept_bound=16,
        concept_bound_step=2,
        batch_refinement_size=50,
        clean_workspace=False,
        parameter_generator=None,
        feature_namer=feature_namer,
        #concept_generator=generate_chosen_concepts,
    )

    parameters = {
        "miconic_1_incremental": miconic_1_incremental,
        "miconic_1_simple": miconic_1_simple,
    }.get(experiment_name or "test")

    return generate_experiment(domain_dir, domain, **parameters)
Пример #13
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "spanner-ipc2011"
    benchmark_dir = BENCHMARK_DIR

    spanner_1 = dict(
        lp_max_weight=10,
        benchmark_dir=benchmark_dir,
        #instances=["pfile01-001-training-inst.pddl"],
        instances=["prob-3-3-3-1540903410.pddl"],
        #"prob-4-4-3-1540907456.pddl",
        #"prob-4-3-3-1540907466.pddl",],
        #"prob-10-10-10-1540903568.pddl",
        #"prob-15-10-8-1540913795.pddl"],
        test_instances=[
            "pfile01-001.pddl",
            "pfile01-002.pddl",
            "pfile01-003.pddl",
            "pfile01-004.pddl",
            "pfile01-005.pddl",
            "pfile02-006.pddl",
            "pfile02-007.pddl",
            "pfile02-008.pddl",
            "pfile02-009.pddl",
            "pfile02-010.pddl",
            "pfile03-011.pddl",
            "pfile03-012.pddl",
            "pfile03-013.pddl",
            "pfile03-014.pddl",
            "pfile03-015.pddl",
            "pfile04-016.pddl",
            "pfile04-017.pddl",
            "pfile04-018.pddl",
            "pfile04-019.pddl",
            "pfile04-020.pddl",
            "pfile05-021.pddl",
            "pfile05-022.pddl",
            "pfile05-023.pddl",
            "pfile05-024.pddl",
            "pfile05-025.pddl",
            "pfile06-026.pddl",
            "pfile06-027.pddl",
            "pfile06-028.pddl",
            "pfile06-029.pddl",
            "pfile06-030.pddl",
        ],
        test_domain=domain,
        distance_feature_max_complexity=0,
        num_states=300,
        num_sampled_states=None,
        random_seed=12,
        max_concept_size=10,
        max_concept_grammar_iterations=3,
        concept_generator=None,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    spanner_1_incremental = dict(
        lp_max_weight=10,
        benchmark_dir=benchmark_dir,
        instances=["pfile01-001-training-inst.pddl"],
        test_instances=[
            "pfile01-001.pddl",
            "pfile01-002.pddl",
            "pfile01-003.pddl",
            "pfile01-004.pddl",
            "pfile01-005.pddl",
            "pfile02-006.pddl",
            "pfile02-007.pddl",
            "pfile02-008.pddl",
            "pfile02-009.pddl",
            "pfile02-010.pddl",
            "pfile03-011.pddl",
            "pfile03-012.pddl",
            "pfile03-013.pddl",
            "pfile03-014.pddl",
            "pfile03-015.pddl",
            "pfile04-016.pddl",
            "pfile04-017.pddl",
            "pfile04-018.pddl",
            "pfile04-019.pddl",
            "pfile04-020.pddl",
            "pfile05-021.pddl",
            "pfile05-022.pddl",
            "pfile05-023.pddl",
            "pfile05-024.pddl",
            "pfile05-025.pddl",
            "pfile06-026.pddl",
            "pfile06-027.pddl",
            "pfile06-028.pddl",
            "pfile06-029.pddl",
            "pfile06-030.pddl",
        ],
        test_domain=domain,
        distance_feature_max_complexity=0,
        num_states=1000,
        initial_sample_size=8,
        max_concept_grammar_iterations=3,
        initial_concept_bound=8,
        max_concept_bound=12,
        concept_bound_step=2,
        batch_refinement_size=5,
        clean_workspace=False,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    parameters = {
        "spanner_1": spanner_1,
        "spanner_1_incremental": spanner_1_incremental,
    }.get(experiment_name or "test")

    return generate_experiment(domain_dir, domain, **parameters)
Пример #14
0
def experiment(experiment_name=None):
    domain = "domain.pddl"
    domain_dir = "visitall"

    # Incremental version
    # Experiment used in the paper
    problem03full_incremental = dict(
        benchmark_dir=BENCHMARK_DIR,
        lp_max_weight=5,
        experiment_class=IncrementalExperiment,
        test_domain=domain,
        instances=[
            'training01.pddl',
            'training02.pddl',
            'training03.pddl',
            'training04.pddl',
            'training05.pddl',
            'training06.pddl',
            'training09.pddl',
            'training10.pddl',
            'training11.pddl',
        ],
        test_instances=[
            "problem02-full.pddl",
            "problem03-full.pddl",
            "problem04-full.pddl",
            "problem05-full.pddl",
            "problem06-full.pddl",
            "problem07-full.pddl",
            "problem08-full.pddl",
            "problem09-full.pddl",
            "problem10-full.pddl",
            "problem11-full.pddl",
            'p-1-10.pddl',
            'p-1-11.pddl',
            'p-1-12.pddl',
            'p-1-13.pddl',
            'p-1-14.pddl',
            'p-1-15.pddl',
            'p-1-16.pddl',
            'p-1-17.pddl',
            'p-1-18.pddl',
            'p-1-5.pddl',
            'p-1-6.pddl',
            'p-1-7.pddl',
            'p-1-8.pddl',
            'p-1-9.pddl',
        ],
        num_states=10000,
        initial_sample_size=100,
        distance_feature_max_complexity=5,
        max_concept_grammar_iterations=10,
        initial_concept_bound=8,
        max_concept_bound=12,
        concept_bound_step=2,
        batch_refinement_size=50,
        clean_workspace=False,
        parameter_generator=add_domain_parameters,
        feature_namer=feature_namer,
    )

    parameters = {
        "problem03full_incremental": problem03full_incremental,
    }.get(experiment_name or "test")

    return generate_experiment(domain_dir, domain, **parameters)