http://wiki.guildwars2.com/wiki/PvP_Matchmaking_Algorithm#Match_Prediction
// Returns the team’s odds of victory as a ratio of 0..1, where 0 means
// minimal chance of victory and 1 means minimal chance of defeat.
def predictionToOddsOfVictory (prediction, team):
normalized = prediction / 2 + 1;
if team == ‘red’:
return 1 – normalized
else:
return normalized
In the above third function, I guess it should be:
def predictionToOddsOfVictory (prediction, team):
normalized = prediction / 2 + 0.5;
if team == ‘red’:
return 1 – normalized
else:
return normalized
you are trying to turn something from range(-1, 1) to range(0, 1), right?