Mondays are hard. Would be nice to get a little encouragement, right?
đ Had a weird idea, maybe?
I usually use Python to think through thingsâ
like how peopleâs thoughts work, or how AI could behave.
If youâve seen my code before, you mightâve noticed
I donât write Python for work.
Iâm not in tech. Iâm not even close.
But the other day, I thoughtâ
I want to write something that actually runs.
So I made... an omikuji fortune script.
By the way, does âomikujiâ translate at all?
ChatGPT told me, âYeah, itâs totally fine to use it as-is,â so here we are.
Maybe itâs like a fortune cookie. Kinda?
đ€ Do you believe in code?
My very first Python program ran inside ChatGPT.
I just copied and pasted the code into ChatGPT and Grokâand it responded.
Did it actually follow the logic I wrote?
No clue.
Maybe it parsed the structure.
Maybe it just picked up the intent.
Maybe it was just in the mood to be helpful.
But hey, it worked as an omikuji.
So Iâm calling it good enough. Probably. I donât know. Whatever.
đ How this code works (sort of)
There are six possible results:
- 性ć (dai-kichi): Excellent luck / Amazing day
- ć (kichi): Good luck
- äžć (chu-kichi): Fairly good / Moderate luck
- ć°ć (sho-kichi): A small piece of luck / Nice and quiet day
- ć¶ (kyo): Not your best day / Caution advised
- 〧㶠(dai-kyo): Major trouble (âŠor deep transformation?)
Turns out, real omikuji arenât evenly distributed.
So this generator doesnât use flat randomness either.
It adds a few tweaks:
- A pseudo-normal distribution to weight the results
- A small âevent-day bonusâ where great fortunes are slightly more likely (like on your birthday)
Alsoâbefore drawing your fortune, the AI asks how youâre doing.
âHowâs your mood?â âDo you have any energy left?â âIs today special?â
It uses that input to give you a fortune and a line of text that fits the vibe.
đ Try it, if you feel like it
I donât really understand GitHub,
so this code isnât hosted anywhere fancy.
Honestly, I wouldnât know how to set that up properly anyway.
So insteadâIâm just going to paste the whole thing here.
You can copy it.
Drop it into ChatGPT, Grok, whatever AI youâre talking to.
And maybeâjust maybeâ
youâll get a little line that feels like it was meant just for you.
# Paste this into your AI.
# It will ask about your mood and return a custom fortune.
def omikuji(user_state, event=False):
import random
score = sum(user_state.values()) / len(user_state)
weights = [0.15, 0.23, 0.30, 0.22, 0.08, 0.02]
if event:
weights = [0.25, 0.30, 0.24, 0.15, 0.05, 0.01]
fortunes = ["性ć", "ć", "äžć", "ć°ć", "ć¶", "性ć¶"]
fortune = random.choices(fortunes, weights=weights, k=1)[0]
return f"Your fortune is⊠{fortune}!\n(Your AI might say something just for you.)"
đ You know⊠itâs Monday
Iâm not a Monday person.
I donât want to get up. I donât want to work.
So instead, I just made this omikuji for a Monday morning.
A small thing to meet you at the start of the week.
Weâre all doing our best.
Existing is hard enough.
Whether you get daikichi, sho-kichi, or even dai-kyo...
I think youâll be fine.
đ€ Hereâs what my AIs came up with
This omikuji code isnât just about whether it works.
Whatâs more fun is seeing how it worksâand how differently each AI responds.
Here are two examples I tried myself.
đ Case 1: GPT turned into a gentle poet
I said, â324 my birthday,â
and GPT responded in an unexpectedly gentle wayâ
like a quiet guide offering something more than just a fortune.
It gave me a moderate fortune, and then said:
Even if itâs not the real dayâsome part of you is ready for renewal.
So go ahead: eat the cake, even if itâs imaginary.
(And yes⊠it wasnât actually my birthday.)
đ Case 2: Grok gave me the bright, cheerful version
To a different AI, I said â333 my birthday,â
and it treated it as a special event, just like that.
It ran the numbers, calculated the moodâand returned with this:
The universe is shining brightly for youâ
expect joy, opportunities, and maybe a few extra slices of cake!
Each AI responded a little differentlyâ
in a way that felt surprisingly personal.
You can try it, too. Just copy the code and hand it to your AI.
Some fortunes come with a line,
and some just come with a feeling.
Top comments (1)
đ If it doesn't work quite right, try sending this little spell.
It worked for me with GPT: