# YRTV Player Capability Model (6-Dimension System)

This document outlines the calculation principles and formulas for the 6-dimensional player capability model used in the YRTV platform.

## Overview

The model evaluates players across 6 key dimensions:
1. **BAT (Battle Power)**: Aim and direct combat ability.
2. **PTL (Pistol)**: Performance in pistol rounds.
3. **HPS (High Pressure)**: Performance in clutch and high-stakes situations.
4. **SIDE (Side Proficiency)**: T vs CT side performance balance and rating.
5. **UTIL (Utility)**: Usage and effectiveness of grenades/utility.
6. **STA (Stability)**: Consistency and endurance over matches/time.

Each dimension score is normalized to a 0-100 scale using min-max normalization against the player pool (with outlier clipping at 5th/95th percentiles).

---

## 1. BAT (Battle Power)
*Focus: Raw aiming and dueling mechanics.*

**Features & Weights:**
- **Rating (40%)**: Average Match Rating (Rating 2.0).
- **KD Ratio (20%)**: Average Kill/Death Ratio.
- **ADR (20%)**: Average Damage per Round.
- **Headshot% (10%)**: Headshot kills / Total kills.
- **First Kill Success (10%)**: Entry Kills / (Entry Kills + Entry Deaths).
- **Duel Win Rate (High Elo) (10%)**: KD Ratio specifically against high-Elo opponents.

## 2. PTL (Pistol Round)
*Focus: Proficiency in pistol rounds (R1 & R13).*

**Features & Weights:**
- **Pistol KD (50%)**: Kill/Death ratio in pistol rounds.
- **Pistol Util Efficiency (25%)**: Headshot rate in pistol rounds (proxy for precision).
- **Pistol Multi-Kills (25%)**: Frequency of multi-kills in pistol rounds.

## 3. HPS (High Pressure)
*Focus: Clutching and performing under stress.*

**Features & Weights:**
- **1v1 Win Rate (20%)**: Percentage of 1v1 clutches won.
- **1v3+ Win Rate (30%)**: Percentage of 1vN (N>=3) clutches won (High impact).
- **Match Point Win Rate (20%)**: Win rate in rounds where team is at match point.
- **Comeback KD Diff (15%)**: KD difference when playing from behind (score gap >= 4).
- **Undermanned Survival (15%)**: Ability to survive or trade when team is outnumbered.

## 4. SIDE (Side Proficiency)
*Focus: Tactical versatility and side bias.*

**Features & Weights:**
- **CT Rating (35%)**: Average Rating on CT side.
- **T Rating (35%)**: Average Rating on T side.
- **Side Balance (15%)**: Penalty for high disparity between T and CT performance (1 - |T_Rating - CT_Rating|).
- **Entry Rate T (15%)**: Frequency of attempting entry kills on T side.

## 5. UTIL (Utility)
*Focus: Strategic use of grenades.*

**Features & Weights:**
- **Util Usage Rate (25%)**: Frequency of buying/using utility items.
- **Flash Assists (20%)**: Average flash assists per match.
- **Util Damage (20%)**: Average grenade damage per match.
- **Flash Blind Time (15%)**: Average enemy blind time per match.
- **Flash Efficiency (20%)**: Enemies blinded per flash thrown.

## 6. STA (Stability)
*Focus: Consistency and mental resilience.*

**Features & Weights:**
- **Rating Consistency (30%)**: Inverse of Rating Standard Deviation (Lower variance = Higher score).
- **Fatigue Resistance (20%)**: Performance drop-off in later matches of the day (vs first 3 matches).
- **Win/Loss Gap (30%)**: Difference in Rating between Won and Lost matches (Smaller gap = More stable).
- **Time/Rating Correlation (20%)**: Ability to maintain rating in long matches.

---

## Calculation Process (ETL)
1. **L2 Aggregation**: Raw match data is aggregated into `fact_match_players` (L2).
2. **Feature Extraction**: Complex features (e.g., Pistol KD, Side Rating) are calculated per player.
3. **Normalization**: Each feature is scaled to 0-100 based on population distribution.
4. **Weighted Sum**: Dimension scores are calculated using the weights above.
5. **Radar Chart**: Final scores are displayed on the 6-axis radar chart in the player profile.
