Being my usual helpful wee self, I was about to proffer this worked example
by 3Blue1Brown on calculating the best first guess:

[1] https://www.youtube.com/watch?v=v68zYyaEmEA

when 3Blue1Brown posted a retraction:

[2] https://www.youtube.com/watch?v=fRed0Xmc2Wg

He'd used the wrong hashing algorithm (if we may call it that). The video
details his error plus the correction, and reruns the entropy calculations.


AFAICS Raul has taken the necessary first step in bringing some sanity to
this topic. A universally-agreed acceptance test for what he calls *wrdcmp*.


Could some kind benefactor of humanity please expand Raul's list of asserts
to reconcile

   - the original Wordle source code, e.g. at:
   https://www.wordleunlimited.com
   - 3Blue1Brown's retraction, [2] above
   - https://rosettacode.org/wiki/Wordle_comparison -which links:
   - en.wikipedia.org/wiki/Wordle#Gameplay


WIBNI (wouldn't-it-be-nice-if) the acceptance test could be run against all
the submissions to RosettaCode.


A version of the acceptance test for Mastermind would be nice as well,
since there are non-isomorphic variants of that too.


Importance: medium to high. Both Mastermind and Wordle are excellent
paradigms for teaching Information Theory, in a form applicable to IT
rather than to Bayesian statistics.


What do I mean by that? The IT world needs a formulation of entropy that
avoids relying on the notion of probability. Moreover, Bayes Rule and
treatments using it are vastly simplified when expressed in bits instead of
probability ratios.

On Wed, 16 Feb 2022 at 22:23, Raul Miller <rauldmil...@gmail.com> wrote:

> On Wed, Feb 16, 2022 at 4:57 PM 'Pascal Jasmin' via Programming
> <programm...@jsoftware.com> wrote:
> > the score funtion is what you are looking for.  is super elegant, but
> does not meet the spec of scoring 0 instead of 1 when there are extra
> copies of a candidate letter above and beyond the count in the secret.  The
> elegance.
> >
> > score =: e.~ + =
>
> It's viable to solve wordle using just counts of exact and inexact
> matches (without knowing their positions nor the letters). The
> approach is to start with a dictionary of possibilities and exclude
> everything shown to be impossible.
>
> Being able to select exact and inexact letter matches, like your
> approach here, is also viable. That same approach works, though the
> details of which dictionary words match or do not match is a bit
> different.
>
> Having the right dictionary is probably the most important facet of
> implementing a wordle solver.
>
> That said, I guess should include my current best effort:
>
> wrdcmp=: {{
>   yw=. ;(] , ({.~1<.#)@-.)&.>/(<@I.y=/~x#~y~:x),<I.x=y
>   2 (I.x=y)} 1 yw} (#y)#0
> }}
>
> assert 1 1 2 0 0-: 'allow' wrdcmp 'lolly'
> assert 0 0 2 2 2-: 'bully' wrdcmp 'lolly'
> assert 0 0 0 1 0-: 'robin' wrdcmp 'alert'
> assert 0 2 1 2 0-: 'robin' wrdcmp 'sonic'
> assert 2 2 2 2 2-: 'robin' wrdcmp 'robin'
> assert 0 0 2 1 0-: 'mamma' wrdcmp 'nomad'
> assert 0 1 2 0 0-: 'nomad' wrdcmp 'mamma'
>
> This is a bit more elaborate than your 'score' but it's not too bad.
>
> Thanks,
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to