Meigen Oracle — How the Selection Algorithm Works

After you answer the three questions, what happens behind the scenes to choose your "quote, today's words, and gentle ritual"?
We explain how egogram analysis works and how the daily "fluctuation" is designed, faithfully to the implementation.

Contents

The overall flow (three steps)

When you tap "Start" and answer the three questions, the following processes run internally, in this order.

STEP 1
Update the map of your mind
Nudge the five-factor scores slightly based on your three answers (exponential moving average).
STEP 2
Choose a quote
Probabilistically draw one quote that is close to your updated state of mind.
STEP 3
Add words
From the quote's theme × your factors, choose the words and a small ritual.

Egogram analysis builds the "map of your mind" in STEP 1, and that map then guides both STEP 2 and STEP 3.
In other words, the egogram is the foundation of the entire process.

What the egogram five factors are

This app uses its own five factors, inspired by transactional analysis, to express "the current tilt of your mind." Each factor ranges from 0〜100, all starting from the balanced midpoint of 50.

SymbolNameMeaning
CPPrincipleStrictness, ideals, sense of responsibility (how I want to be)
NPAcceptanceKindness, compassion, the power to embrace
AAnalysisLogic, observation, reality testing
FCCuriosityFreedom, fun, inspiration
ACHarmonyAdaptation, consideration, forbearance

The two options in each question are each assigned changes (deltas) to the five factors. "Which one you choose" gradually draws the map of your mind.

① Answers → updating the map of your mind (EMA)

We combine your three answers into one and update the profile with an exponential moving average (EMA). Rather than changing abruptly, this method smoothly reflects your "recent tendency" while carrying the past forward.

today's delta  todayDelta[f] = sum of the changes to factor f across the 3 questions (theoretically −6〜+6)
today's score  todayScore[f] = clamp( 50 + (50/6) × todayDelta[f] , 0, 100 )
update       profile[f] = clamp( α × todayScore[f] + (1−α) × previous profile[f] , 0, 100 )
            α (smoothing coefficient) = 0.15

What this formula means

Concrete example: when Curiosity (FC) moves by the maximum +6 in today's three questions
todayScore_FC = 50 + (50/6)×6 = 100
new FC = 0.15×100 + 0.85×50 = 57.5 (moving gently forward by just 7.5, from 50 → 57.5)
If FC isn't touched the next day: new FC = 0.15×50 + 0.85×57.5 = 56.4 … gradually drifting back toward 50.

This "map of your mind (the profile)" is the sole input that drives the next STEP 2 and STEP 3. This is the core of egogram analysis.

② Choosing a quote (cosine similarity × sampling)

Each quote carries an affinity for the five factors (e.g., a quote might be {CP:0.7, A:0.5, FC:0.3}). We match this against the "direction of the tilt" in the map of your mind.

1. Directional agreement (cosine similarity)

We subtract 50 from the profile to make it a vector of "which way it leans from the center," then measure the cosine similarity (closeness of direction, −1〜+1) with the quote's affinity vector. The key is that we look at direction, not magnitude, so quotes that resonate with "the direction your mind is currently facing" score highly.

2. Cooldown (avoiding repeats)

3. One quote drawn by probability from the top 8 (softmax sampling)

We take the top 8 quotes by score and draw one by softmax (temperature 0.15) weights. Rather than fixing on the single closest quote, closer ones are more likely to appear but never guaranteed — a probabilistic draw that preserves a "sense of fate." When the map of your mind is perfectly uniform, it falls back to a uniform draw.

In short: the closer a quote's direction is to your current tilt of mind, the more likely it is to appear. But recently seen ones are avoided, and the draw is made from among the top candidates.

4. Quote fluctuation — the shadow card (about two days a week)

When the hash determined by the date satisfies hash("quote-shadow|date") % 7 < 2 (about 2/7, roughly two days a week), we choose the quote using a "shadow profile." The shadow profile mirrors each factor around the midpoint of 50 (mirror[f] = 100 − profile[f]), so the elements that are currently low — the ones that usually stay out of sight — are treated as the high ones.

