mazeFinder.py
def h(self, node):
        '''
        Used to determine the h value. The h value
        is the distance from the state to the goal.
        Distance is the manhattan distance.
        '''
        state = node.state
        xDifference = abs(state[0] - self.goal[0])
        yDifference = abs(state[1] - self.goal[1])
        return xDifference+yDifference

        Used to determine the h value. The h value
        is the distance from the state to the goal.
        Distance is the manhattan distance.
        
Used to determine the h value. The h value
is the distance from the state to the goal.
Distance is the manhattan distance.
Used to determine the h value . The h value is the distance from the state to the goal . Distance is the manhattan distance .
def h(self, node):
        state = node.state
        xDifference = abs(state[0] - self.goal[0])
        yDifference = abs(state[1] - self.goal[1])
        return xDifference+yDifference
def h ( self , node ) : state = node . state xDifference = abs ( state [ 0 ] - self . goal [ 0 ] ) yDifference = abs ( state [ 1 ] - self . goal [ 1 ] ) return xDifference + yDifference
Used to determine the h value.
Used to determine the h value .
'''
        Used to determine the h value. The h value
        is the distance from the state to the goal.
        Distance is the manhattan distance.
        '''
self
node