Tuesday, February 12, 2013

The YiJing Oracle: An Android App for Divination

What is the YiJing?

As I mentioned in a previous entry, I Ching or YiJing, I’d present the Android app that I have been working on for the past few months. Click the link above to learn more about the kind of fortune telling or divination the app deals with.

Goals

Several years ago I was inspired to create an app dealing with the YiJing after learning how to use it. There were several things I wanted to accomplish with the app to make the YiJing easier and more accessible, yet insightful, to the uninitiated.

  • Make casting the lines easier, quicker and more convenientAlthough casting the lines using three coins is the quickest and most convenient, splitting the yarrow is the older of the two. I enjoy the time I spend counting and splitting the stalks, but it would take more than 10 minutes to cast all the lines. In addition, if you were not careful you could miss a stalk or two and it would throw off a reading and you would have to either restart or try to see where you made a mistake.
  • The app eliminates any miscounts or other mistakes that can be made when manipulating coins or stalks. The user just chooses a method, taps the screen to get their “input” into the reading, and a hexagram results all within a very short period of time. But, an option exists in the app where the user can input the values of lines they cast after tossing coins or splitting yarrow stalks or some other method that the find useful. At that point, the app becomes more of a log of readings.
  • Faithfully emulate the two most popular methods
     
    In order to make casting lines convenient, it behooved me to emulate the probabilities of both the three-coin method and the yarrow-stalk method. If the app were to be compared to a real-world reading, it would produce similar results.

    I researched statistics and found others’ finding on the probabilities of the methods, especially the probabilities for the yarrow-stalk method. This way whether the user chose to use the yarrow-stalk or the three-coin method, they would cast lines in a way that was similar to both, but quicker and more convenient.
  • Make hexagram lookup quickerThe method I use when consulting the YiJing differs from the usual way of consulting the YiJing. Normally, if there are changing lines in your first hexagram, you change them all to produce a result hexagram. In his book The I Ching Handbook Mondo Secter proposes that only the first changing line is flipped to produce a “transitional” hexagram. And then, from that hexagram its first changing line is “changed” or “flipped” or turned into its opposite value. The process repeats with each subsequent hexagram until there are no more changing lines. Therefore, the maximum number of hexagrams that you would need to look up would be seven: The hexagram that resulted from casting the lines and each hexagram produced from each of the six lines. But, in addition, the texts of the changing lines needed to be considered since the line might completely alter the interpretation of the hexagram. That is a lot of texts to look for read and digest just for one question!

    Once all the lines are cast and a hexagram results that starts the response to your question, the app will already have the sequence of hexagrams, their interpretations and their details, their changing lines and their texts ready.
  • Write more succinct and focused textsOnce I came across a book on the Tarot that had card interpretations for some area of life, such as “relationship”, “money” or “business”. So, I envisioned that something similar for the YiJing could be done. Many of the on-line YiJing applications that I have encountered might have specific interpretations with a focus on “love”, but there were no interpretations for other areas. Even when consulting books for interpretations, you have to sift and read a lot of texts to get an understanding. But, even when you’ve done the reading, you can get so caught up in just sorting through all that information that you can forget what it is that you asked.

    The interpretations in the app have been redacted to keep them short and adapted for a particular category. Nevertheless, some hexagrams intrinsically lend themselves to one of the areas in life and do not need to be adapted. This idea extends to the interpretations of the changing lines as well.

Development

Because The YiJing Oracle is an Android app, it was written in Java using the Android SDK (Android System Development Kit) and the Eclipse IDE (Integrated Development Environment) – I was not familiar with the programming language, the SDK nor the IDE. But, after using them in concert, I’ve grown accustomed to them all and have learned a great deal about the Android platform.Screenshot_2013-02-12-Start

