yeh, based on their comment/submission history they're coding with chatgpt and now started claiming it's their grandma learning to code? or something? pretty uncool.
Heh, his sockpuppet (/u/puzzledpenguins) deleted the posts where he claimed this was his favorite game. What I find bizarre is that it would be so easy for him to come up with a reasonable explanation and reply to the reddit/hn comments to make skeptics look like assholes. He just deletes any post where people criticize these shenanigans
Oh that's such a shame, it was so fun! I wonder what this person's end game was. The site is down now. Why didn't they just release a game? I'd love to keep playing it!
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!
textbox.value = guess;
guessWord();
if (document.querySelector(".correct")) {
console.log("Found the word:", guess);
break;
} else if (textbox.placeholder.includes("after")) {
l = m + 1;
} else {
h = m - 1;
}
}
Here's mine in JavaScript, you can paste it in the console.
Thanks! I should have realised that a solution for this could be implemented in JavaScript as well, allowing it to run directly in the web browser. Here is my translation of my earlier Python program to JavaScript:
let lo = 0, hi = dictionary.length - 1
const answer = document.getElementById('guess')
while (document.getElementsByClassName('correct').length === 0) {
const mid = Math.floor(lo + (hi - lo) / 2)
answer.value = dictionary[mid]
guessWord()
if (answer.placeholder.indexOf('after') !== -1) {
lo = mid + 1
} else {
hi = mid - 1
}
}
This solution is quite similar to yours. Thanks for this nice idea!
There is some bug in the sorting, because it sorted “vol” after “volatile” for me. It seems to depend on some previous state, though, because I couldn’t reproduce it in a new window.
It seems the previous guess is always placed either one up or one down from the entry box. So if you're guessing "V" words, then type "apple", then "apple" will show after "vodka". So the list is not getting re-alphabatized.
Right. My word was before "wizard," and later I guessed "yesterday," which is after wizard. It put yesterday adjacent to the entry box, before wizard. Same is true for words before the word. Basically, if I make bad guesses, it doesn't list them in alpha order.
Comments (150) 67 threads
Now trolling here
https://www.reddit.com/r/programming/comments/1enuhw5/commen...
> /* This makes the words flip over like in Wordle. Ask Gary if we can change it to letter by letter like wordle */
Arriving a bit late to the party, but I couldn't resist crafting a quick binary search solution in Python.
Took a total of 17 guesses to find the solution: Thanks for sharing this nice game on a fine Sunday evening! It was fun to play both manually as well as programmatically!const textbox = document.querySelector("input");
}while (l <= h) { const m = Math.floor((l + h) / 2); const guess = dictionary[m]; const textbox = document.querySelector("input"); console.log("Guessing:", guess);
Here's mine in JavaScript, you can paste it in the console.
Edit: See also https://news.ycombinator.com/item?id=41217457.
All comments shown.
Couldn't load more comments. Check your connection and try again.