fb_pixel

The wise words of an ancient, mystic text. A companion to your creativity and a guide to life's turning points.

I-Ching: App of Changes





Wisdom in your pocket


䷀ Many call it their all-time favorite 💖 I-Ching App. Lovingly crafted, beautifully presented, it works on Android, Apple, and Kindle: clean, no-nonsense design, poetic original interpretations, a journal for saving readings, a library with every line and hexagram for study, the ability to look up any hexagram by trigram or number. It uses the ancient yarrow-stalk method in the code, or use your own coins, a set of virtual coins that you cast with a shake of your device.

Virtual Coins

The I-Ching means many things to many people: it was considered a fortune-telling text in ancient China, a kind of psychic mirror on the subconscious by Carl Jung, a mystic guide by Greenpeace founder Robert Hunter, the inspiration for binary math to Gottfried Wilhelm von Liebniz.

It's been used by artists like John Cage, Merce Cunningham, Bob Dylan, Jasper Johns, Marcel Duchamp, Robert Rauschenberg, Brian Eno, and David Bowie, as a creative aid, and by at least one writer to determine the plot of his book: legendary sci-fi author Philip K. Dick imagined a fictional world in which the I-Ching provides glimpses of alternate meta-realities outside the narrative, including the one in which he cast hexagrams to decide plot and character features in "The Man in the High Castle."

The I-Ching attempts to describe the world of every day events through the interplay of dichotomies: the strong and the yielding, the dark and the light, the masculine and the feminine. There's little here about "good" and "evil": the wages of failure are remorse and humiliation, the supreme rewards are harmony and the pursuit of excellence. The work is infused with admonishments to courage and an abiding appreciation for integrity, empathy, enlightened leadership, governance that benefits the people, the superior expression of art.

The oracle is a binary system. In fact, it was the inspiration for the mathematics of 1s and 0s that runs every digital device today. Instead of 1s and 0s, though, the I Ching uses broken and solid lines. By a series of random operations, most often the sorting of stalks or the tossing of coins, a pattern of six broken and unbroken lines are generated, constituting one of 64 hexagrams, each describing a particular situation or condition and a set of texts for interpretation. In addition to being broken or unbroken, a line may be changing or unchanging - in transition from strong to yielding or vice versa. Changing lines not only introduce additional texts, by their transition they bring another hexagram formed of their opposites into play for interpretation.

In generating hexagrams, the software engine in I-Ching:App of Changes doesn't use the three-coin method popular in the west. It replicates the entire process of sorting 50 yarrow stalks again and again to derive each line: this maintains the statistical likelihood of a changing line precisely, which the coin method does not. I've released the sorting engine on GitHub as an open source code scrap if you're digitally inclined and want to peek at what's going on under the hood.





I-Ching: The App of Changes is a digital interpretation of a centuries-old method of reflection. Start with an open question. Not a yes/no, and probably not “Where should I have lunch.” Think changes, choices, creative forks in the road.

Type your question in the input box and press Ask.

Ask input and button

Casting a hexagram

A Yin-Yang button appears. Each press performs the full yarrow-stalk sort under the hood and generates one line, bottom to top. Changing lines show in light gray.

Yin Yang cast button

Tap to cast

Tap the yinyang button (or anywhere on the screen) six times, pausing briefly to hold your question in mind. After the sixth line you’ll see the hexagram name, translation, and Judgement text.

One-press cast

Enable this in Settings if you want the whole hexagram at once. Same yarrow stalk method of hexagram generation, but with ninja-fast fingers.

Coin menu

Prefer casting in real life and logging lines for lookup here? Use the Coin Menu (6/7/8/9, Head/Tail combos, or line icons). After six entries the app looks up your result. There are also virtual coins too — shake your device to cast a line.

Coin menu Coin log example Virtual coins

Reading your results

Judgement view

The classic texts appear above the tiny hexagram image. These are adopted from the Wilhelm-Baynes translation, with edits to make them less male-presumptive. Below the tiny hexagram are my interpretations, interwoven with shout outs to poetry, song lyrics, and popular culture, tweaked over four decades of intermittent attention.

Judgement and Image

The Judgement text in the I Ching is generally taken as the core guidance of a hexagram — a statement about how to act or what tendencies to expect in the situation. The Image text, added later by the “Ten Wings” commentaries, uses the symbolism of the trigrams (Heaven, Earth, Thunder, etc.) to describe the underlying condition or atmosphere and often suggests an attitude or way of aligning with it. Some schools of thought lean on the Judgement as the “answer” and see the Image as context; others treat the Image as the real teaching and the Judgement as more situational.

Changing lines

Changing lines view