At first, I wrote what would be the “core” or the “heart” of the app in C# (which continues to be my preferred programming language along with .NET being my preferred platform) several years ago with the idea that I could create a Windows desktop application. I had programmed most of the core components and tested them. It was working well, but soon I discovered that it was difficult to “hook” it up with other components. So, I rewrote and refactored many aspects of the core parts over the past few years.
In June of 2012, I bought a new smartphone. My previous smartphones were Windows Phone-based, but when I bought my new phone, I chose a Samsung Galaxy III. As I explored my new phone and grew accustomed to the latest Android version at that time (4.0, Ice Cream Sandwich), I grew more and more curious about creating an app for it.
At first I was reluctant to write an app because 1) I had never owned an Android-based phone nor had I used one for an extensive period of time; 2) although I was “familiar” with Java, I had never written anything in that programming language; and 3) I was not familiar with the tools needed to write an app for Android.
I can write an entirely new blog entry just on my experiences, so I will leave that for later. I will focus more on this app in this entry instead.

Another App

When you search for “I Ching”, the more common, and older, name of the “YiJing”, Google Play returns a approximate total of 242 Android Apps! After combing the listings many of them that are not related to the YiJing.  A more accurate tally is about 60+ listings (apps). Many of the “legitimate” apps are free of charge and come in a few languages or are multi-lingual. Of the total apps, there are about 10 are for-pay with the least expensive at $0.99 USD and the most expensive for $5 USD.

I’ve installed many of the free apps and “played” with them. Since I’m already familiar with the YiJing, I knew immediately how to use many of the apps. But, the initial screen of one of the apps, did not easily lend itself to easy interpretation; it was I Ching, oracle, book and aid. There was not text nor any other indication of where I could start a reading. After a bit more exploring, I finally understood how to enter a question and consult the app. In my opinion, the thousands of installs each month are because people are curious and it is free. In general, you get what you don’t pay for with many of them. Some of them, should charge because it was written and laid out very well!

Of the paid apps, I have installed only a small handful. They all are well designed and well written.
But, one was not worth buying after using its free version. I Ching by Design in its free version and its paid versions have various problems. First, it does not have an intuitive user interface. I started the app and had no clue as to where to start. After playing around with it, I found out that you must tap Query first and you must enter a question to continue. Secondly, it was also difficult to close. Pressing the device’s Back button gets you nowhere. When I tapped the ? button, I discovered how to gracefully exit the app. The texts are English translations of Helmut Wilhelm’s interpretations. There are 12 reviews of the free app, but most of them are one-star reviews! I would not want to spend any money on this one. I have noted what the issues and hope that my app does not suffer from the same problems I Ching by Design has.

Availability

Beta Testing

As of this writing, the app is available to an exclusive number of people who have volunteered to use (and abuse) the app. During this period, functionality problems, crashes or compatibility issues with various version of Android should arise and be fixed. But, functionality has been very stable and I don’t expect to see any crashes. Texts, however, are being written and rewritten, so problems such as typographical errors and grammatical errors will be reported. Of the categories, “General”, “Love and Relationships” have been written. The categories “Money and Finances” and “Work and Career” are currently being written. I am considering adding another category, “Personal”, before version 1.0 release.

Releases

Below is a summary of what is planned with each release.

Version 1.0

  • English only
  • Stable functionality
  • All texts written for all categories
Get it on Google Play

Version 1.1

  • Updated and expanded texts
  • Minor issues fixed

Version 1.2

  • Additional categories
  • Spanish user interface
  • Spanish texts

Future versions and ideas

  • Background music
  • Ability to send readings via e-mail
  • Share reading on social networking sites

Monday, February 11, 2013

I Ching or YiJing

I’m currently writing a soon-to-be-released app for Android devices dealing with the I Ching or YiJing. But, the friends whom I’ve talked to are unfamiliar with the YiJing.

(I’ll be using YiJing instead of I Ching because YiJing is based on Pinyin, the ISO standard for transliterating Chinese.)

Summary

The YiJing is a book also known as The Book of Changes, The Classic of Changes or the Zhouyi (“Joe-Yee”). It is one of the oldest Chinese texts and dates from the Shang Dynasty. It contains a system of fortune telling and is primarily used to tell the future. It consists of a collection of comments on, and interpretations of, a set of 64 symbols or hexagrams consisting of six lines. Each line is either “Yin” or “Yang”, represented by broken and solid lines.

