-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
19 lines (18 loc) · 1.1 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from Maze import Maze
from Visualize import Visualize
from MazeSolverUCS import MazeSolverUCS
from MazeSolverAStar import MazeSolverAStar
from MazeSolverIDDFS import MazeSolverIDDFS
SIZE = 100
maze = Maze(SIZE)
maze.createMaze()
pathma,op = MazeSolverAStar(maze, 0).aStar() #Manhattan
pathea,_ = MazeSolverAStar(maze, 1).aStar() #Euclidian
pathucs = MazeSolverUCS(maze).UCS() #Uniform cost search
pathi = MazeSolverIDDFS(maze).IDDFS() #Iterative deepening search
Visualize(maze, None, "Empty Maze").visualizeMaze() #Empty maze
Visualize(maze, op, "Optimal Path Maze").visualizeMazeAStar() #Optimum path
Visualize(maze,pathma,"AStar with Manhattan Heuristic").visualizeMazeAStar() #the maze with a path which is used by a*(manhattan)
Visualize(maze,pathea,"AStar with Euclidian Heuristic").visualizeMazeAStar() #the maze with a path which is used by a*(euclidian)
Visualize(maze, pathucs,"UCS").visualizeMaze() #the maze with a path which is used by uniform cost search
Visualize(maze, pathi,"IDDFS").visualizeIDDFS() #the maze with a path which is used by iterative deeping search