# Matchmaking rules

From Gladiabots Wiki

## Matchmaking Basics

This page describes the process how opponents and maps are selected in ranked and unranked career matches. Maps are selected randomly but without repetition from a map pool. The different ranked leagues and unranked use their own map pools. For ranked matches players of similar strength are chosen. In unranked matches all kind of opponents can occur.

## Ranked

The matchmaking system for ranked games in career works like this:

- Determine the eligible map pool:
- Take the player's league map pool
- Compute
`X`

as the half of the map pool size - Get the
`X`

last played maps - Remove those maps from the map pool

- Get the 100 oldest available ranked matches matching these conditions:
- Map is in the eligible map pool
- league score delta has to be equal or lower than 400 points

- Remove matches matching these conditions:
- Opponent has already been played in the last 5 minutes

- At this point, there are 2 possible cases:
- There are some matches remaining:
- Sort the remaining matches using these comparison rules:
- Opponent with the closest league first
- In case of equality: opponent using a different IP first
- In case of equality: opponent never met or met the furthest in the past first (considered equal under a 10 minutes delta)
- In case of equality: opponent with the closest league score first (considered equal under a 10 points delta)
- In case of equality: oldest match first

- Take the first match of the sorted list and join it

- Sort the remaining matches using these comparison rules:
- There's no match remaining:
- Pick a random map from the eligible map pool
- Pick a random left/right side
- Create a new match using these parameters

- There are some matches remaining:

## Unranked

The matchmaking system for unranked games in career works like this:

- Determine the eligible map pool:
- Take the unranked map pool
- Compute
`X`

as the half of the map pool size - Get the
`X`

last played maps - Remove those maps from the eligible map pool

- Get the 100 oldest available unranked matches matching these conditions:
- Map is in the eligible map pool

- Remove matches matching these conditions:
- Opponent has already been played in the last 60 seconds

- At this point, there are 2 possible cases:
- There are some matches remaining:
- Sort the remaining matches using these comparison rules:
- Opponent with the closest XP level first
- In case of equality: opponent using a different IP first
- In case of equality: opponent never met or met the furthest in the past first (considered equal under a 10 minutes delta)
- In case of equality: oldest match first

- Take the first match of the sorted list and join it

- Sort the remaining matches using these comparison rules:
- There's no match remaining:
- Pick a random map from the eligible map pool
- Pick a random left/right side
- Create a new match using these parameters

- There are some matches remaining: