← Back to SAGE Journal

Digitizing the Oracle: How We Coded a 2,000-Year-Old Decision System

Geomancy is inherently mathematical. Here is how we translated a 2,000-year-old analog binary system into a modern, deterministic engine.

1. The Problem: Hallucination vs. Tradition

Generative AI is remarkable at synthesizing information, but it is fundamentally non-deterministic. If you ask an LLM to cast a geomantic chart, it will often hallucinate the underlying mathematics. It might generate an incorrect sequence of dots, misunderstand the arithmetic that links the four "Mothers" to the rest of the chart, or invent entirely new figures that do not exist in the 16-figure canon.

In a system like geomancy, which relies on strict mathematical generation—adding odds and evens to propagate a 15-figure structure—hallucination is catastrophic. A single mathematical error in the first tier breaks the entire structural integrity of the reading.

2. The Solution: Deterministic State Machines

We realized early on that we could not rely on an LLM to "do the math." Instead, we architected SAGE using a bifurcated engine:

🔍 Why it matters

By decoupling the math from the language model, we ensure that every single reading generated by SAGE is 100% mathematically valid according to the ancient traditions, while still benefiting from the nuanced articulation of modern AI.

3. Digitizing the Binary Code of the Ancients

Geomancy is the original binary code. Each figure is comprised of four lines, which can be either a single dot (active/odd) or a double dot (passive/even). In SAGE, we model these states simply as boolean or binary arrays.

figure = [1, 0, 1, 1] # The figure of Fortuna Major (1 dot, 2 dots, 1 dot, 1 dot)

By modeling the tradition directly into our state machine, we easily run the ancient operations—like the "addition" of two figures to produce a third—using simple XOR logic. What took medieval scholars minutes to calculate by hand in the sand, our engine processes in milliseconds, flawlessly every time.

Conclusion

The digitization of ancient knowledge requires more than just pasting old texts into an LLM prompt. It requires deep respect for the structural mechanics of the tradition. By treating geomancy as the mathematical framework it always was, SAGE bridges the gap between historical accuracy and modern accessibility.