Anyone found a way to do this? Elo is an integer assigned to each individual player. The higher the elo (essentially) better at the game they are. I need a way to search for players with similiar elo so they can be challenged with opponents of the same skill. Any help?
proven to not be as easy as it sounds, FYI there's a ton of libraries on github to help you with calculating ELO results doe if you havent know
storing players in leagues? like 0-500 and 500 - 1000 or even smaller ranges so using a foreach loop you would just need one league not the whole player base even if we are assuming the server will be full 24/7 with tons of ppl in a queue, i think that's a decent way to separate it
I found that, I hope that helps: http://stackoverflow.com/questions/5464919/php-nearest-value-from-an-array
there's plenty https://github.com/search?utf8=✓&q="elo"&type=Repositories most have their own programming style which you may or may not be comfortable with also the "" seems not to be working only these who incluses "elo" only most likely are you may just have to port it or something then
In most ELO systems I have seen, it starts from within 100 points of that person, and keeps adding 50-100 points each time.
That isnt what we're trying to achieve. We're trying to match players based on their elo, but you are right
This would mean players would have to find a match only in their league though! This depends on the player(s) in queue etc.
Which is what I'm basically suggesting. Get all players queued, check their ELO relative to a player and check the difference of each one, and whichever has the least should get sent into a match.
With your example, a player with 499 wouldn't get matched with a player with 501, even though they may have the closest Elo to each other.
I am thinking you could do a funny sort of binary search that becomes increasingly random throughout execution. So for the first iteration, it would definitely behave like a binary search (picking the side of the list that corresponding to the player's elo value). But then the next time there would be a small chance it would flip the wrong way. As the binary search got closer to convergence, the chance of flipping would increase. This would work better with a whole bunch of players on the server, if there are less, I would just make a list of the n closest players that are at most m distant, and then pick one at random.