X Algorithm Playbook

Logo

The definitive guide to maximizing your reach on X (Twitter), based on reverse-engineering the open-source algorithm.

View the Project on GitHub tang-vu/x-algorithm-playbook

The 10 Golden Rules of X Algorithm

These are the most important rules distilled from the X algorithm source code. Master these and you’ll outperform 95% of accounts.


Rule 1: Replies Are King 👑

Why: Reply probability has the highest positive weight (~2×) in the scoring formula.

Do:

Don’t:

Algorithm source: weighted_scorer.rs - REPLY_WEIGHT


Rule 2: Avoid Negative Actions At All Costs ⚠️

Why: Negative actions have MASSIVE penalties:

Do:

Don’t:

Algorithm source: weighted_scorer.rs - BLOCK_AUTHOR_WEIGHT, REPORT_WEIGHT


Rule 3: Space Your Posts (Author Diversity Penalty) ⏰

Why: The algorithm applies exponential decay to multiple posts from the same author:

Do:

Don’t:

Algorithm source: author_diversity_scorer.rs


Rule 4: In-Network First 🏠

Why: Out-of-network content is multiplied by OON_WEIGHT_FACTOR (less than 1.0). Your followers see you first.

Do:

Don’t:

Algorithm source: oon_scorer.rs


Rule 5: Video > Image > Text (With Caveats) 🎬

Why: Video Quality View (VQV) gets its own weight bonus, BUT only if video exceeds minimum duration threshold.

Do:

Don’t:

Algorithm source: weighted_scorer.rs - VQV_WEIGHT, MIN_VIDEO_DURATION_MS


Rule 6: Dwell Time Is a Signal ⏱️

Why: The algorithm tracks both binary dwell (did they stop?) and continuous dwell time (how long?).

Do:

Don’t:

Algorithm source: phoenix_scorer.rs - DWELL_WEIGHT, CONT_DWELL_TIME_WEIGHT


Rule 7: Don’t Get Filtered 🚫

Why: 12 different filters can COMPLETELY HIDE your content before scoring even happens.

Filters that can block you:

  1. Age filter (too old)
  2. Duplicate filter
  3. Self-tweet filter
  4. Muted keyword filter
  5. Blocked/muted author filter
  6. Spam filter (VF)
  7. Previously seen filter
  8. Subscription eligibility filter

Do:

Don’t:

Algorithm source: home-mixer/filters/


Rule 8: Engage Authentically 🤝

Why: The algorithm uses your engagement history to build your “user embedding.” If you engage in your niche, you’ll be matched with similar content creators and audiences.

Do:

Don’t:

Algorithm source: phoenix/recsys_retrieval_model.py - Two-Tower model


Rule 9: Niche Down for Retrieval 🎯

Why: The Two-Tower retrieval system matches user embeddings to content embeddings via dot product similarity. Clear, consistent topics = stronger embedding signal.

Do:

Don’t:

Algorithm source: phoenix/recsys_retrieval_model.py


Rule 10: Quality > Quantity 📊

Why: All the rules above compound. One viral post beats 10 mediocre ones because:

Do:

Don’t:


Quick Reference Card

Rule Key Metric Action
1 Replies Ask questions
2 Blocks/Reports Stay authentic
3 Post frequency 3-4 hr spacing
4 Follower quality Build genuine following
5 Media type Native video > 10s
6 Dwell time Longer content
7 Filters Avoid spam patterns
8 Engagement Interact in niche
9 Topic focus Niche down
10 Quality Fewer, better posts

Next: Understanding the Scoring System →