Show HN: I turned X's ranking algorithm into a game video

lime661 pts0 comments

Every ranking weight in X's algorithm, animated

Every ranking weight in X's algorithm, animated

X open-sourced the code that ranks the For You timeline. The weights below are<br>transcribed from home-mixer/params/param.rs, pinned to commit<br>a389166. Every row links to the<br>line it came from.

57s, sound on. The ledger on the right builds as the post collects each weight.

The weights

Ordered largest to smallest. 6 of the<br>28 ship configured to 0.0 and contribute nothing; they are kept<br>here so the list is complete rather than flattering.

actionweightparamparam.rs

copy link<br>+20.0<br>ShareViaCopyLinkWeight<br>:326

mutual reply boost<br>+15.0<br>BidirectionalFollowReplyWeightBoost<br>:285

reply<br>+5.0<br>ReplyWeight<br>:283

share via DM<br>+5.0<br>ShareViaDmWeight<br>:320

quote<br>+5.0<br>QuoteWeight<br>:332

follow author<br>+4.0<br>FollowAuthorWeight<br>:346

share<br>+2.0<br>ShareWeight<br>:318

repost<br>+1.0<br>RetweetWeight<br>:296

like<br>+0.5<br>FavoriteWeight<br>:282

click<br>+0.4<br>ClickWeight<br>:309

open link<br>+0.2<br>OpenLinkWeight<br>:310

photo expand<br>+0.05<br>PhotoExpandWeight<br>:298

video open<br>+0.05<br>VideoOpenWeight<br>:304

quoted click<br>+0.05<br>QuotedClickWeight<br>:334

video quality view<br>+0.05<br>VqvWeight<br>:317

unexplored<br>+0.02<br>PostUnexploredWeight<br>:352

dwell time<br>+0.004<br>ContDwellTimeWeight<br>:376

profile click<br>+0.0<br>ProfileClickWeight<br>:312

quoted video quality viewnot in the film<br>+0.0<br>QuotedVqvWeight<br>:340

dwellnot in the film<br>+0.0<br>DwellWeight<br>:331

click dwell timenot in the film<br>+0.0<br>ContClickDwellTimeWeight<br>:382

mutual dwell boostnot in the film<br>+0.0<br>BidirectionalFollowDwellWeightBoost<br>:291

active secondsnot in the film<br>+0.0<br>ContActiveSecs5mResidualNormWeight<br>:418

not dwelled<br>-0.02<br>NotDwelledWeight<br>:444

block author<br>-31.2<br>BlockAuthorWeight<br>:431

not interested<br>-43.2<br>NotInterestedWeight<br>:425

mute author<br>-58.8<br>MuteAuthorWeight<br>:437

report<br>-234.0<br>ReportWeight<br>:442

How this was checked

The film and this page read from one table. A script re-reads<br>param.rs and fails if any value, any numeric literal, or any line number<br>disagrees with it, so a number cannot drift here without the build breaking.

Public write-ups of this algorithm still quote the 2023 heavy-ranker<br>weights. Those are three years stale. Check any claim, including this one, against the<br>file rather than against a thread.

What this does not tell you

A weight is not a score. The ranker computes<br>&Sigma; (weight &times; P(action)) per viewer, where each probability comes from<br>a model given that viewer's history. The same post therefore has a different score for<br>every person who sees it — there is no single number for a post, and this page does<br>not claim to produce one.

Some weights are conditional in ways the list cannot show. VqvWeight only<br>applies when a video runs past ten seconds and the viewer has fewer than 10,000 followers.<br>PostUnexploredWeight only applies to posts from accounts you already follow.<br>BidirectionalFollowReplyWeightBoost only applies to original posts — not<br>replies, not reposts — from accounts you mutually follow.

Two labels use X's product vocabulary rather than the identifier: like is<br>FavoriteWeight and repost is RetweetWeight. The code kept<br>the old names after the product renamed them.

The candidate-pool figure shown in the film is illustrative. It is not a constant in the<br>repository, unlike every weight above.

film weight from video algorithm weights

Related Articles