-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrun_tests.py
26 lines (21 loc) · 888 Bytes
/
run_tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os
# domains = ['blocks', 'depot', 'ferry', 'gripper', 'typeworld']
domains = ['gripper']
problems = {}
name = [name for name in os.walk("./data/problems/") ]
for domain in domains:
files = [x[2] for x in os.walk("./data/problems/{}".format(domain))]
for file in files:
problems[domain] = file
print(problems)
algorithms = ['A_STAR', 'GDFS', 'IDA_STAR', 'DFS', 'BEST_FS' ]
algorithms = ['A_STAR']
heuristics = ['MAX_COST', 'ADD_COST']
for domain in problems:
for problem in problems[domain]:
print("Problem", problem)
for algorithm in algorithms:
for heuristic in heuristics:
cmd = "./Planner/pddl_solver --domain data/domains/{}.pddl --problem data/problems/{}/{} -a {} --heuristic {}".format(domain, domain, problem, algorithm, heuristic)
print(cmd)
print(os.popen(cmd).read())