I haven’t actually played GW2 in a long time, so there are a lot of things I haven’t kept up with. I just read something about skirmish “victory points” and “war score” now contributing to Glicko rating adjustments? And I saw something else that says that victory points are not available via any API?
Is all this true? Because if it is, it means I haven’t been correctly calculating new ratings the past few weeks, and that I cannot calculate new ratings going forward because the GW2 API does not have the needed information (i.e. this is not simply a matter of writing some code to handle things a new way), which in turn means the probabilities will be wrong.
In which case, calculating and posting these numbers is a colossal waste of time (even more than it was before, I mean). So unless I get me some education quick, I think that means the end of my probability estimates.
Here’s the important bits if someone else wants to attempt to take up this task (I had to make all these files .txt files to attach them, so remove the .txt extension after downloading).
I use the calc.cmd file to make things easier on myself. It’s not necessary, it just saves some typing. basically you invoke calc.cmd and tell it whether you want numbers for NA or EU, the date of the file containing leaderboard ratings, and today’s date. It will then do the rest, calling gw2match.exe for most of the grunt work.
I use sed to delete all the linked worlds from the leaderboard file, because linked worlds don’t matter for anything related to scores or ratings. I included the sed instruction files that do this, if you are interested. sed itself is available from numerous sources; I use the GnuWin32 version myself but just about any version is fine.
Most of the work is done by a program called gw2match.exe, which is written in C# (source attached as Program.cs). It has very few comments so it’s not the easiest thing to follow, but I didn’t expect to have to ever explain how it worked to anybody. You will also need a .NET JSON parser. These are commonly available so I didn’t bother to attach mine.
gw2match has lots of modes, most of which are for experimentation and irrelevant. The important modes for calculating probabilities are mode 0, mode 1 and mode 2.
Mode 0 calculates new ratings based on 2 inputs: previous ratings and current scores. Current scores normally come from the GW2 API but they can be read from a file if you want to see what the rating outcome would have been if scores had been different, or if the scores you want to use aren’t currently available from the API.
Mode 1 calculates probabilities of getting a particular world as one of your opponents. It needs a ratings file as input because ratings affect the probabilities. Mode 1 produces the “na1” and “eu1” files.
Mode 2 calculates probabilities of getting a particular pair of opponents. It also needs a ratings file as input. Mode 2 produces the “na2” and “eu2” files.
If somebody wants to calculate probabilities going forward, the first step is to figure out how skirmish scoring works for rating updates. Then either arrange for the needed scores to be in a file, or figure out how to derive what you need from the API. Then make any changes needed to the Mode 0 code (possibly no changes at all if you can generate a score file), and the rest should work as is.