The YiJing can be consulted by opening a version to a random page and reading the interpretations. But, the more common method is to randomly generate the lines that compose a hexagram. The hexagram is built from the bottom up, so the first line that is determined is the bottommost line while the last line is the top.

How to cast the lines

Several methods have been devised to generate the lines of a hexagram in recent years, but two methods are the most traditional.

Tossing Three Coins

This method is the easiest to perform and the tools needed are readily available. Because of its convenience, it the most popular and has almost replaced older methods.

All you need are three coins. You can buy specialized coins that have a square hole in the middle or you can use coins of the same value, for example, three quarters. You concentrate on a question  and toss the coins in your cupped hands. You release the coins onto a table and take note of how many heads or tails appear.

The four possible combinations of heads and tails have the following values.

Combination Line Value Symbol
All heads Changing Broken (Old Yin) -x-
All tails Changing Solid (Old Yang) -o-
1 head, 2 tails Stable Solid (Young Yang) - -
2 heads, 1 tail Stable Broken (Young Yin) ---

The changing values and which of the lines should be noted. See below to understand what their importance is in the reading. The next section will talk about how to interpret the changing lines.

Splitting the Yarrow Stalks

Another method, splitting the yarrow stalks, is older than the three-coin method previously mentioned. It, too, replaced an older method where a question was written on a piece of bone or turtle shell. And then, heat was applied to the bone or shell to produce cracks. The cracks were then interpreted for an answer.

In this method, you take a bundle of yarrow stalks and split them into two piles. Each pile is counted by taking four stalks out of the pile at a time. The remaining stalks are set in front and the pile set aside. The total number of stalks from each pile will result in four or eight. The two piles are recombined, split and counted to determine the number of remainders. The remainders are set in front like the previous count but separate from it. The process is repeated with the remaining stalks to produce a third set of remainders. The number of four- or eight-stalk remainders are tallied and determines the value of the line. The entire process is repeated for the next five lines. Because of the long process, it takes much more time to produce a hexagram.

Remainders Line Value Symbol
4,4,4 Changing Solid (Old Yang) -o-
4,4,8 Stable Broken (Young Yin) - -
4,8,8 Stable Solid (Young Yang) ---
8,8,8 Changing Broken(Old Yin) -x-

As in the three-coin method, the changing lines should be noted.

How to Interpret the Hexagram and Changing Lines

Once all the lines are cast, you look up the interpretation of the hexagram. You read the main text of the hexagram to get the overall meaning. The changing lines add to or, even contradict, the overall meaning, so their interpretations should be considered. Unless, there are no changing lines, this is your first hexagram and represents the current situation.

The next step in the process is to convert the changing lines to their opposite values. The changing broken lines are converted to stable solid lines; the changing solid lines are converted to stable broken lines. You write down the resulting hexagram and look up its interpretation. This is your “result” or “future” hexagram and represents how the situation will evolve.

My app follows the same method of consulting the YiJing, but it take a different approach with the changing lines. In his book, The I Ching Handbook: Decision-Making with and without Divination, the author Mondo Secter proposes a different approach to the changing lines. Instead of changing all lines, only the first line is changed to produce a “transitional” hexagram. If this transitional hexagram still has changing lines, its first changing line is converted. The process is repeated until a hexagram where there are no more changing lines results.

Hopefully, this blog entry gets others interested and gives a very basic understand of this type of fortune telling. Additionally, I hope that garners interest in the Android app.

Android App

The Android app, it is now in the beta testing phase. If you would like to participate and give feedback on an app that will be released, please let me know. Otherwise, expect to see it hit Google Play by the second quarter of 2013. I’ll write another blog entry about the progress on the app and why I decided to write yet another app dealing with the YiJing when there are several already on Google Play.

Featured Post

The Dream Catcher

“…He heard the footsteps make their nightly path up the stairs. This time the footsteps stopped just short of his door. Inste...