我试图使用postgresql使用django创建elo系统。
下面的描述是我想象中的一个系统。
按日期字段排序的Elo表。表中有两个玩家的elo数据字段。
当新游戏创建时,计算出的elo数据将直接累积在表上。这是当一个游戏是最新的工作。
Elo Table
Date | 2022-04-01
Player A | 1015.0 (Win)
Player B | 985.0
Date | 2022-04-02
Player A | 1021.0 (Win)
Player B | 979.0
<--------------------+
// new game created |
// this data will be located at here ---+
Date | 2022-04-03
Player A | 1012.0
Player B | 988.0 (Win)然而,当过去的游戏创建时,出现了不熟悉的情况。
首先,用以前的数据计算当前游戏的elo数据。第二,所有elo数据在此游戏之后将被更新。
Elo Table
Date | 2022-04-01
Player A | 1015.0 (Win)
Player B | 985.0
<-----------------------+
Date | 2022-04-03 |
Player A | 1021.0 (Win) (this value will be |
Player B | 979.0 re-calculated.) |
|
// past game created. |
// this data will be located at here --------+
// all data after this will be updated.
Date | 2022-04-02
Player A | 1002.0
Player B | 998.0 (Win)我找不到其他解决办法了。此外,我认为这个解决方案并不完美,因为当您创建过去的游戏,,您应该重新计算大量的elo数据,如果您有大的表。
,
发布于 2022-04-28 15:40:34
将数据存储与应用程序处理分开。
编写ELO算法。
https://stackoverflow.com/questions/71999007
复制相似问题