def cooperator_reward_fn(num_cooperators: int) -> float:
    """A cataclysmic effect if even one player defects."""
    num_defectors = num_players - num_cooperators
    if num_defectors > 0:
      return -10.0
    else:
      return 1.0
A cataclysmic effect if even one player defects.
examples/deprecated/modular/environment/forbidden_fruit.py