From wiki.gpii
Jump to: navigation, search

The Dispatcher is a GPII component in the matchmaking chain. Before a payload arrives at a matchmaker, it is analyzed by the dispatcher to forward it to the most fitting matchmaker.


The dispatcher comes with a series of preferences that can be used in need and preference sets to alter the behavior of the dispatcher. These preferences behave exactly as normal preferences and can be but into context blocks with conditions.

matchMakerType (String)


Using this preference, the dispatcher is completely overridden and the specified matchmaker is used.

excludedMatchMakers (Array of Strings)


Dispatching will happen as usual, but any matchmaker listed here will be excluded. Ignored if matchMakerType is set.


In order to select a matchmaker, the dispatcher uses metrics defined in the MatchMakerCapabilities.json. The dispatcher metrics are calculated as baseValue + forEachPreference * [prefs] + forEachUnsupportedPreference * [unsupportedPrefs]

      "id": "flat",
      "conditions": {
         "supported": false
      "id": "statistical",
      "preferences": {
         "supported" : []
      "metrics": {
         "baseValue": -10.0,
         "forEachPreference": 1.0,
         "forEachUnsupportedPreference": 0.0
      "id": "RuleBased",
      "preferences": {
         "supported" : [
      "metrics": {
         "baseValue": 10.0,
         "forEachUnsupportedPreference": -1.0

conditions.supported (bool)

Expresses whether the matchmaker can handle conditions. If false, the dispatcher will attempt to avoid this matchmaker at all costs if the payload contains conditions.

preferences.supported (array of strings)

A list of preferences supported by this matchmaker. Each preference contained in an active context that is not mentioned in this list will be counted as an unsupported preference for the forEachUnsupportedPreference metric.

metrics.baseValue (float)

The base utility assigned to this matchmaker.

metrics.forEachPreference (float)

Utility modifier for each preference (no matter if supported or not) in active context blocks.

metrics.forEachUnsupportedPreference (float)

Utility modifier for each unsupported preference in active context blocks.

Try Again

The dispatcher adds a new block to the matchmaker payloads, allowing he "try different matchmaker" functionality.

tryAgain.active (bool)

Enables "try different matchmaker".

tryAgain.excludedMatchMakers (array of strings)

Disables each matchmaker listed in this array from dispatching. Should store the matchmakers previously used.