Introduction

SpergSort highly-opinionated implementation of adaptive sorting using the Bradley-Terry model for paired comparisons with the goal of generating the most informative ranking of ไนƒๆœจๅ‚๏ผ”๏ผ– members. Based on Gwernโ€™s research on statistical pairwise ranking and sorting of items, it provides a statistically robust way to rank idols through pairwise comparisons.

Mathematical Foundation

Bradley-Terry Model

At its core, SpergSort uses the Bradley-Terry model which posits that each item i has a latent โ€œstrengthโ€ parameter $\beta_i$, and the probability of item i being preferred over item j is:

\[P(i \text{ beats } j) = \frac{\exp(\beta_i)}{\exp(\beta_i) + \exp(\beta_j)}\]

Adaptive Selection

Rather than using a fixed comparison sort algorithm, SpergSort employs an adaptive strategy that prioritizes comparisons that would be most informative. For each potential comparison between items i and j, we calculate a score:

\[\text{score}_{ij} = c_{ij} - \frac{|\beta_i - \beta_j|}{1000} + p_{ij}(t)\]

Where:

  • $c_{ij}$ is the number of previous comparisons between i and j
  • $\beta_i - \beta_j$ represents uncertainty (larger differences suggest more certain ordering)
  • $p_{ij}(t)$ is a time penalty that decreases as time passes since the last comparison

Confidence Level

The confidence in our sorting is determined by two factors:

  1. Average comparisons per item ($\bar{c}$)
  2. Standard deviation of scores ($\sigma$)

For n items, we target: \(\bar{c} = \lceil n \log_2(n) \cdot 0.3 \rceil \text{ comparisons}\) \(\sigma_{target} = 100\sqrt{\frac{n}{10}} \text{ score spread}\)

<90 IQ Section: Sorting with Fruits ๐ŸŽ๐ŸŒ๐ŸŠ

Imagine you have a basket of different fruits and you want to rank them by how much you like them. But hereโ€™s the catch - you can only compare two fruits at a time!

How It Works (Simple Version)

  1. The app shows you two fruits
  2. You pick which one you like better
  3. The app remembers your choice
  4. It keeps showing you different pairs
  5. Eventually, it figures out your complete ranking!

For example:

  • Round 1: ๐ŸŽ vs ๐ŸŒ (you pick ๐ŸŽ)
  • Round 2: ๐ŸŠ vs ๐ŸŽ (you pick ๐ŸŠ)
  • Round 3: ๐ŸŠ vs ๐ŸŒ (you pick ๐ŸŠ)

Final ranking:

  1. ๐ŸŠ Orange (best)
  2. ๐ŸŽ Apple (second)
  3. ๐ŸŒ Banana (third)

Use cases

Entertainment Content Ranking

  • Example: Tom Scottโ€™s โ€œWhat Is The Best Thing?โ€ project where he used pairwise comparison to rank 7,188 items with 1.2 million votes to determine the best things in the world
  • Perfect for ranking subjective content like media, songs, or fan preferences

Product Feature Prioritization

  • Example: Labsterโ€™s UX Research team used pairwise comparison to test assumptions about customer feature requests
  • Helped identify that what the sales team thought was a top priority actually didnโ€™t make the top 10 customer needs

Competitive Gaming Rankings

  • Example: Chess.comโ€™s player rating system using Glicko 2
  • Each game serves as a pairwise comparison between players
  • Players start at 1500 points and move up/down based on performance