Planetary Resonance as a Feed Algorithm: A Technical Exposition
2026-02-24
Abstract
This paper presents a formal description of QQuill's Planetary Resonance Feed Algorithm—a content-ranking system that uses real-time astronomical ephemeris data to deterministically order a user's personal knowledge entries. Unlike conventional feed algorithms that rely on engagement metrics, collaborative filtering, or semantic similarity, this system computes a resonance index between the current positions of celestial bodies and the astronomical snapshot captured at each content item's moment of creation. The algorithm maps planetary ecliptic longitudes onto a 64-position circular manifold (derived from the I Ching hexagram sequence), computes iterative angular reflections via a circular billiard model, and produces a weighted aggregate score that naturally shifts over time as planets traverse their orbits. We describe the mathematical foundations, the implementation architecture, and the emergent temporal properties of this approach. QQuill also features conventional feed algorithms—recency, popularity, engagement frequency, and randomized shuffle—as well as planned semantic and vector-search-based ranking. The planetary resonance algorithm represents a novel, orthogonal axis of content ordering: one grounded in astronomy rather than meaning.
1. Introduction
The fundamental challenge in any personal knowledge management system is retrieval: not merely finding what you know exists, but resurfacing what you have forgotten at the right time. Traditional approaches to this problem fall along a well-studied spectrum:
- Recency-based feeds prioritize the newest content, ensuring temporal relevance at the cost of burying older material.
- Engagement-based ranking (votes, likes, time-spent) amplifies what the user or community has already validated, creating a feedback loop.
- Semantic similarity (via embeddings, TF-IDF, or vector search) surfaces content that is topically proximate to a query or context.
- Randomized (shuffle) feeds inject serendipity but offer no structural guarantee of relevance.
Each of these is a function of meaning—of what the content says, how the user interacted with it, or what the user is currently thinking about.
QQuill implements all of these modes. But it also introduces a fundamentally different approach: ranking content by astronomical resonance—a scoring function derived entirely from the positions of celestial bodies at the moment of content creation versus the present moment.

This algorithm assigns no semantic weight to any content. It performs no natural language processing. It does not analyze what the user wrote. Instead, it treats each content item as a point in an astronomical phase space, and ranks items by their harmonic proximity to the current celestial configuration.
The result is a feed that is:
- Deterministic at any given moment (the same planetary configuration yields the same ranking),
- Continuously shifting as planets move (the feed naturally evolves hour by hour),
- Non-random in a way that produces cyclical resurfacing patterns aligned with actual orbital periods.
This paper provides a complete formal description of the algorithm as implemented.
2. Notation and Preliminaries
Let $\mathcal{P} = {p_1, p_2, \ldots, p_N}$ denote the set of $N$ celestial bodies tracked by the system. In the current implementation, $N = 12$ and:
$\mathcal{P} = {\text{Sun}, \text{Moon}, \text{Mercury}, \text{Venus}, \text{Mars}, \text{Jupiter}, \text{Saturn}, \text{Uranus}, \text{Neptune}, \text{Pluto}, \text{Chiron}, \text{Sirius}}$
Each body $p$ has an ecliptic longitude $\lambda_p(t) \in [0, 2\pi)$ at time $t$, computed via the Moshier ephemeris algorithm. Let $\mathcal{T} = {T_1, T_2, \ldots, T_M}$ be the set of $M$ content items (called Things in QQuill). Each Thing $T_k$ was created at time $t_k$ and carries a stored ephemeris snapshot:
$\mathbf{E}(T_k) = {\lambda_p(t_k) \mid p \in \mathcal{P}}$
The algorithm computes a scalar resonance score $R(T_k, t_{\text{now}})$ for each Thing with respect to the current time, and ranks Things by descending score.
3. The Hexagram Wheel: A Discrete Circular Manifold
3.1 From Ecliptic Longitude to Wheel Position
Rather than operating directly on continuous angular coordinates, the algorithm maps each planetary longitude onto a 64-position discrete wheel derived from the I Ching hexagram sequence as arranged in the Human Design / Gene Keys tradition.

