horaceho/ers 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

horaceho/ers

Composer 安装命令:

composer require horaceho/ers

包简介

EGF Rating System

README 文档

README

The rating algorithm was updated starting 2021. The whole database from back in 1996 was recalculated with this algorithm. You can find the old algorithm here.

  • Ratings are updated by: r' = r + con * (Sa - Se) + bonus
  • r is the old EGD rating (GoR) of the player
  • r' is the new EGD rating of the player
  • Sa is the actual game result (1.0 = win, 0.5 = jigo, 0.0 = loss)
  • Se is the expected game result as a winning probability (1.0 = 100%, 0.5 = 50%, 0.0 = 0%). See further below for its computation.
  • con is a factor that determines rating volatility (similar to K in regular Elo rating systems): con = ((3300 - r) / 200) ^ 1.6
  • bonus (not found in regular Elo rating systems) is a term included to counter rating deflation: bonus = ln(1 + exp((2300 - rating) / 80)) / 5
  • Se is computed by the Bradley-Terry formula: Se = 1 / (1 + exp(β(r2) - β(r1)))
  • r1 is the EGD rating of the player
  • r2 is the EGD rating of the opponent
  • β is a mapping function for EGD ratings: β = -7 * ln(3300 - r)

EGF Official ratings system

Usage

composer require horaceho/ers
<?php

require_once __DIR__ . '/../vendor/autoload.php';

use Horaceho\Ers;

$ers = new Ers\Ers();

$player = 2100.0;
$opponent = 2100.0;
$win = 1.0;
$loss = 0.0;

$win_update = $ers->update($player, $opponent, $win);
assert ($win_update == 2109.306);
echo $win_update . PHP_EOL;

Test

git clone git@github.com:horaceho/ers.git
cd ers
php test/ers.php
php test/about.php

horaceho/ers 适用场景与选型建议

horaceho/ers 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 22 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 10 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 horaceho/ers 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 horaceho/ers 我们能提供哪些服务?
定制开发 / 二次开发

基于 horaceho/ers 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-25