I Ching Divination Script
Description
This repository contains a JavaScript-based tool for performing I Ching divinations. The script simulates the traditional coin-toss method used in the I Ching (also known as the Book of Changes, an ancient Chinese divination text), generating hexagrams and their corresponding interpretations.
The script was created for users who want to cast hexagrams on the aiching.app website. Users could use the app on their phone but we wanted to create an option for people who maybe could not download the app. It was also created to accompany the book Embracing Life’s Journey Your Guide to Personal Growth with the I Ching
Features
- Simulates the process of an I Ching coin toss divination, tossing three coins six times to generate an I Ching hexagram.
- Identifies “changing lines” within the hexagram, which indicate potential transformations to a different hexagram.
- Links to external resources for interpretation of each hexagram, with additional notes for handling changing lines.

Demo
Check out a live demo of the application here.
To use the demo:
- Navigate to the demo page.
- Click the “Toss Coins” button six times to generate each line of your hexagram.
- As you click the button, you’ll see your personalized hexagram emerge, inclusive of any changing lines.
- Once your hexagram is complete, follow the prompt to delve into its meaning and begin your journey towards personal growth.
How to Use
- Clone this repository to your local machine.
- Open the
index.html
file in a web browser.
- Click the “Toss Coins” button to generate each line of the hexagram. Repeat this six times.
- Once all lines have been cast, the script will display the resulting hexagram(s) and link to their interpretations.
Contributing
Contributions to this project are welcome! Please fork the repository and create a pull request with your changes.
License
This project is licensed under the terms of the MIT license.