-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
47 lines (24 loc) · 1.34 KB
/
main.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
27
28
29
30
31
32
33
34
35
36
37
38
import argparse
from parse.parser import Parse as parse
from game.game import Game
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press ⌘F8 to toggle the breakpoint.
if __name__ == '__main__':
text = "A tool to for simulating BDDL problems"
parser = argparse.ArgumentParser(description=text, formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument("-D", "--domain", help="domain file path", default="models/BDDL_Extensions/chess/domain.ig")
parser.add_argument("-P", "--problem", help="problem file path", default="models/BDDL_Extensions/chess/8x8_10.ig")
parser.add_argument("--debug", type=int, help="[0/1], default 0", default=0)
parser.add_argument("--print_indices", type=int, help="whether to print indices on game-board, [0/1] defaults 1", default=1)
parser.add_argument("--show_grid", type=int, help="whether to print grid, [0/1] defaults 1", default=1)
parser.add_argument("--test", type=int, default=0)
args = parser.parse_args()
if args.test == 1:
args.domain = "./testdomain.ig"
args.problem = "./testproblem.ig"
parsed_instance = parse(args)
if args.debug == 1:
print(parsed_instance)
game = Game(parsed_instance, args.show_grid == 1, args.print_indices == 1)
game.play()