from typing import Sequence
from typing import List


def normalized_dir_map_observation(
    dir_map: Sequence[int]
) -> List[float]:
  """Normalizes a direction map to be between 0 and 1."""
  return [(x + 1.0) / 2.0 for x in dir_map]