HNHacker News
TopNewBestAskShowJobs

jackzhuo

39 karma · joined December 14, 2025

submissionscomments
jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
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.
jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
Thanks for pointing this out!

I probably stared at it for too long on my own monitor and got used to it. I will bump up the contrast in the next update to ensure it's readable for everyone.

jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
Asking the Oracle for circuit design specs... I love it!

My interpretation for your power supply:

Gathering (45): You need to gather some capacitors? (or maybe a heat sink for the 'massing'?)

Following (17): Clearly it's telling you to use a Voltage Follower. :D

jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
OK, I will fix it.
jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
Thank you! Always happy to meet a fellow developer in this niche.

Have you built a web app or a mobile app? I'd love to check out your work if you have a link!

jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
Thanks for the honest feedback!

You are raising a critical UX issue. Currently, I haven't implemented user accounts or a database because I wanted to keep the app simple and login-free.

However, that shouldn't mean losing your data on a refresh! I will prioritize a fix using Local Storage so your current reading persists even if you hit the back button.

I'll also make the result link much more obvious so you don't have to hunt for it. Really appreciate you trying it out despite the rough edges!

jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
That's a really cool fact about the archaeology!

To be honest, my reason for picking this method was simple: I was reading a book about the I Ching that described the different ways to cast hexagrams.

The Yarrow Stalk method stood out to me because it felt more mysterious—in the past, it seemed like a secret method known only by a few experts.

Also, from a coding perspective, this algorithm was just much more interesting to build than a simple coin toss!

jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
You are right—there is no detailed text yet.

To be honest, I haven't added it because I'm hesitating. I planned to use AI to generate the interpretations, but I'm not sure if that's a good idea.

I feel like letting AI explain the I Ching might kill the 'traditional vibe'.

I'm still deciding: should I use AI, or just use the classic book text? What do you think?

jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
OP here. This discussion is exactly why I implemented the Box-Muller transform!

You are right that humans don't split perfectly randomly (Uniform Distribution). We tend to aim for the middle but miss slightly.

In my code, I modeled this 'human splitting action' using a Gaussian (Normal) distribution centered at 50% of the pile, with a standard deviation. This simulates the user trying to split the stalks roughly in half, rather than just picking a random number from 0 to 49.

Interestingly, my Monte Carlo simulations showed that even with this human bias (splitting near the middle), the final modulo-4 probabilities remain stable. So the algorithm is robust even against our 'imperfect' hands.

jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
Great to hear! Thanks for verifying.
jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
Hi Dan, thanks for the heads up. I have fixed the mobile bug and deployed the update. It should be working for everyone now. I've also replied to the users above.
jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
Thank you! I found the bug causing issues on mobile/Edge. Just deployed a fix. It should be working now.
jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
Thanks for flagging the Firefox Focus issue. I've just pushed a fix for mobile browsers. It should be loading correctly now. Let me know if it works for you!
jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
Hi, thank you so much for reporting this!

I just identified the issue (it was a specific mobile browser compatibility bug). I have deployed a hotfix and it should be working now on iOS.

Could you please give it another try? Sorry for the trouble!

jackzhuo··on Show HN: I Ching simulator with accurate Yarrow Stalk probabilities
sorry, I will check it now!
← PreviousPage 2 of 2