Matchmaking updates

Matchmaking

  • Algos should now get 6 ‘first’ matches very consistantly, up from 2-4
  • Time interval between matches should be more consistent
  • Algos will no longer play ranked matches when below 500 Elo. This threshhold may change in the future.
  • Quality of matches should be significantly increased, your partner should be closer to your Elo more consistently.
  • Bugfix: Algos will no longer play a single extra ‘zombie game’ after being deleted

General

  • We are now correctly using display names on the competitions page, rather than firstnames
  • Consolidated buttons on playground
7 Likes

How long should we expect to wait between matches?

In brief, the way we currently handle matchmaking interval is that our servers continuously run ranked matches when not busy doing other things. The number of ranked matches that are played by a given algo is essentially a function of how many servers we have running and the number of active algos that are playing ranked matches.

From what I have seen in the past, algos have gotten around 15-35 games per day, which could vary significantly based on Elo (High Elo players would have fewer people to match with, 1500 algos would match with new algo’s burst matches fairly often)
We expect this number to now be consistently somewhere in the 20s

2 Likes

I’m a big fan of the matchmaking improvements, but I had an algo play a duplicate match.

Here’s the trimmed match history:

{
	"id": 1003420,
	"winning_algo": {
		"id": 36145,
		"lastMatchmakingAttempt": "2018-11-15T16:47:43.878Z",
	},
	"losing_algo": {
		"id": 28459,
		"lastMatchmakingAttempt": "2018-11-15T15:30:29.366Z",
	},
	"date": "2018-11-15T09:04:24.396Z"
},
{
	"id": 1003421,
	"winning_algo": {
		"id": 36145,
		"lastMatchmakingAttempt": "2018-11-15T16:47:43.878Z",
	},
	"losing_algo": {
		"id": 28459,
		"lastMatchmakingAttempt": "2018-11-15T15:30:29.366Z",
	"date": "2018-11-15T09:04:24.377Z"
}

The matches were played ms apart:
2018-11-15T09:04:24.396Z and
2018-11-15T09:04:24.377Z

Since lastMatchmakingAttempt doesn’t change between matches, this looks like a timing issue where the attempt isn’t in updated “soon” enough.

I’d guess it’s quite rare right now, but if algos start running low on opponents to be matched with I wonder if the frequency of this bug would increase.

1 Like

This appears to be a race condition. Because matchmaking no longer uses randomness and we choose matches more intelligently, if two servers ask for a new ranked match for them to play at around the same time, the database will be in the same state, and the same match will be created for both servers.

As a very quick fix, i’m going to add some fuzz to the choice process so the chances that this happens is dramatically reduced. We are looking into better solutions. It appears that this was always an issue, but was extremely unlikely in the past do to randomness in matchmaking.

1 Like

Upon investigating further, we found that creating a proper solution to this was less intensive then we thought, it should be fixed later today - without adding any randomness to matchmaking.

Edit: This should be deployed, you shouldn’t see anymore duplicate matches

2 Likes

Just got two matches against the same algo within 150ms of each other:

{
    "date": "2018-11-17T17:03:25.802Z",
    "id": 1055689,
    "losing_algo": {
        "id": 4407,
        "lastMatchmakingAttempt": "2018-11-17T17:03:25.790Z"
    },
    "winning_algo": {
        "id": 38397,
        "lastMatchmakingAttempt": "2018-11-17T17:03:50.974Z"
    }
},
{
    "date": "2018-11-17T17:03:25.656Z",
    "id": 1055687,
    "losing_algo": {
        "id": 4407,
        "lastMatchmakingAttempt": "2018-11-17T17:03:25.790Z"
    },
    "winning_algo": {
        "id": 38397,
        "lastMatchmakingAttempt": "2018-11-17T17:03:50.974Z"
    }
}

We fixed an issue that would make this happen very often, but this might be the race condition I originally theorized existed. Ill investigate on Monday.

1 Like