6 months ago
Tues Aug 6, 2024 2:33pm PST
Show HN: Little Riddle – A minimalist word game powered by ChatGPT
My mom loves word games. Inspired by a old school word game called "Road Toad", I built a super simple browser app that provides a 'Little Riddle' to a two-word answer that always rhymes. If you are stuck, you can receive a hint or a letter. I built in 'making and sharing' so my mom can send me and the family riddles she likes. I hope someone on HackerNews enjoys Little Riddle as much as my mom does. I am pretty happy with how it turned out.

For anyone interested in knowing what's happening under the covers, I grabbed a bunch of popular nouns, verbs, and adjectives and then used some rhyming libraries to find words that rhymed with said popular words. I ran those rhyming words through the popular list and yanked out any obscure words. Once I had that list I manually went through that list and removed those rhyming pairs that didn't really pop! like "unusual textual".

After I had a list of good rhyming pairs, I asked ChatGPT 4o to step in and come up with a riddle for each of the rhyming pairs. Here is one of the prompts I used:

"You are a clever game host. You will provide the players with a very brief sentence in json format that serves as a vague clue for two words that rhyme that the user must guess. Players have very good vocabularies. The clue must be a complete sentence but it should be short, tricky, and concise. This is very important: The first part of the sentence must refer to the first word. The second part of the sentence will refer to the second word. You should only supply the clue and not reference the game or instructions. The clue must not contain either of the rhyming words. It should be a difficult clue that can't be easily guesses. Be very creative. The rhyming pair is: [rhyming pair]"

I then used a thesaurus library to provide a list of clues to provide my mom if she got stuck.

That ultimately resulted in thousands of riddles that look something like: { riddle: "big tiger", answer: "fat cat", clues: ['voluptuous lion", "large feline"] }

After I had the data, I coded this up using Vue/Nuxt and Tailwind. It's hosted as a Cloudflare page and can hopefully withstand the huge wave of traffic Mefi Projects is going to send my way.

If anyone has any suggestions for more riddles or features, please let me know.

read article
comments:
add comment
loading comments...