From cae333e3a178389e0d13c9d15993751535098a3a Mon Sep 17 00:00:00 2001 From: Kelvin Ly Date: Sat, 13 May 2023 08:31:17 -0400 Subject: [PATCH] Add a slight bias towards words that are also valid guesses --- wordle-wasm.htm | 2 +- wordle_opt.wasm | Bin 9601 -> 9770 bytes wordle_opt/src/lib.rs | 7 +++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/wordle-wasm.htm b/wordle-wasm.htm index ef759c3..23cb410 100644 --- a/wordle-wasm.htm +++ b/wordle-wasm.htm @@ -292,6 +292,6 @@ var chosen_words = [];

2. Use "Find best" to choose a word for you or enter in your own choice of word, and press Submit word. Submit this word in Wordle as well

3. Click on the letters of the word to match the results of what was matching according to Wordle. Hit confirm when it matches the colors of the word in Wordle. This will cause the solver to eliminate words that are no longer possible. If there was an error in the color pattern you can hit Back to remove the last confirmed word, and reenter it.

4. Optimally win Wordle.

-

There's a slight discrepancy between this and the original JavaScript version; the original Javascript version includes one extra word, which is probably just an empty line or something like that +

There's a slight discrepancy between this and the original JavaScript version; the original Javascript version includes one extra word, which is probably just an empty line or something like that. This leads to an extra word count in a lot of situations diff --git a/wordle_opt.wasm b/wordle_opt.wasm index fb82d8e2cbe1baa844f3736813f485467e9f1bc5..cadd9d17c3c4cec03f12feb75ddc21f564976a5f 100755 GIT binary patch delta 866 zcmY*XT}YEr7(VaWw{PF}x$WDJ&cAJED`;Y(Q=CRYJBpZ?7kSqY+C&XUTBKkRHH`)t z7}`rjR8$vUtI1EEE-h*mz;9F=>{jn;?+LN4*pX1=eX{8;! zxT;(QJ$KyN3smIQ15iM_?IEn-qAd%BT%-2hnz_ljHN!8+OaxjPjfl#Vn^Q0;(lO4W z+{HNqU9cE0tp&CXEaLhW#biqsu}~L0>TziNkk~ZD(_6@8DnM+a$zgCNS=;Z1Q&{gbW~|~GM&1V{>`r2 zoNTinQdbPkloO_8)KU>q&2t1Lv>F`rtdZ&6-fK{V-@G|+;tk)G{e^5Y!8KAR4XLH&`sF;6Gub>d0ugFW z@EF$;oKQt%E|&$`NpOYwp?i(V6+GszfO$OYKdf#r*YSh@l9taVC5y9{m@4kZ){-CK z!Fb?St%*pG!>k3GcoCWKojlr5HF8dk-4QjlMU4}S;dz>W7y!y4UHw=tQ=SEco? zH`$2^224&&&}Yk|t?X`)F@rhC`bQKs6o2al$|~_eS%du}Av{zq;pehey8;HiHe)+; zRpq+?I&+6Ao`Y`h8yFqy9Y1xZU&rNOhY@dT?%OliI1o?OrJC!T`f(}Pi3>pwS+^WK z;&r(PP7VzZjikl~Hb|pxJYN~cj!=N!Ar)%Cl~6Ul2zlsVzYFc%HjGcl{yy zy%A#=8B~0ISR$+L1-_>Bx+0dm!{!e|-$K;ri_=Ae;jdia;&bM5F{_{pR_JE^nfw9@ zJuhyHtjJ1GGRG1MdxIb$EgCx!lGp>hk_P`#|9__-sqHbV7aFTc%`sCx zX-M8fDZM3WNR7+mfNNym$c{t&m2Go<#!>OIn5E779dzh@!{g4X;f!dM(2Yl`HL1_D z)daVw+MaI=0PJ>PPnr}?gytGoF+}Z636pi~I#A1Ws_9^8tym}kf+`ev@XNH=^o$0Y z4_NQO0hbk?(!J&$>o+6GNcXmy_akw%(sOMtzA6T2Ht<=Z}fYBKm+%?;E0EvV~Tp>&C20 T cur_entropy { + cur_entropy = entropy; + cur_best = self.valid_words[i] as isize; + } + } for i in 0..self.idxs.len() { let entropy = self.calc_entropy(i); if entropy > cur_entropy {