The mapping proceeds in two stages. First, the raw ecliptic longitude $\lambda$ is converted to a wheel bin $\beta \in [0, 64)$ via an offset correction:
$\beta(\lambda) = \left(\frac{\lambda + 2\delta_{\text{line}} - \delta_{\text{color}} - 2\delta_{\text{tone}}}{2\pi} \cdot 64\right) \bmod 64$
where the offset constants are derived from the wheel's hierarchical subdivisions:
$\delta_{\text{hex}} = \frac{\pi}{64}, \quad \delta_{\text{line}} = \frac{\delta_{\text{hex}}}{6}, \quad \delta_{\text{color}} = \frac{\delta_{\text{line}}}{6}, \quad \delta_{\text{tone}} = \frac{\delta_{\text{color}}}{6}$
A small empirical correction $\epsilon = 0.015$ rad is added to $\lambda$ prior to this computation.
3.2 Hexagram, Line, Color, and Tone
The wheel bin $\beta$ is then resolved into a four-level hierarchical address via the fixed permutation $\sigma: {0,\ldots,63} \to {1,\ldots,64}$ that encodes the I Ching wheel ordering:
$h = \sigma!\left(\lfloor \beta \rfloor\right)$
where $h$ is the hexagram number. The fractional part $\beta - \lfloor\beta\rfloor$ is further subdivided:
$\ell = \left\lfloor \frac{f}{1/6} \right\rfloor + 1, \quad c = \left\lfloor \frac{f_\ell}{1/6} \right\rfloor + 1, \quad \tau = \left\lfloor \frac{f_c}{1/6} \right\rfloor + 1$
where $f$ is the fractional part, $f_\ell$ is the fractional part within the line, and $f_c$ is the fractional part within the color. This yields a 4-tuple $(h, \ell, c, \tau)$ with:
- Hexagram $h \in {1, \ldots, 64}$: one of 64 I Ching hexagrams
- Line $\ell \in {1, \ldots, 6}$: one of 6 lines within the hexagram
- Color $c \in {1, \ldots, 6}$: sub-line division
- Tone $\tau \in {1, \ldots, 6}$: sub-color division
The total resolution is $64 \times 6 \times 6 \times 6 = 13{,}824$ distinct positions on the wheel, mapping the full $2\pi$ ecliptic.
3.3 Inverse Mapping
The inverse function $\beta^{-1}(h, \ell, c, \tau) \to \lambda$ reconstructs the ecliptic longitude from a hexagram address. This is used to convert hexagram-space computations back to angular coordinates for the billiard model.
4. The Changing Hexagram: Line-Flip Mutation
A central operation in the algorithm is the computation of the changing hexagram. Each I Ching hexagram is represented as a 6-bit binary string $b = b_1 b_2 b_3 b_4 b_5 b_6$ where each $b_i \in {0, 1}$ encodes a yin or yang line.

