def __init__(
      self,
      model: language_model.LanguageModel,
      player_name: str,
      player_goal: str,
      clock: game_clock.GameClock,
      name: str = 'Goal Achievement',
      scale: Sequence[str] = DEFAULT_SCALE,
      measurements: measurements_lib.Measurements | None = None,
      channel: str = DEFAULT_CHANNEL_NAME,
      verbose: bool = False,
  ):
    """Initializes the metric.

    Args:
      model: Language model to use for the question.
      player_name: player name.
      player_goal: player goal.
      clock: Clock for logging.
      name: Name of the metric.
      scale: Scale of the metric, uses default if None.
      measurements: The measurements object to publish data to.
      channel: Channel to use for logging the metric.
      verbose: Whether to print logs during execution.
    """
    self._model = model
    self._player_name = player_name
    self._player_goal = player_goal
    self._clock = clock
    self._name = name
    self._scale = scale
    self._measurements = measurements
    self._channel = channel
    # Get the channel so it is initialized. This is not strictly necessary, but
    # enables us to know which channels exist after initialization of agents and
    # GM.
    if self._measurements:
      self._measurements.get_channel(self._channel)
    self._verbose = verbose

    self._timestep = 0
Initializes the metric.

    Args:
      model: Language model to use for the question.
      player_name: player name.
      player_goal: player goal.
      clock: Clock for logging.
      name: Name of the metric.
      scale: Scale of the metric, uses default if None.
      measurements: The measurements object to publish data to.
      channel: Channel to use for logging the metric.
      verbose: Whether to print logs during execution.
    
concordia/deprecated/metrics/goal_achievement.py