Changing lines add line texts and bring a transformed hexagram into play. In the Zhu Xi method you read only the Judgement and Image of the transformed hexagram, ignoring the lines that gave rise to it. That's the method used in the app.

Trigrams

Tap the blue trigram links for attributes and associations; close the modal with OK.

Trigram info modal

Journal

Save your question and reading from the Journal menu.

Journal screen

Save and edit

Confirm save

Edit your question before saving. From version 12 on you can add notes of any length, including emojis. Tap the blue text in the Cast column to revisit. Trash can deletes. Blue pencil edits.

Edit journal entry

Filter and search

Use the blue filter box to show only entries that match your text (it searches both question and notes) At the end of your results a button will appear to reload the entire journal.

Filter

Share a reading

From version 16 the journal shows a share icon. It opens a web view of your question and casting. You can then copy the URL and share anywhere. (Yet another user request! Keep 'em coming.)

Reading share page

Backup and restore

Backup screen

Export Journal (in the Journal menu) makes a local text backup that you can email to yourself. Cloud sync is there, but local copies are insurance. You can append data to another device, build a web page of your journal, or save as a spreadsheet.

Export options

Backups start with DataBeginMarker and then a JSON array. Don’t change anything inside the JSON.

DataBeginMarker;MigratedMe;ZeroLight BEGINJsonJournal:
[{\"date\":\"2025-01-04T17:00:29.344Z\",\"question\":\"Do I stay#comma#or do I go?\",\"answer\":\"94848484748\",\"notes\":\"A note\"}]
Restore
Always paste from a plain-text source - you don't want to put this data through MS Word or any other word processor. Keep an untouched original backup.

Library and lookup

The Library lists all 64 hexagrams. From 12.3 there’s a search box to search the entirety of the hexagram and line texts - a goldmine for researchers.

Search all

Trigram lookup

Spotted a hexagram in the wild? Want to figure out what a particular cast in the Man in the High Castle really meant? Know the figure but not the name/number? Pick the top and bottom trigrams to identify it. Tap to view the standard reading.

Trigram lookup
Trigram menu

Digital notation

Look up any reading with notation. Example: 11.26 = hexagram 11 with changing lines in 2 and at the top. From 12 you can save generated readings. (Autosave does not capture numeric casts.)

Notation

User settings

Settings menu

Autosave

Store readings as soon as they’re cast.

Dark mode

Light-on-dark vs dark-on-light across the app.

Prevent bottom-menu overlap

Android only. Adds safe space for misbehaving flip/fold devices where the Nav Bar buttons overlap the bottom menu. You can also force it by typing ForceFoldableMenu in the question box.

Chinese and James Legge libraries

Chinese library
Chinese UI

Switch to the original Chinese or James Legge's interpretations. Journal views follow the selected library; toggle back to return to Wilhelm + my commentary.

Font size

Set the size to taste. Tablets scale up. From 12+, settings save automatically.


A note about multiple devices

For folks who have the app installed on an iPhone as well as an iPad, or an android phone and tablet, the journal is designed to synchronize via the cloud so IN THEORY you should be able to maintain a single journal between your two devices. However, I've had user reports that if you have the app opened on two devices at the same time you may experience duplicate entries. I'm trying to find a fix for this behavior, but in the meantime it may be wise to ensure you have the app completely shut down on one device before you open it on another.


Apple Watch

Support ended at version 12.3 due to changes on Apple's side which made it nearly impossible for me to maintain. If watch functionality is important and you want it back, tell me.

Watch reading
Handoff

More reading

If you would like to read more about the I-Ching, here are two great compendium sites and a few sources I really like:
Hilary Barrett's I Ching With Clarity -- by far the best I-Ching blog on the web.
The I-Ching on the Net
Thoughts of a Taoist Babe
Joan Larimore's hexagram illustrations
And for a handy step-by-step introduction to the yarrow stalk cast method, check out this great instructable.
You may also enjoy a piece I wrote on Medium, which Wired picked up: My Quest to Bring Hippie Mysticism to the Apple Watch.








The Code: Behind the screen

The I-Ching can be consulted a number of different ways. You're basically generating a random number from the set 6,7,8,9 to determine whether a line is broken or unbroken and changing or unchanging. But different methods yield different likelihoods, and the coin method, in which three coins are tossed, and the yarrow method, in which 50 yarrow stalks are ritually sorted, yield different results. Depending on how you approach the book and its history, this is either a highly significant or a totally silly distinction. But as a math and coding challenge go, I saw it as essential that my app use the older, more complex Yarrow method.

Here follows the manner in which the I-Ching was consulted by using the yarrow stalk method. The software abstraction of this process that I wrote in Jquery is available at GitHub. (If you would like a more pictorial step-by-step, check out HellaDelicious's instructable here.)

Take 50 stalks. Remove one, set it aside. Randomly separate the remaining 49 stalks into two piles, East and West. Take one stalk from the West heap and hold it between thumb and forefinger of your left hand. Take stalks in groups of four from the East pile, until four or fewer stalks remain. Keep this remainder, place it between the ring and middle finger of the left hand. Take stalks in groups of four from the West pile until four or fewer stalks remain. Keep this remainder, and place it between the middle and forefingers of the left hand.

Your left hand now holds a sum of stalks equal to 9 or 5, being made up of one of the following possibilities:

 1+1+3=5 1+2+2=5 1+3+1=5 1+4+4=9 

If the number of stalks is nine, a value of 2 is assigned to this counting. If it was five, the number three is assigned. The 9 or 5 stalks are put aside.

The rest of the stalks (40 or 44 by now) are again divided into two piles and counted off as above. The possible outcomes this time are:

 1+1+2=4 1+2+1=4 1+3+4=8 1+4+3=8 

This time, an 8 stalk remainder is assigned the number

2. A 4 stalk remainder receives a 3. The four or eight stalks are set aside, and the remaining 36, 40, 32, or 38 stalks are again divided in two and counted off. The possibilities are again:

 1+1+2=4 1+2+1=4 

 1+3+4=8 1+4+3=8 

And again a remainder of 8 is valued at 2, a remainder of 4 at 3.

From these three operations result the following possibilities:

 2+2+3=7 2+3+3=8 2+3+2=7 2+2+2=6 3+2+2=7 3+3+2=8 3+2+3=8 3+3+3=9 

It is these results which determine whether a line is solid or broken. A 7 meant a strong, solid line. An 8 meant a yielding, broken line. A 9 was considered a strong moving toward yielding line. A 6 was a yielding moving toward strong line.

By repeating the above process six times, a hexagram was built up from the bottom.

Like most westerners exposed to the I-Ching, I was taught the coin method of generating a line, which is far easier than the method above. By this method, three coins are tossed. Heads are worth 2, tails 3. The possibilities were thus:

 Head+Head+Head=6 Head+Head+Tail=7 Head+Tail+Tail=8 Tail+Tail+Tail=9 

This means, however, a slight difference in probabilities from the yarrow stalk method. The chance of any one coin being head or tail is ALWAYS 50/50. However, the chance of a "Tail" on the first "Toss" in the yarrow stalk method is almost 3 to 1. Recall, the possible results for the first division of 49 stalks was this:

 1+1+3=5 (Value 3) 1+2+2=5 (Value 3) 1+3+1=5 (Value 3) 1+4+4=9 (Value 2) 

Of four possible outcomes, three of them result in a 5, only one in a 9. This means, in effect, that when we look to the lines, those generated by a 2 in the first place are less likely to occur than those that start with a 3:

 Less likely: 2+2+3=7 (Strong) 2+3+3=8 (Yielding) 2+3+2=7 (Strong) 2+2+2=6 (Yielding Changing) 

 More likely: 3+2+2=7 (Strong) 3+3+2=8 (Yielding) 

 3+2+3=8 (Yielding) 3+3+3=9 (Strong Changing) 

It therefore makes sense that Yielding lines are slightly more likely to show up than Strong lines, and that a yielding changing line is the least likely all possible combinations to turn up. This is because unlike the regular yielding and strong lines, the changing lines are each generated by only one possible combination of stalks. The yielding, changing combination, because it begins with 2, is therefore heavily disfavored over the strong changing line.

Which is all just to say that the coin method does not hold the same built-in bias that the yarrow stalk method has. Surely note must have been made by the ancients that a 6 was a relatively rare occurrence indeed. Certainly, anyone in frequent consultation with the book by the yarrow stalk method would have noted the anomaly. I noticed the reticence of 6 after many many runs of the developing program and thought my coding was somehow flawed. But no! Perseverance furthers. No Blame.








The Back Story

I originally wrote this software as a piece of PC DOS shareware, distributed via floppy disk and CompuServe, in 1989. It became an app for iPhone, Android, iPad, and Apple Watch in 2015, after a couple loyal users asked me to bring it out of the stone age and one extremely loyal user helped me unlock it from its floppy-disk carbon-freeze. Here's the story of the software's beginning, from the original 1989 release of what was then called I-Ching.exe. The full documentation of that project is available here.

The I-Ching found me through a girl, Maggie Condron, whom I was dating in college. She had an absolutely gorgeous hard-cover copy of the book, three real Chinese coins, and made quite an elaborate ceremony of consulting it. The book had a special pillow set up like an altar. There were candles, incense. I was skeptical about the whole thing, and raised a few Spockish Eyebrows, but the whole production was bewitching, and there was undeniable magic, even if the magic was nothing more than the good old alchemy of words.

I had rummaged around bookstores for a couple months trying to find my own copy, to no avail.

One day, Maggie and I were selling a bunch of used books at Second Story books in Washington, DC. Someone had just brought in a box before me which was still on the counter, unsorted. Lying on top was a mint condition copy of the Wilhelm-Baynes translation. Maggie looked at me with a cynicism-challenging smirk. I looked at my shoebox full of rat-eared paperbacks, picked up the beautiful hardbound I-ching and said "Trade?" It was one of synchronicity's finest hours.

When I started messing around with computers in the mid 80s, the parallels between the I-ching and software kept jumping out at me. Both are binary systems, built of ones and zeros and yesses and nos. 64 hexagrams, 64k memory, 512 texts etc etc -- it seemed the I-ching and computers were made for each other.

What I didn't know at the time was there's actually a direct connection between the binary math that computers use and the book:

The modern binary number system, the basis for binary code, was invented by Gottfried Leibniz in 1679 and appears in his article Explication de l'Arithmétique Binaire. The full title is translated into English as the "Explanation of the binary arithmetic", which uses only the characters 1 and 0, with some remarks on its usefulness, and on the light it throws on the ancient Chinese figures of Fu Xi." (1703). Leibniz's system uses 0 and 1, like the modern binary numeral system. Leibniz encountered the I Ching through French Jesuit Joachim Bouvet and noted with fascination how its hexagrams correspond to the binary numbers from 0 to 111111, and concluded that this mapping was evidence of major Chinese accomplishments in the sort of philosophical mathematics he admired. Leibniz saw the hexagrams as an affirmation of the universality of his own religious belief. —Wikipedia

I was living in Italy when I found myself with a pirate version of Turbo Pascal (purchased from the Porta Portese market for the cost of the floppy), a 64K Compaq luggable, and time on my hands. I wrote my first tentative little bit of code to randomly generate six numbers, so I could cast the I-ching on the computer and look up the results in my book.

Pretty soon I had a plan to create a full-blown program complete with my own interpretations, a journal for storing answers to questions, a lookup table for finding texts by hexagram, a user-definable colour scheme, a graphical menu system, and all the bells and whistles you could ever want from a piece of mid-80s software.

Screenshot

I'd usually start coding around 7pm and hack away until well past midnight. Sometimes I'd spend the evening writing interpretations, sometimes it would be writing or debugging code.

As I got deeper into the code engine, I discovered things such as the anomaly of the coin flip. At first, I started coding three variables to behave just like a toss of three coins, which is one method of generating a hexagram. But then I realised that statistically, this really wasn't even a close apporximation of the more ancient "Yarrow Stalk" method. The coin method biased slightly away from changing lines (all heads or all tails on the three coins). So I wrote a procedure that took variables separated into two random counts equalling the "East" and "West" piles of the 49 stalks, and sorted them back and forth in exactly the way an ancient chinese sage would have done.

The code

This little baby was a true 80s hepcat in usability terms. It used a clone of the VERY cutting edge Lotus 1-2-3 menu system which I had to constantly recode because I kept forgetting to count from 0 instead of 1. Learned a lot about arrays from that menu system.

My biggest constraint was it had to deliver on the media of the day, which meant I needed to cram more than 500 pages of text, plus far too many thousands of lines of code, onto a single 160k floppy disk. I brought it in at 155 zipped, a feat which still amazes me given some of the filesizes I was originally working with. The answer was my own compression engine. It became clear after I was about a quarter way through writing texts that I would never get all 512 pages down to size. Each of the hexagrams required the Judgment text, the Image text, and six pages of changing line text. Each page of text was around 125 words.

But I could store some of those words as abbreviations, and by storing such strings as "ing" and "ch" and "the" as single-byte tokens using the extended ASCII set, I could reduce thousands of instances of those strings from several letters to a single byte. I became a compression maniac, trying to find sources for whether the word "that" or "which" was more frequent in the English language to know which I should encode into my precious but limited trove of 128 ASCII "Tokens." Then one day I realized that I was missing massive savings by looking at the English language and not looking at my source material. The I-Ching holds a litany of repeating phrases such as "It furthers one to cross the great water," and "Good fortune without blame." I could collapse those entire phrases into a single byte token. I ran the new code over the text and Whoompf! down came the filesize like a flatulent balloon. I remember doing a little Eureka dance on the empty Via Marmarata as I walked home at 3am, my head still reeling with code.

The Program

I published the final version in 1989 via one of the shareware forums on Compuserve. In those days, that was pretty good distribution. I also sent copies high and wide to friends and threw a few into the market at Porta Portese. It never earned me more than a few hundred bucks, but I had lots of emails of appreciation and enjoyed seeing it get mentioned in various news groups and forums over the years. There were a couple requests and offers to help update it to a windows version, but I never got around to it. I wrote in a post:

"I still have most of the original source code, but one library got corrupted a couple decades ago, and the thing won't recompile anymore (which is why my address still reads as Italy in the closing panel.) Tauntingly, I have the full backup of the original work on a hard disk that came out of that old Compaq Sewing Machine it was written on, but in those days Compaq hard disks bore a proprietary BIOS wake-up routine, and the disk can't be accessed by slotting it into any other PC. So until I dig up a working Compaq Portable II on Ebay and can resurrect the disk, the oracle is locked against revisions."

That last bit prompted an email, out of the blue one day in 2013, from Gary McCaskill, a former PC technician who told me he'd installed my programme on hundreds of computers he'd set up and made attractive with his own menus of shareware. He had a specialty in data recovery, and could he be of help recovering the data? He'd hoped I'd put the I-Ching into an IOS format. I shipped the disk off to him and he put in Herculean effort, even buying an old Portable Compaq II. He rescued enough of the code to get me moving on the project. And when at one point I got stuck, unable to recover a swath of texts, he did a rather extraordinary thing. He reminded me that I'd built a backdoor into the programme,-- one that I'd long forgotten, that would allow me to extract every text in the programme. I could run compiled versions of the programme in a DOS emulator, and there was an option to "Print to Disk!" Boom! I could output the complete text of every hexagram I was missing. I had all the material I'd written, and while it wasn't quite as structured as it would have been in code format, a few BBedit macros and a few late nights, and I had a complete XML file of text that had taken months of typing and creative hours. So a huge thanks to Gary for prompting me to move ahead, and for using a rare set of skills in obscure 1980s hardware to help chisel this fossil out of solid rock and breathe new life into it.

Here's something Gary wrote me about participating in this project that made my heart brim:

Now for a bit of synchronicity.

I'm 65 now, and I was talking to a friend less than a week ago about how much knowledge is lost to the world everytime a person dies. Then think about a generation passing, and so much of the knowledge that was needed in their time just isn't needed. I watched my grandfather cast a babbit bearing with crumbled asbestos fibers and grease for a mold. Steam engine mechanics are gone forever. But that knowledge isn't required, and so it has to be dropped by each generation to make room for the knowledge of the times.

And then I thought of the knowledge that I have that was essential for my profession 30 years ago, it's always the stuff that was inside a wide, flat, gray computer case. How to install a socketed memory chip, how to orient a flat ribbon cable connector, the difference between the floppy cable and the HDD cable, and commands like "debug g=c800:5" to access to the low level format routine on a WD controller card.

Anyway, because of our little project, I get to utilize skills that I've gained over several decades-- And it feels good. Thanks for letting me participate. Gary











Contact

Brian Fitzgerald
brianfit58 [at] gmail.com
@brianfit on Twitter
brianfit on GitHub




This app is a labor of love by a lone amateur, self-taught code monkey. It costs me a small mountain of time and makes barely a hill of beans, but I love making it. I also love coffee, which helps keep this server running, pays for my software subscriptions, keeps everything ad-free, and constantly reinforces my belief that when you give generously, the world gives back.

Screenshot




Privacy Policy

Your data is yours. I don't trade, sell, swap, or even capture email addresses or personal information about you. I use the Facebook SDK to track ad performance in reaching new users, but I don't invoke login or any other protocol which would allow me to use it to collect info on existing users. I use Google Analytics to track app usage anonymously. Those tools will all reveal things like where and when a user opens the app -- to the level of country and city --, the operating system and hardware they're using, the screen they are viewing, and other information about app usage that allows me to track crashes and better understand behaviour flows. I don't collect individually identifiable user demographic, personal contact, or behaviour info. To learn more about, and to help defend, online privacy, please visit and support the Electronic Frontier Foundation.




Data Deletion Policy

As this app does not require account creation, I don't keep any data associated with individual users. I do keep aggregate data about how often the app is installed and opened and the usual information relevant to marketing and advertising the app on Facebook, Instagram, etc. If you have any questions concerning the data I collect you can write to me, Brian Fitzgerald, the official, GDPR-compliant "Data Deletion Officer" at i.ching.app.of.changes@gmail.com