Arriving a bit late to the party, but I couldn't resist crafting a quick binary search solution in Python.
from urllib.request import urlopen, Request
DICT_URL = "https://grandmasword.com/dictionary.js"
response = urlopen(Request(DICT_URL, headers={"User-Agent": "Mozilla/5.0"}))
words = [w.strip('"[];\n') for w in response.read().decode().split("[")[1].split(",")]
lo, hi, answer = 0, len(words) - 1, ""
while answer != "d":
mid = lo + (hi - lo) // 2
print(words[mid])
answer = input("after/before/done? [abd] ")
if answer == "a":
lo = mid + 1
elif answer == "b":
hi = mid - 1
Took a total of 17 guesses to find the solution: MALPIGHIAS
after/before/done? [abd] a
RUBIFIES
after/before/done? [abd] a
TEARERS
after/before/done? [abd] a
UNMANLIEST
after/before/done? [abd] a
VORTICES
after/before/done? [abd] b
UTOPIANIZING
after/before/done? [abd] a
VERTICILLASTERS
after/before/done? [abd] a
VIROSE
after/before/done? [abd] a
VIZARD
after/before/done? [abd] a
VOLCANISE
after/before/done? [abd] a
VOLUMIZER
after/before/done? [abd] b
VOLPINOS
after/before/done? [abd] b
VOLITATE
after/before/done? [abd] b
VOLCANOLOGICAL
after/before/done? [abd] b
VOLCANIZATION
after/before/done? [abd] a
VOLCANIZES
after/before/done? [abd] a
VOLCANO
after/before/done? [abd] d
Thanks for sharing this nice game on a fine Sunday evening! It was fun to play both manually as well as programmatically!
Edit: See also https://news.ycombinator.com/item?id=41217457.
A small bug report: the "Share score" button on macOS Safari doesn't offer "copy" as an option for some reason. The same functionality on guess the game[0] has the same limitation, but it also copies to the clipboard automatically. Wordle[1] seems to just copy to the clipboard only.
Suggestions, limit to 5 chars and use a Wordle-like interface so your phone can’t suggest words.
I could see this being a legit NYT game.
If you guess a word that isn’t in the dictionary, the text box looks like it’s cleared but my phone’s (iPhone) keyboard’s autocomplete either didn’t pick that up or there’s still some hidden content in the box.
It would be nice if the list was always sorted in totality.
(So I guess, thanks for not teaching her about bundlers and minifiers yet :))
view-source gives away the answer for the next 20 days....
It's a very interesting concept as I'm sure you can extract some interesting insight about the profile of a user from the list of 12+ words they'll come up with. (When looking back at most of mine, they're words that came up in this week's conversations or lyrics of my Spotify playlists)
Like, it might be a fascinating little add-on to have a "Rorschach" LLM-based module attached which looks at the vocabulary you used and tries to sketch out a cold reading about you.
I would come up with categories of increasing difficulty. "Colors", "Advanced Colors", "Common Fruit", "All Fruit", etc.
The game mechanic is great and worked flawlessly though!
There's also the case of the 80-some-year-old Japanese lady who wrote her own iPhone app, a game about arranging traditional Japanese paper dolls: https://social-innovation.hitachi/en/article/colors-wakamiya...
If you're retired, bored, and have a lot of time on your hands, learning tech proficiency and programming seems a good way to pass the time and help keep your mind sharp. Just as it was for us bored kids back in the day.
It was volcano but I only discovered it after finding that Android autocorrect can suggest a word for me.
If you like this, check out https://betweenle.com.
Betweenle is based on the same game logic, but gives you very useful visual clues along the way.
I got reeeealy close (and then asked an llm....)
Congrats to your grandma for making a game!
Feature request - colour code incorrect guesses by distance from the solution. You could look up 'Hamming distance' for one approach to that.
secretWords = ['test', 'test', 'test', 'horse', 'chocolate', 'garden', 'volcano', 'orange', 'elephant', 'star', 'violin', 'egg', 'pencil', 'forest', 'lamp', 'island', 'potato', 'happy', 'toilet', 'shell'];
Edit: I got it in 18 guesses
My own 74 year old surviving parent would never be able to get them selves to even try, as they have spent most of their lives telling reiterating a mantra about how little they know about technology.
It has been a guiding principle of mine to never do that with anything, after seeing the effect it has had on her.
import requests
url = 'https://grandmasword.com/dictionary.js'
response = requests.get(url)
lines = response.text.split('\n')[2:]
exec('\n'.join(lines))
def binary_search(dictionary):
while len(dictionary) > 1:
mid_index = len(dictionary) // 2
mid_word = dictionary[mid_index]
print(f"Guess this middle word: {mid_word}")
user_input = input("Did grandma say her word is before or after? (type b or a)").strip().lower()
dictionary = dictionary[:mid_index] if user_input == "b" else dictionary[mid_index + 1:]
print(f"Grannys word: {dictionary[0]}" if dictionary else "No words left in the dictionary.")
binary_search(dictionary)
Solved in 18 guesses!
Share score
Thank you for visiting my website. There'll be a new word everyday just like Wordle. Kind regards, Eleanor
Hmmm...
Now trolling here
https://www.reddit.com/r/programming/comments/1enuhw5/commen...