<commit_before>package lila.rating

object Regulator {

  def apply(before: Perf, after: Perf) =
    if (before.nb >= after.nb) after
    else if (before.glicko.rating >= after.glicko.rating) after
    else {
      val diff = after.glicko.rating - before.glicko.rating
      val extra = diff / 100
      after.copy(
        glicko = after.glicko.copy(
          rating = after.glicko.rating + extra))
    }
}<commit_msg>also regulate rating on losses<commit_after>package lila.rating

object Regulator {

  def apply(before: Perf, after: Perf) =
    if (before.nb >= after.nb) after
    else {
      val diff = (after.glicko.rating - before.glicko.rating).abs
      val extra = diff / 100
      after.copy(
        glicko = after.glicko.copy(
          rating = after.glicko.rating + extra))
    }
}
{'fraction_non_alphanumeric': 0.11389236545682102, 'fraction_numerical': 0.007509386733416771, 'mean_word_length': 2.4482758620689653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6801428', 'n_tokens_mistral': 277, 'n_tokens_neox': 266, 'n_words': 65}