Beispiel #1
0
 def __init__(self, maze):
     self.maze = maze
     self.fringe = collections.deque()
     self.max_fringe = -1
     # make prev array
     self.prev = [[None for j in range(maze.getDim())]
                  for i in range(maze.getDim())]
Beispiel #2
0
	def __init__(self, maze):
		self.maze = maze
		self.fringe = queue.PriorityQueue()
		self.maxFringe = -1
		self.nodesExplored = -1
		# add items to fringe of pattern (priority_number, data)
		self.prev = [[None for j in range(maze.getDim())] for i in range(maze.getDim())]
		self.score = [[self.maze.getDim()**2 for j in range(maze.getDim())] for i in range(maze.getDim())]
		self.score[0][0]=0
		self.prev[0][0] = (0,0)
Beispiel #3
0
 def __init__(self,
              maze: maze.Maze,
              goal: tuple = None,
              start: tuple = (0, 0)):
     self.maze = maze
     self.dim = maze.getDim()
     self.max_fringe = None
     self.goal = (self.dim - 1, self.dim - 1)
     self.start = start
Beispiel #4
0
 def __init__(self, maze):  # takes in maze object
     self.maze = maze
     self.fringe = collections.deque()
     self.prev = [[None for j in range(maze.getDim())]
                  for i in range(maze.getDim())]