Given hexagram $h$ at line $\ell$, the changing hexagram $h'$ is produced by flipping bit $\ell$:
$b'_i = \begin{cases} 1 - b_i & \text{if } i = \ell \ b_i & \text{otherwise} \end{cases}$
The new binary string $b'$ is then looked up to recover $h'$. This operation maps the hexagram to a related but distinct position on the wheel, and the pair $(h, \ell) \to (h', \ell)$ defines the two seed points for the circular billiard.
5. Inner Reflections: The Circular Billiard Model
5.1 The Billiard Metaphor
Consider two points $\theta_1$ and $\theta_2$ on a unit circle, representing the angular positions derived from the original hexagram and its changing hexagram respectively. A circular billiard is a dynamical system where a ray of light bounces between the interior walls of a circular table. Here, we use an analogous discrete process:
Given the current reflection point $\theta_{n}$ and the previous point $\theta_{n-1}$, the next reflection is computed by the chord-continuation rule:
$\theta_{n+1} = (2\theta_n - \theta_{n-1}) \bmod 2\pi$

This is equivalent to reflecting $\theta_{n-1}$ through $\theta_n$ on the circle. The sequence ${\theta_1, \theta_2, \theta_3, \ldots}$ is called the inner reflections of the seed pair.
5.2 Convergence
The iteration terminates when the sequence returns sufficiently close to the starting point:
$|\theta_1 - \theta_n| < \varepsilon_{\text{min}}, \quad n > 2$
with $\varepsilon_{\text{min}} = \pi/32$ (half a hexagram width) and a hard maximum of 120 iterations as a safety bound.
5.3 Projection to Hexagram Space
Each angular position in the reflection sequence is mapped back through the wheel-bin function to recover a sequence of hexagram numbers:
$\mathbf{H}_p = [h_1, h_2, h_3, \ldots, h_K]$
where $K$ is the length of the reflection sequence. This array $\mathbf{H}_p$ is computed once per planet $p$ at each evaluation time and represents the set of hexagrams that are harmonically activated by planet $p
#x27;s current position.6. The Resonance Index
6.1 Single-Planet Resonance
Given the inner reflections array $\mathbf{H}_p$ for planet $p$ and a target hexagram number $h_T$ (from a stored Thing's ephemeris), the resonance index is defined as:
$\rho(h_T, \mathbf{H}_p) = \begin{cases} \frac{1}{i + 1} & \text{if } h_T = \mathbf{H}_p[i] \text{ for the first occurrence at index } i \ 0 & \text{if } h_T \notin \mathbf{H}_p \end{cases}$
with the special case that if $h_T$ appears at index 1 (the second position, i.e., the changing hexagram itself), the index is clamped to $i = 0.5$:
$\rho = \frac{1}{0.5 + 1} = \frac{2}{3} \approx 0.667$

The function $\rho$ has a natural interpretation: hexagrams visited early in the reflection sequence are harmonically close to the planet's current position and receive high scores. The first hexagram (the planet's own position) yields $\rho = 1$. The decay is harmonic: $1, \frac{1}{2}, \frac{1}{3}, \frac{1}{4}, \ldots$
6.2 Per-Planet Weighting
Not all celestial bodies contribute equally. The system assigns a weight $w_p$ to each body:
| Body | $w_p$ | Rationale |
|---|---|---|
| Sun | 0.20 | Slow-moving, broad temporal window |
| Moon | 0.20 | Fast-moving, high-frequency modulation |
| Mercury | 0.70 | Inner planet, rapid cycle |
| Venus | 0.70 | Inner planet, ~225-day cycle |
| Mars | 0.70 | Inner planet, ~687-day cycle |
| Jupiter | 0.70 | Outer-inner boundary, ~12-year cycle |
| Saturn | 0.70 | Outer-inner boundary, ~29-year cycle |
| Uranus | 0.01 | Very slow, negligible short-term effect |
| Neptune | 0.01 | Very slow, negligible short-term effect |
| Pluto | 0.01 | Very slow, negligible short-term effect |
| Chiron | 0.01 | Very slow |
| Sirius | 0.01 | Fixed star, near-static |
The weighting scheme deliberately emphasizes the inner planets (Mercury through Saturn), which have orbital periods ranging from 88 days to 29 years. These are the bodies whose motion creates perceptible day-to-day and week-to-week variation in the feed.
7. Aggregate Resonance Score
7.1 The Weighted Mean
For a single ephemeris snapshot $\mathbf{E}$ (either from a Thing or one of its sub-elements), the aggregate resonance is:
$R(\mathbf{E}, t_{\text{now}}) = \frac{1}{N} \sum_{p \in \mathcal{P}} w_p \cdot \rho!\left(h_p^{(\mathbf{E})},; \mathbf{H}p(t{\text{now}})\right)$
where $h_p^{(\mathbf{E})}$ is the hexagram number stored in $\mathbf{E}$ for planet $p$, and $\mathbf{H}p(t{\text{now}})$ is the inner reflections array computed from the current ephemeris.

7.2 Max-Score Selection Across Sub-Elements
In QQuill, a Thing can contain multiple sub-elements (sub-entries), each with its own ephemeris snapshot and elemental type. The resonance score for a Thing $T_k$ on a feed filtered to element $e$ is:
$R^*(T_k, t_{\text{now}}, e) = \max!\left(\mathbb{1}[e_T = e] \cdot R(\mathbf{E}T, t{\text{now}}),;; \max_{s \in \mathcal{S}(T_k)} \mathbb{1}[e_s = e] \cdot R(\mathbf{E}s, t{\text{now}})\right)$
where $\mathcal{S}(T_k)$ is the set of sub-elements of $T_k$, $e_T$ and $e_s$ are the elemental types of the Thing and sub-element respectively, and $\mathbb{1}[\cdot]$ is the indicator function.
In plain language: only items matching the feed's elemental context contribute, and the highest-scoring layer (parent Thing or any sub-element) determines the final resonance.
7.3 Final Ranking
The feed is then sorted by descending $R^*$:
$\text{Feed}(t_{\text{now}}, e) = \text{argsort}{T_k \in \mathcal{T}} \left[-R^*(T_k, t{\text{now}}, e)\right]$
8. Temporal Dynamics and Emergent Properties
8.1 Why the Feed Shifts Over Time
The key insight of this algorithm is that the ranking is a function of planetary positions, which change continuously:
- The Moon completes an orbit in ~27.3 days and moves through all 64 hexagrams in that period—roughly one hexagram every 10.2 hours. This creates high-frequency modulation.
- Mercury completes its orbit in ~88 days, producing weekly-scale shifts in which content resurfaces.
- Venus (~225 days) and Mars (~687 days) create monthly and seasonal rhythms.
- Jupiter (~12 years) and Saturn (~29 years) contribute deep, slow-moving resonance patterns.

Because the inner reflections depend on the exact position of each planet (down to the hexagram line, color, and tone), the feed is sensitive to hour-level changes. The Moon's rapid transit ensures that no two consecutive days produce an identical ordering.
8.2 Cyclical Resurfacing
A content item created $n$ days ago will tend to resurface when a planet returns to a position that is harmonically related to its creation-time position. This produces natural resurfacing at characteristic intervals:
- ~7 days: Mercury moves ~29° per week, approximately 5 hexagrams. Items from a week ago become harmonically activated via short reflection chains.
- ~28 days: A full lunar cycle. The Moon returns to (approximately) the same hexagram.
- ~88 days: A full Mercury cycle. Items from ~3 months ago experience a full resonance return.
- ~12 months: Earth's orbit produces annual echoes through the Sun's position.
The superposition of these cycles means that on any given day, the feed may contain items from last week, last month, several months ago, and even a year ago—all surfaced not by semantic relevance but by astronomical phase alignment.
8.3 The Non-Randomness Property
Although the algorithm uses no semantic analysis, users consistently report that the feed feels relevant. This is a noteworthy empirical observation across ~200 active users. Several factors may contribute:
- Temporal coherence: Items from specific intervals (7 days, 28 days, 88 days) are surfaced, which often correspond to natural project and reflection cycles in human life.
- Deterministic structure: The feed is not random. It follows a precise mathematical rule that the user cannot predict but can trust to be consistent.
- Diversity without noise: Because multiple planetary periods are superimposed, the feed naturally mixes recent and older content without requiring the user to choose a time window.
9. The Ophiel Distribution: Cross-Elemental Injection
Before any sorting algorithm is applied, QQuill partitions content into a home bag and a guest bag via the Ophiel Distribution:
- Classify all Things by their elemental type (Air, Fire, Water, Earth, Akasha).
- For a feed filtered to element $e$, the home bag contains all Things with element $e$.
- The guest bag contains $\lfloor |H|/4 \rfloor$ randomly sampled items from each of the other four elemental bags, where $|H|$ is the home bag size.
- The guest bag is shuffle-merged into the sorted home bag, preserving the home bag's order while injecting cross-elemental items at random positions.
This ensures that each elemental feed contains primarily relevant content but also includes unexpected cross-elemental items—a controlled injection of serendipity.
10. Classical Feed Algorithms
For completeness, QQuill supports several conventional ranking modes that coexist with the planetary resonance algorithm:
| Mode | Sort Key | Description |
|---|---|---|
| Latest Activity | $\text{modified_dt}$ descending | Pure recency; most recently modified Thing appears first |
| Most Worked | Element count descending | Things with the highest count of the active element |
| Most Charged | Vote count descending | Things with the most user votes (charges) |
| Shuffle | Random permutation | Fisher–Yates shuffle for complete randomness |
| Planet Resonance | $R^*$ descending | The astronomical resonance algorithm described in this paper |
Additionally, QQuill's roadmap includes:
- Vector-search ranking based on semantic embeddings, enabling "show me things similar to X"
- Context-aware feeds that combine multiple signals (ephemeris + semantic + engagement) into a hybrid score
- Tula AI mode, a planned ML-based balanced feed optimizer
The planetary resonance algorithm occupies a unique position in this design space: it provides temporal diversity and cyclical resurfacing without any dependence on content semantics or user behavior signals.
11. Implementation Notes
11.1 Ephemeris Computation
Planetary positions are computed using the Moshier ephemeris algorithm (a high-precision analytical model), specifically via the ephemeris JavaScript library. The computation uses a fixed observer location and geocentric apparent longitude (apparentLongitudeDd), converted to radians.
11.2 Caching Strategy
The inner reflections computation is the most expensive step. The TypeScript implementation caches results at minute-level granularity:
$\text{cache_key} = \text{YYYY-MM-DD-HH-mm (UTC)}$
Since the inner reflections for a given planetary configuration remain valid for the duration of a minute, this eliminates redundant computation across multiple feed evaluations within the same minute.
11.3 Elemental Filtering and Scoping
Before resonance scoring, the candidate set is filtered by:
- Elemental context (element type matching the active feed tab)
- Time window (configurable from 1 day to all-time)
- Smart collection predicates (custom filter models including ephemeris-based conditions)
- Theme lock (optional correspondence-theme filtering)
- SQLite index candidates (coarse database pre-filtering when available)
11.4 Computational Complexity
For a feed with $M$ candidate Things and $N$ planets:
- Inner reflections: $O(N \cdot K_{\text{max}})$ where $K_{\text{max}} = 120$
- Per-Thing scoring: $O(N \cdot K_{\text{avg}})$ for linear search through each reflection array
- Total: $O(N \cdot K_{\text{max}} + M \cdot N \cdot K_{\text{avg}})$
With $N = 12$, $K_{\text{avg}} \approx 30$, and typical $M < 400$, the full computation completes in under 50ms on modern hardware.
12. Future Directions
The current implementation uses only the simplest resonance model from a richer theoretical framework. Several extensions are documented but not yet deployed:
12.1 Signed Bounce (Phase-Based Polarity)
Introducing parity-based polarity via the bounce count:
$\rho_{\text{signed}} = (-1)^n \cdot \frac{1}{n^{\alpha + 1}}$
where odd $n$ indicates constructive resonance and even $n$ indicates tension resonance. This would allow the feed to distinguish between harmonious and challenging activations.
12.2 Full $N \times N$ Resonance Matrix
Rather than comparing each planet's reflections against a single stored hexagram, a full pairwise matrix:
$\mathbf{M}{ij} = \rho(\mathbf{H}{p_i}^{\text{now}}, h_{p_j}^{(\mathbf{E})})$
would capture cross-planet interactions and enable richer aggregate metrics (row sums, column sums, spectral analysis).
12.3 I Ching Mutation Dynamics
Extending the line-flip to all six lines of each hexagram produces a 6-fold mutation space. The ratio, delta, and product models would enable ranking by transformative potential—scoring content not just by static resonance but by how the resonance landscape changes under symbolic mutation.
12.4 Performance Optimizations
Documented strategies include quantized integer arithmetic, GPU-accelerated computation via GLSL shaders, precomputed 64×6 mutation lookup tables, and migration of the core loop to a C++ TurboModule via React Native's JSI bridge.
13. Discussion
13.1 On the Absence of Meaning
It is worth emphasizing what this algorithm does not do. It does not read the user's text. It does not perform sentiment analysis. It does not know what any Thing is about. The entire ranking is produced by comparing numbers—planetary longitudes at two points in time.
And yet the feed does not feel random.
This apparent paradox has a straightforward explanation: time is a carrier of meaning. When you wrote something, what was happening in your life, what season it was, what project you were in—all of this is implicitly encoded in the timestamp. The astronomical resonance algorithm does not access this meaning directly, but by creating temporal patterns of resurfacing that align with natural planetary cycles, it produces a structurally coherent retrieval pattern.
Whether one interprets this through the lens of astronomical symbolism, Jungian synchronicity, or simple time-series periodicity, the empirical result is the same: users find the feed useful.
13.2 Philosophical Positioning
The algorithm sits at an interesting intersection:
- It is fully deterministic (given positions, the output is fixed)
- It is non-semantic (content plays no role in ranking)
- It is naturally time-varying (no refresh button needed)
- It is astronomically grounded (not astrological—no sign interpretations are used)
This last point is important. The system uses astronomy, not astrology. No zodiac sign meanings, no house systems, no aspects are interpreted. The hexagram mapping provides a discrete coordinate system; the billiard model provides a dynamical process; the resonance index provides a scoring function. The algorithm is pure computational geometry on a circle.
13.3 Empirical Observations
Over approximately two years of use by ~200 active users, the following patterns have been observed:
- Users describe the feed as "feeling like it knows what I need to see"
- Content from 7 days and 28 days ago frequently appears, aligning with natural weekly and monthly reflection rhythms
- The hourly shift in feed composition creates a sense of freshness without requiring new content
- Users report encountering "forgotten" notes at moments when they are contextually relevant—a phenomenon they describe as synchronistic
These observations are anecdotal and do not constitute formal validation. A companion simulation notebook is in preparation to analyze the statistical properties of resurfacing patterns under controlled conditions.
14. Conclusion
The Planetary Resonance Feed Algorithm demonstrates that meaningful content ranking can emerge from a system that is entirely meaning-free. By leveraging real-time astronomical data and a mathematically precise resonance computation, QQuill produces a feed that is deterministic, non-random, temporally dynamic, and—by consistent user report—subjectively relevant.
The algorithm embodies a broader design philosophy: that structure can carry information even in the absence of explicit semantics. In a landscape where every feed algorithm is optimized to capture attention, the planetary resonance approach offers something different—a feed that follows the rhythms of the sky rather than the impulses of engagement.
This paper describes the algorithm as implemented in QQuill v2.x. The source implementation is available in the QQuill application codebase. A companion Jupyter notebook providing simulation and statistical analysis of the algorithm's resurfacing properties is available in the project repository.