def extract_goal(goal_map):
    """Returns the goal location."""
    for o in range(goal_map.shape[0]):
        for y in range(goal_map.shape[1]):
            for x in range(goal_map.shape[2]):
                if goal_map[o][y][x] == 1.:
                    return (o, y, x)
    assert False