ELO 系统的最佳 table 设计
Optimal table design for ELO system
我正在尝试使用带有 postgresql 的 django 创建 elo 系统。
下面的描述是我想象中的系统。
Elo table 按日期字段排序。 Table 有两个玩家的 elo 数据字段。
当新游戏创建时,计算的elo数据将直接累积在table上。这适用于最新游戏。
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)
我找不到其他解决方案。另外我认为这个解决方案并不完美,因为当你创建过去的游戏时,如果你有大量 table.
,你应该重新计算大量的 elo 数据
- 数据库可以处理吗?不会慢吗?
- 可能会进行大量查询。是inevitable?
有管理ELO系统的思路吗?我看到了 this and this,但是我找不到其他解决方案。
将数据存储与应用程序处理分开。
使用table来存储数据。不要尝试在 SQL.
中编写 ELO 算法
由于ELO比较复杂,使用应用语言来计算ELO。只需重新加载必要的行(整个 table??),重新计算排名,然后更新或重建 table.
我正在尝试使用带有 postgresql 的 django 创建 elo 系统。
下面的描述是我想象中的系统。
Elo table 按日期字段排序。 Table 有两个玩家的 elo 数据字段。
当新游戏创建时,计算的elo数据将直接累积在table上。这适用于最新游戏。
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)
我找不到其他解决方案。另外我认为这个解决方案并不完美,因为当你创建过去的游戏时,如果你有大量 table.
,你应该重新计算大量的 elo 数据- 数据库可以处理吗?不会慢吗?
- 可能会进行大量查询。是inevitable?
有管理ELO系统的思路吗?我看到了 this and this,但是我找不到其他解决方案。
将数据存储与应用程序处理分开。
使用table来存储数据。不要尝试在 SQL.
中编写 ELO 算法由于ELO比较复杂,使用应用语言来计算ELO。只需重新加载必要的行(整个 table??),重新计算排名,然后更新或重建 table.