-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (22 loc) · 902 Bytes
/
Copy pathmain.py
File metadata and controls
29 lines (22 loc) · 902 Bytes
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
# This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
from Algorithms.SimplePF import SimplePF
from Algorithms.TwoSidesPF import TwoSidesPF
from Algorithms.AStar import AStar
from SearchEnvironment import SearchEnvironment
from GUI.SimpleGUI import SimpleGUI
import sys
def run():
environment = SearchEnvironment(21, 20, 3, 16, 15, 5)
arg_to_alg_dict = {'simple':SimplePF,'twosides':TwoSidesPF,'astar':AStar}
try:
algorithm = arg_to_alg_dict[sys.argv[1]](environment)
except Exception:
algorithm = SimplePF(environment)
GUI = SimpleGUI(algorithm)
GUI.run()
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
run()
# See PyCharm help at https://www.jetbrains.com/help/pycharm/