1. 基础分
B a s e R a t i n g = P r o b l e m S c o r c e ∗ 0.5 + r a t i n g S c o r c e ∗ 0.4 + B l o g S c o r e ∗ 0.1 BaseRating =ProblemScorce*0.5+ratingScorce*0.4+BlogScore*0.1 BaseRating=ProblemScorce∗0.5+ratingScorce∗0.4+BlogScore∗0.1
P r o b l e m S c o r c e = P a s s P l o b l e m S u m ProblemScorce = PassPloblemSum ProblemScorce=PassPloblemSum
r a t i n g S c o r c e = ( A t c o d e R a t i n g + C o d e f o r c e s R a t i n g ) ∗ 0.1 ratingScorce=(AtcodeRating+CodeforcesRating)*0.1 ratingScorce=(AtcodeRating+CodeforcesRating)∗0.1
B l o g S c o r c e = B l o g N u m ∗ 2 BlogScorce=BlogNum*2 BlogScorce=BlogNum∗2
2. Rating 计算
R a t i n g Rating Rating 将以(天\周\月)为单位作为一场比赛,进行迭代计算。
2.1 模块分数
2.1.1 ProblemScore
P r o b l e m S c o r e = e a s y ∗ 1 + b a s i c ∗ 2 + a d v a n c e d ∗ 3 + h a r d ∗ 4 + u n k n o w n ∗ 2 ProblemScore=easy∗1+basic∗2+advanced∗3+hard∗4+unknown∗2 ProblemScore=easy∗1+basic∗2+advanced∗3+hard∗4+unknown∗2
2.1.2 ratingScore
c o d e f o r c e s : codeforces : codeforces:
d = r a t i n g c f n e w − r a t i n g c f d=rating_{cf_{new}}-rating_{cf} d=ratingcfnew−ratingcf
r a t i n g S c o r e c f = { 1 , r a t i n g c f ≤ 600 , d ≥ 1 r a t i n g c f 400 + r a t i n g c f ∗ d 20000 , r a t i n g c f ≥ 601 , d ≥ 1 0 , d ≤ 0 ratingScore_{cf}= \begin{cases} 1,\quad rating_{cf}\leq 600,d \geq 1\\ \frac{rating_{cf}}{400}+\frac{rating_{cf}*d}{20000}, \quad rating_{cf}\geq 601,d \geq 1\\ 0,\quad d \leq 0 \end{cases} ratingScorecf=⎩ ⎨ ⎧1,ratingcf≤600,d≥1400ratingcf+20000ratingcf∗d,ratingcf≥601,d≥10,d≤0
A t c o d e r : Atcoder: Atcoder:
d = r a t i n g a t c n e w − r a t i n g a t c d=rating_{atc_{new}}-rating_{atc} d=ratingatcnew−ratingatc
r a t i n g S c o r e a t c = { 1 , r a t i n g a t c ≤ 400 , d ≥ 1 r a t i n g a t c 400 ⋅ ( 1 + d 50 ) , r a t i n g a t c ≥ 401 , d ≥ 1 r a t i n g a t c 400 ⋅ ( 1 + d 20 ) , r a t i n g a t c ≥ 1000 , d ≥ 1 0 , d ≤ 0 ratingScore_{atc}= \begin{cases} 1,\quad rating_{atc}\leq 400,d \geq 1\\ \frac{rating_{atc}}{400}\cdot(1+\frac{d}{50}), \quad rating_{atc}\geq 401,d \geq 1\\ \frac{rating_{atc}}{400}\cdot(1+\frac{d}{20}), \quad rating_{atc}\geq 1000,d \geq 1\\ 0,\quad d \leq 0 \end{cases} ratingScoreatc=⎩ ⎨ ⎧1,ratingatc≤400,d≥1400ratingatc⋅(1+50d),ratingatc≥401,d≥1400ratingatc⋅(1+20d),ratingatc≥1000,d≥10,d≤0
2.1.3 BlogScore
B l o g S c o r e = ∑ i = 1 n B l o g S c o r e i n BlogScore=\frac{\sum^{n}_{i=1} BlogScore_i}{n} BlogScore=n∑i=1nBlogScorei
2.1.4 AttendanceScore
A t t e n d a n c e S c o r e = 单位周期内出勤分钟数 AttendanceScore=单位周期内出勤分钟数 AttendanceScore=单位周期内出勤分钟数
2.2 预期胜率
ELO积分预期胜率计算公式
P ( D ) = 1 2 + ∫ 0 D 1 δ 2 π ⋅ e − x 2 2 δ 2 d x P(D)=\frac{1}{2}+\int_0^D \frac{1}{\delta\sqrt{2\pi}} \cdot e^{\frac{-x^2}{2\delta ^2}}dx P(D)=21+∫0Dδ2π1⋅e2δ2−x2dx
利用最小二乘法得到实际应用公式,其中 D D D 代表分差。
P ( D ) = 1 1 + 1 0 D 400 P(D)=\frac{1}{1+10^{\frac{D}{400}}} P(D)=1+10400D1
2.3 周期表现 rating 计算
2.3.1 考虑 1 V 1
R A : p l a y e r A 的 r a t i n g R B : p l a y e r B 的 r a t i n g R_A:player A 的 rating ~~~~~~~~~~~~~~~~~~~~~~~~~~~R_B:player B 的 rating RA:playerA的rating RB:playerB的rating
E A = 1 1 + 1 0 R B − R A 400 E B = 1 1 + 1 0 R A − R B 400 E_A=\frac{1}{1+10^{\frac{R_B-R_A}{400}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~E_B=\frac{1}{1+10^{\frac{R_A-R_B}{400}}} EA=1+10400RB−RA1 EB=1+10400RA−RB1
E A + E B = 1 E_A+E_B=1 EA+EB=1
S A = p r o b l e m S c o r e A p r o b l e m S c o r e A + p r o b l e m S c o r e B ⋅ 0.4 + r a t i n g S c o r e A r a t i n g S c o r e A + r a t i n g S c o r e B ∗ 0.3 + b l o g S c o r e A b l o g S c o r e A + b l o g S c o r e B ∗ 0.2 + A t t e n d a n c e S c o r e A A t t e n d a n c e S c o r e A + A t t e n d a n c e S c o r e B ∗ 0.1 S_A=\frac{problemScore_A}{problemScore_A+problemScore_B} \cdot 0.4+\frac{ratingScore_A}{ratingScore_A+ratingScore_B}*0.3+ \\ ~\\~~~~~~~~~~ \frac{blogScore_A}{blogScore_A+blogScore_B}*0.2+\frac{AttendanceScore_A}{AttendanceScore_A+AttendanceScore_B}*0.1 SA=problemScoreA+problemScoreBproblemScoreA⋅0.4+ratingScoreA+ratingScoreBratingScoreA∗0.3+ blogScoreA+blogScoreBblogScoreA∗0.2+AttendanceScoreA+AttendanceScoreBAttendanceScoreA∗0.1
S B = p r o b l e m S c o r e B p r o b l e m S c o r e A + p r o b l e m S c o r e B ⋅ 0.4 + r a t i n g S c o r e B r a t i n g S c o r e A + r a t i n g S c o r e B ∗ 0.3 + b l o g S c o r e B b l o g S c o r e A + b l o g S c o r e B ∗ 0.2 + A t t e n d a n c e S c o r e B A t t e n d a n c e S c o r e A + A t t e n d a n c e S c o r e B ∗ 0.1 S_B=\frac{problemScore_B}{problemScore_A+problemScore_B} \cdot 0.4+\frac{ratingScore_B}{ratingScore_A+ratingScore_B}*0.3+\\~\\~~~~~~~~~~~\frac{blogScore_B}{blogScore_A+blogScore_B}*0.2+\frac{AttendanceScore_B}{AttendanceScore_A+AttendanceScore_B}*0.1 SB=problemScoreA+problemScoreBproblemScoreB⋅0.4+ratingScoreA+ratingScoreBratingScoreB∗0.3+ blogScoreA+blogScoreBblogScoreB∗0.2+AttendanceScoreA+AttendanceScoreBAttendanceScoreB∗0.1
S A + S B = 1 S_A+S_B=1 SA+SB=1
R A n e w = R A + K ⋅ ( S A − E A ) R_{A_{new}}=R_A+K \cdot (S_A -E_A) RAnew=RA+K⋅(SA−EA)
K K K 暂定为 32 32 32,实际上 K K K 将随着用户 R a t i n g Rating Rating 的增加而减小。
2.3.2 考虑 1 V n
R A n e w = R A + K ⋅ P A R_{A_{new}}=R_A+K \cdot P_A RAnew=RA+K⋅PA
P A = ∏ i = 排名低于 A 的用户 x ( S A i − E A i ) x − ∏ i = 排名高于 A 的用户 y ( E A i − S A i ) y P_A=\sqrt[x]{\prod^{x}_{i=排名低于A的用户}(S_{Ai}-E_{Ai})}-\sqrt[y]{\prod^{y}_{i=排名高于A的用户}(E_{Ai}-S_{Ai})} PA=x∏i=排名低于A的用户x(SAi−EAi)−y∏i=排名高于A的用户y(EAi−SAi)
由于 ( S A i − E A i ) (S_{Ai}-E_{Ai}) (SAi−EAi)并不是全为正数,因此通过分别计算对应的值做差为 P A P_A PA。
2.3.3 rating 修正调整
第一次:
a d j u s t = − 1 − ∑ K i ∗ P i n adjust=\frac{-1-\sum K_i*P_i}{n} adjust=n−1−∑Ki∗Pi
R i = R i + a d j u s t R_i=R_i+adjust Ri=Ri+adjust
保证所有人的平均变化接近 0 并且在 0 以下。
第二次:
m = m i n ( n , 4 n ) m=min(n,4\sqrt{n}) m=min(n,4n)
a d j u s t = m i n ( m a x ( − 1 − ∑ K i ∗ P i m , − 10 ) , 0 ) adjust=min(max(\frac{-1-\sum K_i*P_i}{m},-10),0) adjust=min(max(m−1−∑Ki∗Pi,−10),0)
取一个合理的 a d j u s t adjust adjust 使得前 m m m 个人的平均变化为 0。
R i = R i + a d j u s t ( i ≤ m ) R_i=R_i+adjust~~~~(i \leq m) Ri=Ri+adjust (i≤m)
3. 后记
本文参考了 c o d e f o r c e , a t c o d e r , E l o r a t i n g s y s t e m codeforce,atcoder,Elo~rating~system codeforce,atcoder,Elo rating system 的 r a t i n g rating rating 规则,以周期统计数据替代比赛场景,并根据应用场景进行修改,目前未进行样本测试。
可能测试后,还会对参数以及公式大改QAQ文章来源:https://www.toymoban.com/news/detail-412658.html
参考
https://en.wikipedia.org/wiki/Elo_rating_system
https://www.luogu.com.cn/blog/ak-ioi/cf-at-rating文章来源地址https://www.toymoban.com/news/detail-412658.html
到了这里,关于GXU_XCPC_Board rating 计算规则的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!