def h1(curr_state, goal_dict):
    """
    Heuristic for calculating the distance of goal state using Manhattan distance
    
    Parameters:
    curr_state(np.ndarray): A 3x3 numpy array with each cell containing unique elements
    goal_dict(dict[int, tuple[int, int]]): A mapping of cell contents to a tuple
    contianing its indices
    
    Returns:
    h(int): Heuristic value
    """
    h = 0
    for i in range(curr_state.shape[0]):
        for j in range(curr_state.shape[1]):
            value = curr_state[i][j]
            x = goal_dict[value][0]
            y = goal_dict[value][1]
            h += abs(i-x) + abs(j-y)
    return h