Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ValveSoftware/counter-strike_regional_standings/llms.txt

Use this file to discover all available pages before exploring further.

Before the ranking algorithm processes any match, the data loader applies five sequential filters that remove invalid or irrelevant data. Understanding these filters explains why some matches don’t appear in standings calculations.

Filter sequence

The filters run in the order listed below. A match must pass every filter to be included in the ranking computation.
1

Incomplete match filter

Removes any match where either team does not have exactly 5 players.
function filterIncompleteMatches(matches) {
  return matches.filter(
    match => match.team1Players.length === 5 && match.team2Players.length === 5
  );
}
This runs first so that subsequent filters never encounter malformed roster data. Matches with fewer or more than 5 players on either side are unconditionally discarded.
2

Unranked match filter

For matches played on or after January 1, 2025 (Unix timestamp 1735689600), the valveRanked field must be present and set to true.
function filterUnrankedMatches(matches) {
  return matches.filter(match => {
    if (match.matchStartTime < 1735689600)
      return true;

    if (match.valveRanked === undefined)
      return false;

    return match.valveRanked;
  });
}
Matches before that date pass through regardless of whether valveRanked is present. Matches on or after that date without valveRanked: true are excluded.
3

Time window filter

Restricts matches to a rolling 6-month window ending at the most recent match timestamp in the dataset (or a manually specified end time).
function filterMatchesByTime(matches, startTime, endTime) {
  return matches.filter(match =>
    (endTime < 0 || match.matchStartTime <= endTime)
    && (startTime < 0 || match.matchStartTime >= startTime)
  );
}
Default window: 6 months, calculated as 6 × 30 × 24 × 3600 seconds.Grace period: The scoring decay ramp starts 1 month before the window end (30 × 24 × 3600 seconds). Matches in the final month of the window are included but receive progressively less weight.Overriding the window: Call DataLoader.setTimeFilter(endTime, dataWindow) to specify a custom end timestamp and window size:
// Evaluate standings as of a specific date with a 3-month window
loader.setTimeFilter(1693330518, 3 * 30 * 24 * 3600);
Pass endTime = -1 to use the most recent match in the dataset as the window end.
4

Showmatch filter

Excludes all matches from events whose name contains the substring "showmatch" (case-insensitive).
function filterShowmatches(matches, events) {
  return matches.filter(match => {
    let eventName = events[match.eventId].name;
    if (eventName.toLowerCase().includes('showmatch'))
      return false;
    return true;
  });
}
This removes exhibition matches that are not representative of competitive performance.
5

In-progress event filter

Removes matches from events where finished is false.
function filterInProgressEvents(matches, events) {
  return matches.filter(match => {
    return events[match.eventId].finished;
  });
}
Matches from in-progress events are excluded even if each individual match is fully complete. The model requires final prize distribution data from the event before it can correctly score team performance — that data is only reliable once the event has concluded.

Time window details

The time window is computed in findTimeWindow and then passed to filterMatchesByTime:
function findTimeWindow(matches, filterEnd, dataWindow) {
  let endTime = filterEnd;
  if (endTime < 0)
    endTime = Math.max(...matches.map(match => match.matchStartTime));

  let startTime = endTime - dataWindow;
  return [startTime, endTime];
}
After the window boundaries are established, the ranking context is configured with a grace period:
const [startTime, endTime] = findTimeWindow(matches, this.filterEndTime, this.filterWindow);
let graceperiod = 30 * 24 * 3600; // 1 month
this.rankingContext.setTimeWindow(startTime, endTime - graceperiod);
The decay ramp therefore begins 1 month before the window closes. Matches in that final month are included in the dataset but carry diminishing weight as they approach the window boundary.

Build docs developers (and LLMs) love