Comment by jackzhuo

Comment by jackzhuo 9 hours ago

2 replies

Spot on! This is exactly why a simple Math.random() > 0.5 binary flip isn't enough for a proper simulation.You are right that we are mathematically dealing with base-4 logic (6, 7, 8, 9), not just base-2.While there are only 64 hexagrams ($2^6$), there are actually 4,096 possible casting results ($4^6$) when you account for the moving lines. My algorithm is designed specifically to capture the distinct probabilities for all 4 states.

roadside_picnic 7 hours ago

This is a great project btw! I've long been fascinated by the 易经 especially the different probability distributions associated with the different methods of generating the lines. It's been a while but I used to have an actual set of yarrow stalks!

  • jackzhuo 7 hours ago

    Thank you! That means a lot coming from someone who appreciates the probability mechanics behind it.

    Since you have experience with the actual stalks, I think you'll like the update I just pushed: I’ve fully integrated the classic Wilhelm/Baynes text to ensure the reading has that authentic, traditional grounding you mentioned.

    I also added a way to generate a visual card of the result—trying to bring back a bit of that 'tangible artifact' feel of the physical ritual. :)