def dcg_score(relevances: List[float]) -> float:
  """DCG score computation.

  Args:
    relevances: List[float], The list of relevance scores.

  Returns:
    The discounted cumulative gain for k == len(relevances).
  """
  return float(
      sum([
          relevance / np.log2(i + 2) for i, relevance in enumerate(relevances)
      ]))
DCG score computation.

  Args:
    relevances: List[float], The list of relevance scores.

  Returns:
    The discounted cumulative gain for k == len(relevances).
  
language/search_agents/muzero/utils.py