nypc-perf
A Rust library for calculating player performance based on battle results using the Bradley-Terry model.
Overview
This library implements a Bradley-Terry model based performance system that estimates player performance levels from head-to-head battle outcomes. The algorithm uses Newton-Raphson iteration to find maximum likelihood estimates of player performances that best explain the observed win/loss patterns.
Installation
Add this to your Cargo.toml:
[]
= "0.1.2"
Usage
Basic Example
use ;
// Create battle results between players
let battles = vec!;
// Initialize performance ratings to 0
let mut perf = vec!;
// Run the rating calculation
let result = new
.max_iters // Maximum iterations (default: 100)
.epsilon // Convergence threshold (default: 1e-6)
.run;
// Check if calculation converged
match result
// perf now contains the estimated log-performance ratings
// Higher values indicate better performance
for in perf.iter.enumerate
Authors
NEXON Algorithm Research Team - _algorithm@nexon.co.kr
Documentation
For detailed API documentation, visit docs.rs/nypc-perf.