TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reverse engineering Wordle

63 pointsby rreichel03over 3 years ago

19 comments

GycDH6mbover 3 years ago
&gt; It seems like many of the variables are given names that are not descriptive at all to make it a bit more difficult to read.<p>The code is just minimized for prod..<p>The article as written makes it sound like the developer(s) intentionally wrote their code cryptically, whereas minimization for deployment is fairly standard practice
评论 #29908283 未加载
评论 #29913075 未加载
returningfory2over 3 years ago
A word of warning for anyone inspecting the Wordle source code: the answers for each day are stored in a list ordered by day. If you search for today&#x27;s answer, the next word in the list will be tomorrow&#x27;s answer, etc. Be careful not to ruin the fun by seeing tomorrow&#x27;s answer in advance!
评论 #29907915 未加载
评论 #29908410 未加载
sgmooreover 3 years ago
&gt; var Ha = new Date(2021,5,19,0,0,0,0); &gt; My assumption is that this is the launch date for Wordle<p>But not 19th of May 2021, but 20th of June 2021<p>Every time I look as JavaScript, I find a new reason to hate it.
评论 #29908616 未加载
nilsbungerover 3 years ago
I figured that was possible; from the UX it was pretty clear it’s all client side.<p>What I would find cool is derivation of the best strategy at any time. Just like blackjack, there should be a “best” move at all times , and it would be cool to measure yourself against that
评论 #29910582 未加载
评论 #29908451 未加载
评论 #29907677 未加载
qrohlfover 3 years ago
This is an unusual thing to find myself typing in a HN thread, but this could use a spoiler tag, as I did not expect to have <i>tomorrow’s</i> challenge ruined for me by a technical blog post.
评论 #29908943 未加载
评论 #29910962 未加载
dzdtover 3 years ago
I just hope the wordle developers manage to cash in on their going-viral jackpot without losing it to copycats or spoiling the experience for players.
评论 #29909048 未加载
评论 #29908494 未加载
antoniomikaover 3 years ago
I made a little change that allowed setting the day&#x27;s puzzle based on puzzle ID number via a query parameter so you could play previous day&#x27;s puzzles. Here&#x27;s the gist with relevant code block if anyone&#x27;s curious: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;antoniomika&#x2F;5ec4741d309cc829a5bc26a53c4089f3#file-main-db1931a8-js-L14435-L14455" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;antoniomika&#x2F;5ec4741d309cc829a5bc26a5...</a>
primeradicalover 3 years ago
I rebuilt Wordle from scratch using the same word list. There are actually two word lists, one from which they select the answer, and another from which they validate real words. They are just arrays of strings hardcoded in the JS bundle.<p>When you submit a guess, it checks to see if your guess is in either array (or at least that&#x27;s how I implemented it). And just does some relatively simple string comparison.<p>Your progress is just stored in local storage. You can blow your data away by deleting it via dev tools.<p>My version just lets you try again by refreshing, I&#x27;m not storing any data.<p>The viral factor of the original Wordle, IMO, is the share function and the little emoji grid it generates.<p><a href="https:&#x2F;&#x2F;alexmj212.dev&#x2F;word-guess&#x2F;" rel="nofollow">https:&#x2F;&#x2F;alexmj212.dev&#x2F;word-guess&#x2F;</a><p>Source: <a href="https:&#x2F;&#x2F;github.com&#x2F;alexmj212&#x2F;word-guess" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alexmj212&#x2F;word-guess</a>
评论 #29910814 未加载
评论 #29910333 未加载
ericmcerover 3 years ago
Wordle is easy to cheat at. All the validation and past scores are client side, the code and concept is simple, but why would you cheat?<p>No offense to the author but I am kinda confused why someone would even open the inspector and be like: &quot;how is this being done?!&quot;
评论 #29911252 未加载
manceraioover 3 years ago
This website is crashing Chrome on my Xiaomi :&#x2F;
评论 #29908879 未加载
评论 #29909322 未加载
classichasclassover 3 years ago
This was good while my wife and I were in the same time zone: we compared guesses and how we got there. Now that she&#x27;s a day ahead, we can&#x27;t do that right now (we found this out when she accidentally did a spoiler).
评论 #29909045 未加载
评论 #29908054 未加载
ath3ndover 3 years ago
I actually did the same thing a week or so ago, but in a more readable format: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;lc-nyovchev&#x2F;c42f09a48364665da26342598bb7d29f" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;lc-nyovchev&#x2F;c42f09a48364665da2634259...</a><p>And <a href="https:&#x2F;&#x2F;ath3nd.wordpress.com&#x2F;2022&#x2F;01&#x2F;11&#x2F;about-wordle&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ath3nd.wordpress.com&#x2F;2022&#x2F;01&#x2F;11&#x2F;about-wordle&#x2F;</a><p>The idea with the game is to have fun, not to make it impenetrable for techies (in which case a backend would have been nice)
bluesmoonover 3 years ago
Fun times. I remember back in the year 2000, during the dot com craze, there was a company in India that built a clone of &quot;Who wants to be a millionaire&quot;. It was in beta and there was no real cash or prize involved.<p>They had all the answers stored in the source code. I wrote up a quick perl script to play the game and unfortunately left it running overnight, and in the morning there were complaints from other players asking how I&#x27;d reached the top rank so quickly.
评论 #29909056 未加载
anyfactorover 3 years ago
I guess I wasn&#x27;t the only person who tried to reverse engineer wordle because they were stuck on the final try.<p>I thought I would do a programmatic soltion because that was the only win I will be able to get. I did find it interesting that they had all the 5 letter words in the frontend logic.
thavalaiover 3 years ago
I liked this deconstruction of Wordle a lot: <a href="https:&#x2F;&#x2F;bert.org&#x2F;2021&#x2F;11&#x2F;24&#x2F;the-best-starting-word-in-wordle&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bert.org&#x2F;2021&#x2F;11&#x2F;24&#x2F;the-best-starting-word-in-wordle...</a>
lilac1over 3 years ago
I&#x27;m not sure why you&#x27;d want to reverse engineer something that isn&#x27;t trying to hide anything. Just enjoy playing it!<p>I&#x27;ve seen quite a few blogs&#x2F;tools all trying to surf the wave of Wordle.
gizajobover 3 years ago
ROBERT! Your website crashes Chrome on Android. Please fix before reverse-engineering anything else.
sanesharkover 3 years ago
how long before this is ported to IOS and becomes the #1 grossing game? I&#x27;m thinking ketchapp is already on it.
评论 #29907860 未加载
评论 #29907826 未加载
t1ber1usover 3 years ago
This is brilliant