Methodology
The model is fully deterministic. No LLM invents the win percentage — every number below is derived from Torn API responses through a weighted feature pipeline. Weights live in src/lib/torn/config.ts and are designed to be recalibrated once enough historical outcomes are collected.
Data sources
- Own faction from your API key (basic + members).
- Opponent faction basic + members (public).
- Up to five most-recent completed Ranked Wars per faction, with detailed reports where the API exposes per-member attacks/score.
- Current Ranked War state, if one is live.
Battle stats are used only when the Torn API returns them (your own faction with an appropriate key). Opponent strength is always estimated from public signals.
Historical war weights
Recent wars matter more. Weights, most-recent first:
[0.35, 0.25, 0.18, 0.13, 0.09] // sums to 1.0
Roster reconstruction
For every analyzed war we split contributors into three sets: still in the faction (CURRENT VETERAN), no longer in the faction (DEPARTED), and current members who did not appear in any analyzed war (NEW). Departed contributions are visible in the war record but never projected forward as current strength.
Player strength
A 0–100 rating built from whichever signals are present: battle stats (if visible), level, historical weighted war output, activity, and hospitalization status. Each rating carries a confidence — HIGH, MEDIUM, LOW, or UNKNOWN — that propagates to the matchup matrix and the final confidence rating.
Matchup engine
Every current member of your faction is scored against every current member of the opponent using a sigmoid over the strength difference. Categories: DOMINANT ≥ 0.85, FAVORED ≥ 0.68, COMPETITIVE ≥ 0.45, RISKY ≥ 0.25, UNLIKELY below that.
Target coverage & scarcity
Target coverage for a player is the fraction of the opposing roster they can beat with probability ≥ 0.55. Faction-level top-10, median, and roster-wide coverage are aggregated. High-exposure members are those attackable by ≥70% of the opposing active roster.
Win probability model
Weighted feature diffs across seven categories combine into a single scalar, then map through a logistic curve. This is the whole model — no hidden layers, no LLM tuning.
historicalPerformance : 0.9
currentRoster : 1.1
combatMatchup : 1.6
targetAccess : 1.4
participation : 0.7
activity : 0.3
rosterStability : 0.6
probA = sigmoid( sum(weight_i * feature_i) * k )
// k = 0.9, output clamped to [0.02, 0.98]Confidence
Starts at 0.5 and shifts based on: number of war reports analyzed, share of roster with limited strength data, and roster turnover. Maps to HIGH ≥ 0.7, MODERATE ≥ 0.5, LOW ≥ 0.3, VERY LOW below.
What the model does not do (yet)
- Activity / TCT heatmaps (weight 0.3, feature stubbed at 0).
- Battle-stat spy integration.
- Full historical calibration against known outcomes.