Rule relaxations

A relaxation is an alteration of rule behavior. This can be useful for dynamic rule description. Any rule can be relaxed by providing a list of relaxations in the rule.

Relaxation is an important part of rule definition as it can potentially help create matches faster by making some matchmaking rules more lenient overtime, especially when the player population is lower.

Base relaxation contract

Here’s an example of a base relaxation contract:

{
 ...
 Relaxations: [
   {
     "Type": "RelaxationType",
     "Value": 70,
     "AtSeconds": 5,
     "AgeType": "Oldest/Average/Youngest"
   }
 ]
}
FieldRequiredTypeDescription
TypeYesstringThe type of relaxation to apply. See Relaxation types below.
ValueYes*The value used by the relaxation rule. Any type is valid. For example, string, bool, list and number.
AtSecondsYesnumberThe number of seconds (inclusive) after which the relaxation is triggered.
AgeTypeYesstringUses the Oldest (default), Average or Youngest ticket times in the match.

Relaxation is triggered based on the age of tickets in a match. Depending how the relaxation is defined, a relaxation will be enabled when:

  • Oldest: The oldest ticket in the match reaches is X seconds old.
  • Youngest: The youngest ticket in the match reaches is X seconds old.
  • Average: The average age of tickets in a match reaches is X seconds old.

Relaxation type

Enable

Once the relaxation is triggered, the associated rule is applied. Here’s an example:

{ 
   "Type": "RuleControl.Enable", 
   "AtSeconds": 5, 
   "AgeType": "Youngest" 
}

Disable

Once the relaxation is triggered, the associated rule stops being applied. Here’s an example:

{ 
   "Type": "RuleControl.Disable", 
   "AtSeconds": 5, 
   "AgeType": "Youngest" 
}

Replace

Once the relaxation is triggered, the reference value is replaced with another type. Here’s an example:

{ 
   "Type": "ReferenceControl.Replace", 
   "Value": 300, 
   "AtSeconds": 10 
}

ReplaceMin

This only applies to the TeamCount or PlayerCount. Once the relaxation is triggered, the minimum value is replaced with the specified value. Here’s an example:

{ 
   "Type": "RangeControl.ReplaceMin", 
   "Value": 70, 
   "AtSeconds": 5, 
   "AgeType": "Youngest" 
}