{"action":"created","issue":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1910","labels_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1910/labels{/name}","comments_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1910/comments","events_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1910/events","html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1910","id":83366002,"number":1910,"title":"Improve matchmaking","user":{"login":"Slayer95","id":4925744,"avatar_url":"https://avatars.githubusercontent.com/u/4925744?v=3","gravatar_id":"","url":"https://api.github.com/users/Slayer95","html_url":"https://github.com/Slayer95","followers_url":"https://api.github.com/users/Slayer95/followers","following_url":"https://api.github.com/users/Slayer95/following{/other_user}","gists_url":"https://api.github.com/users/Slayer95/gists{/gist_id}","starred_url":"https://api.github.com/users/Slayer95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slayer95/subscriptions","organizations_url":"https://api.github.com/users/Slayer95/orgs","repos_url":"https://api.github.com/users/Slayer95/repos","events_url":"https://api.github.com/users/Slayer95/events{/privacy}","received_events_url":"https://api.github.com/users/Slayer95/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/labels/client","name":"client","color":"eb6420"},{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/labels/enhancement","name":"enhancement","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-01T07:43:24Z","updated_at":"2015-06-04T15:20:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/1910","html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1910","diff_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1910.diff","patch_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1910.patch"},"body":"- Explicitly separate queues for each format, as formatid-queue key-value pairs of GlobalRoom#searches, which replaces GlobalRoom#searchers.\r\n- The matchmaker now tries to pair players with the nearest rating possible first (binary search), rather than pairing any two players within the valid MMR.\r\n- GlobalRoom#matchmakingOK return value now is `false` for \"out of range\", while `null` is used for any other reason.\r\n- Enough validation has been added to GlobalRoom#addSearch so that queues no longer contain corrupted data at any time.\r\n- Cancelling a ladder search no longer cancels challenges.\r\n- User#searching is now a dictionary for the formats currently being searched.\r\n- `|updatesearch|{searching}` messages now send an array as the `searching` value."},"comment":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/comments/108933101","html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/1910#issuecomment-108933101","issue_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/1910","id":108933101,"user":{"login":"Zarel","id":551184,"avatar_url":"https://avatars.githubusercontent.com/u/551184?v=3","gravatar_id":"","url":"https://api.github.com/users/Zarel","html_url":"https://github.com/Zarel","followers_url":"https://api.github.com/users/Zarel/followers","following_url":"https://api.github.com/users/Zarel/following{/other_user}","gists_url":"https://api.github.com/users/Zarel/gists{/gist_id}","starred_url":"https://api.github.com/users/Zarel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zarel/subscriptions","organizations_url":"https://api.github.com/users/Zarel/orgs","repos_url":"https://api.github.com/users/Zarel/repos","events_url":"https://api.github.com/users/Zarel/events{/privacy}","received_events_url":"https://api.github.com/users/Zarel/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T15:20:27Z","updated_at":"2015-06-04T15:20:27Z","body":">E.g. two players searching in a lonely ladder may at some point get within MMR range, yet the matchmaker will never actually pair them. This can probably be fixed in a better way.\r\n\r\nFixes include simply re-running matchmaking on the top two players in each format every once in a while (say, every minute?)\r\n\r\nAlternatively, zipper matchmaking is okay (every X minutes, match the top two, then the next two, then the next two, etc) but I really would rather have a max matchmaking distance constraint, so I'd prefer my first proposal.\r\n\r\nI'm not convinced of the benefits of your first proposal. Your second proposal is okay but probably unnecessary."}}