使用 trueskill 算法,给定两个玩家的评分,我如何计算 win/loss 概率?
With the trueskill algorithm, given two players' ratings, how can I calculate the win/loss probability?
我看到这个问题在 trueskill 的讨论中出现了很多,但我还没有找到决定性的答案。
我在这里使用 Python 实现:
https://github.com/sublee/trueskill
我在这里使用该库整理了一个简单的模拟:
https://gist.github.com/klenwell/3a15eca6b83ce575d0ca
这个问题是作为 first issue for the Python library. In the Jeff Moser blog post 提交的,大多数 trueskill 的讨论都会回到这个问题,这个问题在评论中多次出现。
有人可以提供与 Python 库实现兼容的函数,该函数可以根据两个玩家的评分准确 returns 预测玩家对另一个玩家的获胜概率吗?
这是一个基于 Moser 博客上 this comment 的函数:
from math import sqrt
from trueskill import BETA
from trueskill.backends import cdf
def win_probability(player_rating, opponent_rating):
delta_mu = player_rating.mu - opponent_rating.mu
denom = sqrt(2 * (BETA * BETA) + pow(player_rating.sigma, 2) + pow(opponent_rating.sigma, 2))
return cdf(delta_mu / denom)
使用 my gist, this seems to perform better than original win_probability
function found here 测试。
此函数仅处理正面交锋的情况,但评论中包含一种更通用的计算多人比赛获胜概率的方法。
我看到这个问题在 trueskill 的讨论中出现了很多,但我还没有找到决定性的答案。
我在这里使用 Python 实现:
https://github.com/sublee/trueskill
我在这里使用该库整理了一个简单的模拟:
https://gist.github.com/klenwell/3a15eca6b83ce575d0ca
这个问题是作为 first issue for the Python library. In the Jeff Moser blog post 提交的,大多数 trueskill 的讨论都会回到这个问题,这个问题在评论中多次出现。
有人可以提供与 Python 库实现兼容的函数,该函数可以根据两个玩家的评分准确 returns 预测玩家对另一个玩家的获胜概率吗?
这是一个基于 Moser 博客上 this comment 的函数:
from math import sqrt
from trueskill import BETA
from trueskill.backends import cdf
def win_probability(player_rating, opponent_rating):
delta_mu = player_rating.mu - opponent_rating.mu
denom = sqrt(2 * (BETA * BETA) + pow(player_rating.sigma, 2) + pow(opponent_rating.sigma, 2))
return cdf(delta_mu / denom)
使用 my gist, this seems to perform better than original win_probability
function found here 测试。
此函数仅处理正面交锋的情况,但评论中包含一种更通用的计算多人比赛获胜概率的方法。