refactor(api): rename Agent to Competitor and .player field to .rating

Competitor holds dynamic per-history state (message, last_time) for
someone competing; its configuration lives in a Rating.

AgentStore renamed to CompetitorStore to match. The internal
`clean()` free function's parameter name changed from `agents` to
`competitors` for consistency.

Local variable names (agent_idx, this_agent) inside history.rs are
left unchanged — they represent abstract identifiers, not Competitor
instances.

Part of T2 of docs/superpowers/specs/2026-04-23-trueskill-engine-redesign-design.md.
This commit is contained in:
2026-04-24 10:48:50 +02:00
parent 88d54cb9f4
commit decbd895a3
9 changed files with 219 additions and 212 deletions

View File

@@ -3,11 +3,11 @@ use std::{
f64::consts::{FRAC_1_SQRT_2, FRAC_2_SQRT_PI, SQRT_2},
};
pub mod agent;
#[cfg(feature = "approx")]
mod approx;
pub(crate) mod arena;
pub mod batch;
mod competitor;
pub mod drift;
mod error;
pub(crate) mod factor;
@@ -20,6 +20,7 @@ mod rating;
pub(crate) mod schedule;
pub mod storage;
pub use competitor::Competitor;
pub use drift::{ConstantDrift, Drift};
pub use error::InferenceError;
pub use game::Game;