I've implemented an Elo rating system in a game. There is no limit for the number players. Players can join the game constantly so the number of players probably rises gradually.
How the Elo values are exactly calculated isn't important because of this fact: If team A beats team B then A's Elo win equals B's Elo loss.
Hence I've got a problem concerning the starting values for my rating system:
Should I use the starting value "0" for every player? The sum of all Elo values would be constant. But since the number of players is increasing there would be some kind of Elo deflation, wouldn't it?
Should I use any starting value greater than 0? In this case, the sum of all Elo values would constantly increase. So there could be an Elo inflation. The problem: Elo points lose value but the starting value keeps always the same.
What should I do? Can you help me? Thanks in advance!
You can start at zero and add a fudge factor to the displayed score to keep it above zero, or you can start at 1000 - they are the same thing. Yes, with the 1000 starting point you'll have an increasing number of total ELO points in the system but it will always be the same number per player on average - 1000. The starting value for Elo is always the current average. ELO is a zero sum game, points lost by player A are gained by player B.
When you set a starting point at 1000 what you are essentially saying is that the average player = 1000 pts. With a closed group of initial players (beta testers?) this is true, within that group average = 1000. But if the game is something you improve at with time then your closed group average player becomes highly skilled compared to someone who hasn't played.
Now when you assign a 1000 to a new player you are saying new average players = existing highly skilled average player. This is not true, they are likely to be much less skilled that your original closed group. So the new player loses points and your highly skilled players gain => inflation. What you would need to do is accurately assess the skill of new players and assign them a ranking that is more in keeping with their actual skill. This could be done be assigning them a "provisional ranking" for their first x games until you get a feel for their skill. When provisionally ranked only their ELO score would change, not those of the people they play. Once they join the real system the points they bring into the scored ELO would roughly equate to their actual skill and they wouldn't move up or down dramatically => no inflation or deflation.
In short: Provisional rankings
This site used the elo rating system. They start at 1200
taken from http://gameknot.com/help-answer.pl?question=29
GameKnot rating system is based on Elo rating system with a fixed K = 20 and the following modifications:
The first 20 games are used to establish player's rating on the website. During the first 20 games, the player's rating is calculated as an average of the ratings of all his/her opponents, +400 in case of a win, -400 in case of a loss, same for a draw. +/-200 points are used when playing against a player with a provisional rating.
PLayer's rating is provisional during the first 20 games, after which it becomes established.
Player's rating is considered to be equal to 1200 during the first 5 rated games.
Timeouts are counted as wins only if there were at least 3 moves made in the game (losses are always counted for the timed out players, regardless of how many moves were made).
The higher of two ratings, at the beginning of the game and at the end, is used to calculate the rating adjustments after the game is over.
For example, if during your first 20 rated games, you played 3 games and you won against 1200 player with provisional rating, then against 1400 player with established rating, but lost against 1600 player with established rating, your rating will be:
( (1200 + 200) + (1400 + 400) + (1600 - 400) ) / 3 = 1467
Or, if during your first 20 rated games, you win against 1200 provisional, win against 1400 established, lose against 1600 provisional, draw against 1500, your rating will be:
( (1200 + 200) + (1400 + 400) + (1600 - 200) + 1500 ) / 4 = 1525
Elo works on the difference in the ratings of the two players or teams, the actual value is irrelevant. You can start at any number you like. I run a system for the Facebook Scrabble League with a starting value of 5000 simply to distinguish it from other Scrabble ratings systems out there.
Inflation does not result from over-rated newcomers losing points to experienced players - that all evens out in time. Inflation results from people with less than average ratings leaving the system. This is what tends to happen in online games unlike real life chess, where deflation is a problem because highly rated players retire and take their points out of the system.
But do you need to worry about inflation? The only time it is important is if you wish to compare the performance of current players with historical figures - not a problem any online gamers are likely to face. Even if you do worry about inflation, it's easy to correct. Find the mean rating of all your current players and compare it with the start figure, if it's too high, reduce everyone's rating to bring it back in line. In my experience a reduction of 1 or 2 points per ratings period does the trick and accounts for a lot of newcomers who get thrashed and don't come back.
Many systems give newcomers higher K values in order that they find their level more quickly.
Another approach is not to rate newcomers until they have played their first ratings period, at which point you calculate the rating based on what if would have to have been for Elo to predict the results correctly. This is impossible if you have all unrated players together and (I think) would involve recursion if you have multiple newcomers in a tournament. It also undermines the zero-sum principle of Elo and removes your ability to measure inflation. However, talking to people who use this system, I am told "it all evens out" in practice.
I would also add that we have one determined player who has lost all but 21 out of 732 games he's played in the last four years and his Elo is still about 4100. The ratings points he loses each round are rapidly approaching zero.
I don't know if it is useful, but Mark Glickman's Ratings Page discusses some issues with Elo ratings, their declines, etc. (see the last few paragraphs there). Also see his rating system, the Glicko system, which seems to account for playing frequency and discusses rating reliability. Finally, his research page has a lot of papers discussing ratings and their reliability.
Hope that helps.
Do players see this score?
Will the players understand Elo?
Will players continue to play if their score becomes negative?
I would start everyone out at some positive point value (10, 100, 1000, it doesn't matter). When two people of relatively capability play each other, the scores trade as expected. Where you need to concentrate is some sort of relative capability between two players.
Suppose, later on in the game's life, I have 25000 points, and you're a n00b with 100. I beat you, I gain nothing and you lose nothing. Why? Because I just pwned a n00b, that's why. There should be no advantage for a new player to take down a starting player. Also, even if you are in some point range, you should implement something where you can only earn so many points from a given player in a certain time range.
Obviously, this will be something that will be continually tweaked throughout your game's life time.
Maybe, make points not be able to go below the starter about and put the amount of he loss in some "pocket.
Lets say players start with 0.
One player has elo 0 and lose 10 points. He will lose nothing and this points will go to some pocket.
Now lets imagine the player won the next game and got 11 points. Instead of getting those 11 points, he would get just 1 point. And now his "pocket" would have 0 points.
I think that most ELO-like systems on the Internet will have a problem with ratings creep.
Assume that all new players start at a rating of zero. LousyPlayer loses a dozen games, and his rating goes far below zero. What stops him from clearing his browser, registering a new account under a new email address, and starting over?
If this is possible, then low-ranked accounts will lay fallow, moving up the practical average rating.
Related
I have a problem to solve. I need to visit 7962 places with a vehicle. The vehicle travels with 10km/h and each time I visit one place I stay there for 1 minute. I want to divide those 7962 places into subsets that take will take up to 8 hours. So lets say 200 places take 8 hours I visit them and come back the next day to visit another maybe 250 places(the 200 places subsets will require more distance travelled). For the distance I only care for Euclidean Distances no need to take into account the distance through the road network.
A map of the 7962 places
What I have done so far is use the k means clustering algorithm to get good enough subsets and then the Lin Kernighan heuristic (Program Concorde) to find the distance. And then compute times. But my results go from 4 hours to 12 hours. Any idea to make it better? Or a code that does this whole task all together. Propose anything but I am not a programmer I just use Python some times.
Set of coordinates :
http://www.filedropper.com/wholesetofcoordinates
Coordinates subsets(40 clusters produces with the k means algorithm):
http://www.filedropper.com/kmeans40clusters
I am searching for algorithm and jsprit or optaplanner project seems to be in order to resolve my problem. We only work with Java.
I have take a look at jsprit bicycle example, an entry point, and now I need to solve a problem arround patient transportation.
A stretcher can carry a bed, a wheelchair or a valid patient. He can carry a wheelchair and a valid at the same time if they go to the same area and come from a same area.
for long distance, a bed require 2 stretchers
a bed mover (a kind of electric truck fixed to the bed) replace 1
stretcher
bed movers are most efficient for long distance but may be use for
short too
a bed mover only helps for bed (nor for wheelchair nor valid patient)
when finish, the bed mover stays in place or returns empty to a park
area (maybe 1..n places)
General rules :
the total time of transportation per agent must be as equals as
possible as each others (equity)
transports are time windowed and delay must be as short as possible
(depending on priorities)
new transport requests comes every time
it's better to use bed movers than 2 stretchers
Can you give me how to start to resolve this kind of problem. Do you think it's possible?
Regards
I want to setup a system that will end up ranking competitors against one another based on the votes. In this example, there will be 250 competitors, but only 4 people able to cast votes. We ideally want it setup in a hot-or-not fashion (using the Elo rating system), but I wonder how many votes must be cast before we'd get a fair ranking?
Does anyone have any thoughts on how I might establish a fair(ish) rating without each voter casting thousands of votes?
It depends on your k-factor, i.e. how quickly you want ratings to correct to changes in skill.
If you use a higher k-factor, the rankings will quickly approximate the skill of competitors. However, in that case the ranking will be mostly a short term value, with chance, pairings and "bad days" affecting it greatly.
Using a multiple level k-factor system, like the chess world does, lets you both quickly converge to approximate ratings for new players (and the initial set of players) and track a longer term ranking for established players.
I would recommend starting with the values FIDE uses, so you don't have to retest extensively:
400 as a denominator in the exponents, so that 200 points' difference = 75% winning chance
k = 30 for the first 30 games
k = 20 after that until the player has reached 2400 ranking at least once
k = 10 thereafter
If 30 games is too much for the initial period, you could use a lower number but increase the initial k proportionally. Beware that this will make the initial ranking very variable.
If you want a different normalization than the 200 points -> 75%, you can divide all the numbers above by the same constant.
We have a model in our ralis app whose objects are assigned a score based on positive user actions. We'll call them products for simplicity sake. If a user likes a product or buys a product or views a product, the score is incremented at various weights (a like might be worth more than a view, two views in the span of 30 seconds might be worth more than three views spread over an hour, etc.)
We'd like to use these scores to help sort and rank products, say for a popular products list, but for various reasons -- using the straight ranking is going to unevenly favor older products, since they'll have more time to amass a higher score.
My question is, how to normalize the scores between new and old products. I thought about dividing the products score by a unit of time, say the number of days it's been in existence, but am worried that will cut down the older products too much. Any thoughts on the best way to fairly normalize the scores between the old and new products?
I'm also considering an example of a bayesian rating system I found in another question:
rating = ((avg_num_votes * avg_rating) + (product_num_votes * product_rating)) / (avg_num_votes + product_num_votes)
Where theavg numbers are calculated by looking at the scores across all products that have more than one vote (or in our case, a positive action). This might not be the best way, because we don't have a negative rating in our system and it doesn't take time into consideration at all.
Your question reminds me the concept of Exponential Discounting Cash Flow in finance.
The concept is the following : 100$ in two years worth less than 100$ in one year, which worth less than 100$ now, ...
I think that we can make a good comparison here : a product of yesterday worth more that a product of the day before but less than a product of today.
The formula is simple :
Vn = V0 * (1-t)^n
with V0 the initial value (the real number of positives votes), t a discount rate (you have to fix it, like 10%) and n the time passed (for example n days). Thus a product will lose 10% of his value each day (but 10% of the precedent day, not of the initial value).
You can also see Hyperbolic discounting that is closer of your try. The formula can be sometyhing like that I guess :
Vn = V0 * (1/(1+k*n))
An other approach, simpler, but crudest : linear discounting. You can simply give an initial value for the scores, like 1000 and each day, you decrement all scores by 1 (or an other constant).
Vn = V0 - k*n
Today I had an interview with a gentleman who asked me to determine how many veterinarians are in the city of Atlanta. The interview was for an entry-level development position.
Assumptions: 1,000,000 people in Atlanta, 500,000 pets in Atlanta. The actual data is irrelevant.
Other than that there were no specifics. He asked me to find this data using only a whiteboard. There was no code required; it was simply a question to determine how well I could "reason" the problem. He said there was no right or wrong answer, and that I should work from the ground up.
After several answers, one of which was ~1,000 veterinarians in Atlanta, he told me he was going to ask other questions and I got the impression I had missed the point entirely.
I tried to work from the assumption that each vet could maybe see five animals a day, in a total of 24 working days per month.
Using those assumptions, I finally calculated (24 * 5) * 12 = 1,440 pets/year, and with 500,000 pets that would come to 500,000 / 1,440 ~= 348 veterinarians.
What steps could I have taken to approach this problem differently, in case I run into this sort of problems in future interviews?
I agree with your approach. The average pet sees a veterinarian so many times a year. The average veterinarian sees so many pets per week. Crunch those numbers and you have your answer.
Just guessing off the top of my head, I would say the average pet sees a veterinarian twice each year. So that's 1,000,000 visits. I'd say the average vet works 48 weeks a year, sees about a pet every 40 minutes, and works 30 hours per working week. That's about 2,160 vists per vet.
1,000,000 / 2,160 ~= 462.
My answer is close enough to yours, given that the numbers are all guesses.
The point of the question, I think, is to clearly define each assumption you have to make in order to produce an estimate. Your assumptions can be wildly inaccurate; in practice, they usually aren't too bad.
Interesting aside...there's a fun board game called Guesstimation built entirely around this kind of estimation problem.
How many pets are the types of pets that need to see veterinarians? How many vets see pets instead of large animals?
The point of this question isn't necessarily a Fermi question: It's to see how you handle ambiguous requirements that could significantly affect your answer.