As a result, a quote that resonates deeply from an unusual angle arrives as your "card of fate." For example, on a certain day a quote that speaks to Harmony (AC) or Analysis (A) may quietly appear for someone whose Curiosity (FC) is high, offering insight, a gentle caution, or something to round out the missing parts. The cooldown and the softmax sampling from the top 8 still apply, so it remains a carefully chosen single quote rather than noise. The spoken words (today's words) stay in your usual voice, so you can receive the fluctuating quote gently.

This series is determined by a date hash that is independent of the "voice fluctuation," so the two do not necessarily fall on the same day.

About the quote commentary

A quote's commentary (the "Read commentary" text) is fixed text bound to that quote. It is not chosen by an algorithm; it is attached to the chosen quote from the start. Therefore, whenever a given quote appears, the same commentary is always shown (one commentary per quote).

③ Choosing today's words and the gentle ritual

These two are chosen from a grid of "the quote's theme" × "your factors." The text lives in bundles (buckets) prepared for each factor.

Themes (10 kinds): Continuity / Challenge / Acceptance / Self-trust / Rest / Learning / Gratitude / Courage / Now / Dreams
Today's words: 6 lines per bucket (360 total)
Gentle ritual: 5 lines per bucket (300 total)

1. How the theme is decided

From the themes (one to several) that the chosen quote carries, we pick one.

2. Which factor's "voice" speaks to you

We sort the factors by score (ties are stabilized by today's delta → a fixed order), and as a rule we speak in the voice of the top factor (the dominant factor). This is where the "fluctuation" described below comes in.

3. One line from the bucket (with recent-repeat avoidance)

From within the relevant bucket, we choose one line at random, excluding recently shown lines (up to 10 remembered). Only when excluding them leaves no candidates do we allow a repeat. An empty bucket falls back to the shared text (_default).

The design and frequency of "fluctuation"

To prevent "it's boring because it's always the same," we keep the axis (your tendency) intact while layering several levels of fluctuation.

Fluctuation 0Quote shadow card — about two days in seven

About 2/7 (roughly two days a week), we choose a quote that resonates with your currently low factors using the "shadow profile." From elements unlike your usual, the card of fate offers a strong suggestion (for details, see "4. Quote fluctuation" in STEP 2). The date hash is independent of the voice fluctuation.

Fluctuation 1Voice-factor fluctuation — about two days in seven

When the hash determined by the date satisfies hash("voice|date") % 7 < 2, we speak in the voice of the second-ranked factor instead of the first. The probability is 2/7 (about 28.6%, roughly two days a week). Words for "your usual self" and words for "another self" arrive in turn. The remaining five days or so use the voice of the dominant factor.

Fluctuation 2Recent-repeat avoidance — keeping the same line from recurring soon

Today's words and the gentle ritual each remember the last 10 and exclude them from the candidates. Quotes exclude the last 14 days. Because you won't run into the same words again right away, each morning stays fresh (a repeat is allowed only when candidates run out).

Fluctuation 3Probabilistic draw — not fixed to a single outcome even under the same conditions

Quotes use a softmax draw from the top 8; today's words and the gentle ritual use a random draw within the bucket. Because results vary even under identical conditions, it never becomes a mechanical repetition.

On top of these, the profile itself shifts a little each day in STEP 1, so the dominant factor, the theme, and the quotes you resonate with drift gently over time. Fluctuation exists to "keep things from getting stale," and its frequency is designed to be modest so you don't lose sight of your tendency (the axis).

The same day, the same fate — on determinism

Key figures at a glance

ItemValueMeaning
Factor range / initial value0〜100 / 50The deviation from the midpoint expresses the "tilt"
EMA smoothing coefficient α0.15The share by which a single day's answers affect the result (the remaining 85% is the past)
Delta scale50 / 6Today's delta of ±6 saturates 0〜100
Quote cooldown14 daysThe window for avoiding recently shown quotes
Quote top tier N8 quotesThe number of top quotes kept eligible for the draw
Softmax temperature0.15The smaller it is, the more it concentrates on high scores (strength of the sense of fate)
Quote shadow card frequency2 / 7 (about 29%)The share of days that choose a quote resonating with currently low factors
Voice fluctuation frequency2 / 7 (about 29%)The share of days spoken in the second-ranked factor's voice (independent of the shadow card)
Today's words / gentle ritual recent-repeat avoidance10 eachThe number remembered to keep the same line from recurring
Library sizequotes 351 / today's words 360 / gentle ritual 300Multiple lines per bucket, cycling daily

This document is based on the app's implementation (OracleEngine's ProfileEngine, QuoteSelector, and AdviceSelector, along with DailyDrawService). The figures and rules may change with future adjustments.