Ejemplo n.º 1
0
def solve_pddl():
    domain_pddl = read_pddl('domain.pddl')
    problem_pddl = read_pddl('problem.pddl')

    plan, cost = solve_from_pddl(domain_pddl, problem_pddl)
    print('Plan:', plan)
    print('Cost:', cost)
Ejemplo n.º 2
0
def solve_pddl():
    domain_pddl = read_pddl(__file__, 'domain0.pddl')
    problem_pddl = read_pddl(__file__, 'problem0.pddl')

    plan, cost = solve_from_pddl(domain_pddl, problem_pddl)
    solved = plan is not None
    print('Solved: {}'.format(solved))
    print('Cost: {}'.format(cost))
    print('Length: {}'.format(get_length(plan)))
    if not solved:
        return
    for i, action in enumerate(plan):
        print('{}) {}'.format(i + 1, ' '.join(map(str, action))))
Ejemplo n.º 3
0
def solve_pddl():
    domain_pddl = read_pddl(__file__, 'domain0.pddl')
    problem_pddl = read_pddl(__file__, 'problem0.pddl')
    plan, cost = solve_from_pddl(domain_pddl, problem_pddl)
    dump_plan(plan, cost)
Ejemplo n.º 4
0
def solve_pddl():
    plan, cost = solve_from_pddl(DOMAIN_PDDL, PROBLEM_PDDL)
    print('Plan:', plan)
    print('Cost:', cost)
Ejemplo n.º 5
0
def main():
    # TODO: make a method that does this
    domain_pddl, problem_pddl = read_pddl_pair(__file__)
    plan, cost = solve_from_pddl(domain_pddl, problem_pddl)
    dump_plan(plan, cost)
Ejemplo n.º 6
0
def main():
    plan, cost = solve_from_pddl(DOMAIN_PDDL, PROBLEM_PDDL, planner='dijkstra')
    dump_plan(plan, cost)
Ejemplo n.º 7
0
def main():
    domain_pddl, problem_pddl = read_pddl_pair(__file__)
    plan, cost = solve_from_pddl(domain_pddl, problem_pddl)
    dump_plan(plan, cost)