-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
23 lines (21 loc) · 877 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from Search import city
from Search import bfs
from Search import dfs
from Search import ids
if __name__ == "__main__":
print("=========================================")
print(" Search Algorithms")
print("=========================================")
source = city.City(input("Enter the source city: ").capitalize(), '')
destination = input("Enter the destination city: ").capitalize()
algorithm = input("Enter the algorithm with which search has to be done: ").upper()
if algorithm == "BFS":
finder = bfs.BFS(source, destination)
finder.find_route()
elif algorithm == "DFS":
finder = dfs.DFS(source, destination)
finder.find_route()
elif algorithm == "IDS":
depth = int(input("Enter the depth for IDS: "))
finder = ids.IDS(source, destination, depth)
finder.find_route()