Server scoring

The scoring formula

Servers are scored using a weighted sum formula. There are four parts to this formula:

  • Attributes, which are data that describe players and servers, such as player age or server occupancy.
  • Signals, which transform attributes into numbers between 0 and 1.
  • Weights, which describe the relative importance of signals.
  • The server score, which measures the server's compatibility with the joining player.

The joining player is matched to the server with the highest server score.

Attributes

Attributes are data that describe players and servers. An attribute's value can be a number or a string. When an attribute's value is a string, it's called a categorical attribute. When an attribute's value is a number, it's called a numerical attribute.

For a full list of all available Roblox attributes, see Existing attributes. For more information about custom attributes, see Custom attributes.

Example: Categorical and numerical attributes
Categorical attributes
Has Friends is a categorical attribute because its value is the string "true" when there is a preferred player on this server, and "false" when there are no preferred players on this server.
Language is a categorical attribute because its value is the player's language setting, such as "Japanese".
Numerical attributes
Age is a numerical attribute because its value is the player's age.
Occupancy is a numerical attribute because its value is the number of players currently in this server.

Signals

Signals transform attribute values into numbers between 0 and 1, called signal scores. A signal score of 1 predicts high player compatibility, while a signal score of 0 predicts low player compatibility. Depending on the attribute, transformations can include different aggregations, comparisons, and normalizations.

For a full list of existing Roblox signals, see Existing signals. For more information about custom signals, see Custom signals.

Example: Two servers with different signal scores

The following table calculates Occupancy signal scores for two different server with capacity for 8 players:

Players in serverOccupancy score
Server A22/8 = 0.25
Server B66/8 = 0.75

The Occupancy signal scores Server B higher and considers it a better fit for the joining player.

Weights

A signal's weight describes that signal's importance relative to other signals. A higher weight increases the signal's contribution to the server score. The value after multiplying a signal score by its weight is called a weighted signal.

Signals can't have negative weights. If a signal's weight is 0, that signal is not considered for scoring.

Example: Weighting the Occupancy score

The following table calculates weighted Occupancy signal scores for a place with capacity for 8 players and an Occupancy signal weight of 2:

Players in serverOccupancy scoreWeighted occupancy score
Server A22/8 = 0.250.25 * 2 = 0.5
Server B66/8 = 0.750.75 * 2 = 1.5
Example: Two configurations with different weights

Different weights can also make matchmaking choose different servers. The following table calculates the server scores of two servers with different matchmaking configurations. Configuration 2 has a higher weight for its Occupancy signal, and Server A has a friend of the joining player in it.

FriendsOccupancy
WeightScoreWeightScoreTotal score
Config 1Server A1150.251 * 1 + 5 * 0.25 = 2.25
Server B1050.751 * 0 + 5 * 0.75 = 3.75
Config 2Server A3150.253 * 1 + 5 * 0.25 = 4.25
Server B3050.753 * 0 + 5 * 0.75 = 3.75

Server score

The server score is calculated by the following weighted sum formula, which sums a server's weighted signal scores:


ServerScore
= WeightedSignalScore_1 + WeightedSignalScore_2 + ... + WeightedSignalScore_n
= Weight_1 * SignalScore_1 + Weight_2 * SignalScore_2 + ... + Weight_n * SignalScore_n

Matchmaking configurations

A matchmaking configuration is the set of signals and weights used to score servers of a place. By default, all servers of all places are scored by the Roblox default configuration, meaning you don't need to customize or enable any settings in order to use it.

The Robox default configuration includes the following signals and weights:

SignalWeight
Friends10
Latency3
Occupancy2
Play History2
Age1
Language1
Voice Chat1
Device Type0

In the default Roblox configuration, the Friends signal's weight is greater than the sum of the weights of every other signal. This means that, if available, the joining player is always matched to servers with friends (or players on the same IP address) in them.

The Device Type signal exists in the default configuration but has a weight of 0, so it doesn't affect matchmaking decisions. You can adjust this weight when you customize matchmaking.

For more information about each Roblox signal, see Existing signals.

Advanced concepts

The following are more advanced concepts about the matchmaking process.

Normalization

Signals normalize attribute values to be numbers between 0 and 1. Numerical signals can be normalized by any positive number, called the normalizing factor. If the normalized value is greater than 1, it is clamped down to 1.

Example: Designing the Age signal

The Age signal measures the difference between the average age of players in the server and the joining player's age.

ageDifference = abs(avgServerAge - joiningPlayerAge)

Servers with age differences beyond 25 are all considered equally incompatible with the player. For example, an age difference of 25 is no worse for a player than an age difference of 26, so both values should take the signal score to 0. In this case, 25 is considered the normalizing factor.

normAgeDifference = min(1, abs(avgServerAge - joiningPlayerAge) / 25)

The signal score is inversely related to the age difference, meaning that the signal score is higher when the age difference is smaller.

ageDifferenceSignalScore = 1 - normAgeDifference

The following table shows Age signal scores with two different normalizing factors:

AgeNormalizing factor: 100Normalizing factor: 25
500.50
250.750
120.880.52
50.950.8
011

The signal with a normalizing factor of 25 considers the 5-year and 12-year age differences to be farther apart. Smaller normalizing factors have the effect of amplifying marginal increases or decreases in age difference.

Weight magnitudes

A weight indicates the importance of a signal relative to other signals in a configuration. The relative magnitudes of weights determine signal importance, not their absolute magnitudes.

Example: Relative vs absolute magnitude

The table below calculates the server scores of two servers with two different matchmaking configurations. Configuration 5 and Configuration 6 have Occupancy weights higher than their respective Friends weights. Server A has a friend of the joining player in it.

FriendsOccupancy
WeightScoreWeightScoreTotal score
Config 5Server A10,000115,0000.2510,000 * 1 + 15,000 * 0.25 = 13,750
Server B10,000015,0000.7510,000 * 0 + 15,000 * 0.75 = 11,250
Config 6Server A0.0110.050.250.01 * 1 + 0.05 * 0.25 = 0.0225
Server B0.0100.050.750.01 * 0 + 0.05 * 0.75 = 0.0375

Server A wins with Configuration 5 while Server B wins with Configuration 6. This is because Configuration 5's Occupancy weight is only 1.5x its Friends weight, while Configuration 6's Occupancy weight is 5x its Friends weight.

Despite differences in absolute magnitudes, Configuration 6 prioritizes Occupancy over Friends more than Configuration 5 does.