Module pacai.core.distance
Functions
def euclidean(position1, position2)
-
Euclidean distance between two position tuples (x, y).
def manhattan(position1, position2)
-
Manhattan distance between two position tuples (x, y).
def maze(position1, position2, gameState)
-
Returns the maze distance between any two positions, using the search functions you have already built.
WARNING:
breadthFirstSearch()
must already be implemted.Example usage:
distance.maze((2, 4), (5, 6), gameState)
.