Matchmaking Code

Matchmaking Code

in PvP

Posted by: Ryan.9387

Ryan.9387

Edit: The last update to this wiki page was March 2016, so maybe things are different now. Hopefully this page isn’t up to date.

From https://wiki.guildwars2.com/wiki/PvP_Matchmaking_Algorithm

while red.players < config.teamSize or blue.players < config.teamSize:
chosen = None
if shouldPopulateRed(red, blue, config):
chosen = pickRoster(red, maxLadder, maxRosterSize, potentials, config)
else:
chosen = pickRoster(blue, maxLadder, maxRosterSize, potentials, config)
if chosen is None:
break

Why are the teams not filled red/blue/red/blue?

Ranger | Elementalist

(edited by Ryan.9387)

Matchmaking Code

in PvP

Posted by: SlippyCheeze.5483

SlippyCheeze.5483

You skipped what “shouldPopulateRed” does, which is the most important thing to understand here. That is:

def shouldPopulateRed(red, blue, config):
  if red.players >= config.teamSize:
    return False
  if blue.players >= config.teamSize:
    return True
  return red.ratingLow < blue.ratingLow

That actually prefers filling the lower rated first, so depending how it picks the players to place, it’s not even just filling one team or another, it’s filling whatever has the lowest rating first.

For that … it’s detailed, but

scoreRoster
is what matters, in that each potential candidate is evaluated in order to determine what the best match for the group is, based on a whole lot of things.