wordle in GP!

Post your nifty GP projects here!

Moderator: MSandro

Post Reply
manyone
Posts: 40
Joined: Nov 5th, '17, 07:56

wordle in GP!

Post by manyone » Feb 4th, '22, 06:58

gpWordle!
(UPDATE: now features dictionary lookup to validate guess words)
i just finished writing my version of the hottest game on the web, wordle - written in GP. it features a target word bank of 366 words and it works (well, almost) like the original wordle, except it doesn't use a visual keyboard (you have to type) but it gives feedback on letters used and not yet used.
it has its own 5700-word dictionary (https://www-cs-faculty.stanford.edu/~kn ... -words.txt) searchable by binary search for validating guess words. the target words were extracted randomly from this dictionary.
just press GO to play.
gp_wordle.jpg
and here's the program.
gpWordle.gpp
(99.77 KiB) Downloaded 257 times
i had to planned to use a dictionary api to validate words (sample call: https://api.dictionaryapi.dev/api/v2/entries/en/sugar)
but apparently GP cannot handle making calls to sites starting wth https! so i just built a dictionary that is searchable by binary search!

meanwhile, feel free to remix this project and enjoy

manyone
Posts: 40
Joined: Nov 5th, '17, 07:56

Re: wordle in GP!

Post by manyone » Feb 17th, '22, 05:10

i finally added an online dictionary to gpWordle. Thanks to @Calloway who showed me how to call a web api even if the url starts with https:
it is now available as a choice at the beginning of the game.
gp_wordle_dict.jpg
gp_wordle_dict.jpg (6.62 KiB) Viewed 5930 times
however, after playing with it for a few games, the online dictionary isn't exceptioanally fast. the wait is sometimes very perceptible, depending on time of day. however you can always elect to use the built in dictionary - it's not as large than the on-line one (it has less words), but it's always there.

here's the new version.
gpWordle.gpp
(109.01 KiB) Downloaded 250 times
enjoy.

manyone
Posts: 40
Joined: Nov 5th, '17, 07:56

Re: wordle in GP!

Post by manyone » Feb 27th, '22, 07:11

i fixed a bug. if the target word was LADLE and the guess was EAGLE, it marked the first E as yellow but did not mark the last E as green! now it marks the last E as green but the first E as unused.
this version fixes cases like these.
gpWordle.gpp
(106.88 KiB) Downloaded 502 times

Post Reply