How Yarrow works
Yarrow generates six coin-cast lines in the browser, calculates a Liuyao chart using fixed rules, and may use AI to explain that chart. A repeatable calculation is not evidence that a reading predicts events.
Content updated: 27 October 2026
1. Random casting is separate from chart calculation
The standard six-toss ritual and the instant-cast flow use the browser Web Crypto API: crypto.getRandomValues fills three bytes for each line. Each byte’s odd/even value selects a back/front coin face. This is software-generated cryptographic randomness, not physical coins, a yarrow-stalk procedure, or an AI choice.
In this implementation, 0, 1, 2, or 3 backs map to old yang (9), young yin (8), young yang (7), or old yin (6). Under the fair independent-bit model their probabilities are 1/8, 3/8, 3/8, and 1/8. We record six lines from bottom (line 1) to top (line 6). A new random cast need not reproduce a previous cast.
2. What the deterministic engine actually calculates
Given the same six line types and the same calendar context, buildChart calculates the primary and changed hexagrams, upper and lower trigrams, moving lines, palace, and self/other (shi/ying) positions. Old yin changes to yang and old yang changes to yin; young lines stay unchanged.
The implementation uses Jing Fang-style eight-palace and Najia branch tables. A line’s element comes from its assigned Earthly Branch. The five relationship categories traditionally called the Six Relatives are calculated against the primary hexagram’s palace element—not against an AI-selected useful line. Changed-line relatives keep that same primary-palace reference. The day stem assigns the Six Spirits; the day stem/branch pair supplies the two xunkong branches.
The calendar layer uses lunar-javascript: Solar.fromDate, getDayGan, getDayZhi, and getMonthZhi. The live cast endpoint currently passes the server’s current Date, with no user-selected timezone parameter. The library reads local calendar fields in that runtime. Near day or solar-term boundaries, timezone and calendar convention can matter; we do not claim identical charts across all timezone settings. The synthetic examples explicitly freeze the timestamp and Asia/Shanghai environment.
3. What AI does—and does not do
The cast endpoint stores the calculated chart before any AI explanation; the initial summary and analysis fields are empty. Where available, AI turns the chart and question context into readable explanations and reflection prompts. It does not select the six coin outcomes or replace the chart tables.
AI output can be mistaken, overconfident, or inconsistent. A technical chart label does not prove a relationship outcome, diagnosis, investment return, or deadline. We do not claim scientific validation of predictive accuracy, clinical effectiveness, or professional certification for this service. Deterministic arithmetic and persuasive wording are not validation of a forecast.
4. How to inspect a reading responsibly
Keep the question, the six bottom-to-top line types, the timestamp, and the calendar timezone. Check the primary/changed hexagrams and moving lines before interpreting symbolic roles. Distinguish those calculated facts from a suggested narrative; another interpreter may tell a different story from the same chart.
Use a reading as optional cultural or reflective material, alongside observable facts. Do not use it to delay healthcare, choose investments, resolve legal matters, or infer another person’s private intentions as fact. For serious decisions, seek qualified advice and direct evidence. The examples below are teaching fixtures, not customer testimonials or successful predictions.
Methodology FAQ
Can I reproduce a Yarrow chart?
Yes, with the same six line types and calendar context. Preserve timezone and date conventions as well as the timestamp. Random recasting and AI wording are not expected to repeat.
Does AI choose my hexagram?
No. The browser generates the coin outcomes, and a rule-based engine calculates the chart. AI may explain the result afterward.
Is repeatability proof that divination works?
No. It verifies a calculation, not the truth or predictive accuracy of its interpretation. Yarrow makes no guarantee of future outcomes.
Implementation and references
This page describes the current product implementation, not every Liuyao school. The implementation review covered the casting components, cast API, chart engine, and constants on 27 October 2026. External references document APIs and the calendar library; they are not evidence of divinatory effectiveness.