Wordle Lovers - Play the NYT Daily Game

  • Thread starter Thread starter fresh_42
  • Start date Start date
  • Tags Tags
    Game
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
8,780 replies · 460K views
gmax137 said:
Wordle 1,176 6/6

⬜⬜⬜⬜🟨
⬜🟨⬜⬜🟩
🟨⬜⬜🟨🟩
⬜🟨⬜🟩🟩
🟩⬜⬜🟩🟩
🟩🟩🟩🟩🟩

Ah, so I wasn’t completely alone. This comforts me a little. :smile:
 
Physics news on Phys.org
sbrothy said:
Ah, so I wasn’t completely alone. This comforts me a little. :smile:
I'm right there with ya, @sbrothy
 
dwarde said:
Wordle 1,176 6/6

⬜🟨⬜⬜🟨
🟨⬜⬜🟩⬜
⬜⬜🟨🟩⬜
⬜⬜⬜🟩🟩
⬜🟨🟨🟩🟩
🟩🟩🟩🟩🟩
Well, you've totally screwed up, our up until now, perfectly flat bell curve.

1725744611867.png


ps. Your pattern reminds me of pole dancing.
 
Wordle 1,176 5/6

β¬›β¬›β¬›β¬›πŸŸ¨
β¬›πŸŸ¨πŸŸ¨β¬›β¬›
β¬›πŸŸ¨πŸŸ¨πŸŸ¨β¬›
β¬›πŸŸ¨πŸŸ¨πŸŸ©πŸŸ©
🟩🟩🟩🟩🟩

I forgot to use my "ignore previous answers" option with my program. If I did, my suggested second guess would have been different and I would have got it in 3. :mad::H
 
jack action said:
Wordle 1,176 5/6

β¬›β¬›β¬›β¬›πŸŸ¨
β¬›πŸŸ¨πŸŸ¨β¬›β¬›
β¬›πŸŸ¨πŸŸ¨πŸŸ¨β¬›
β¬›πŸŸ¨πŸŸ¨πŸŸ©πŸŸ©
🟩🟩🟩🟩🟩

I forgot to use my "ignore previous answers" option with my program. If I did, my suggested second guess would have been different and I would have got it in 3. :mad::H
Wait just a dang minute… So you do use a program of sorts? Or am I not to take that literally as in β€œcomputer program”?

:biggrin:
 
Orodruin said:
Look at that, we have the same 3rd and 4th guesses …
Well I guess the 4th is hardly a big surprise if that’s where we both β€œguessed” it. :smile:

EDIT: Added quotation marks around β€œguessed”. :biggrin:
 
OmCheeto said:
Well, you've totally screwed up, our up until now, perfectly flat bell curve.

View attachment 350927

ps. Your pattern reminds me of pole dancing.
Incidentally, isn’t IQ plotted on a bell curve? Just an observation. :smile:
 
sbrothy said:
Wait just a dang minute… So you do use a program of sorts? Or am I not to take that literally as in β€œcomputer program”?

:biggrin:
Yes, I set myself a new challenge by building my own computer program to solve the puzzle. I mentioned my progress and referred to it since then a few times:

https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7105113
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7105129
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7105393
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7105519
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7106040
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7106419
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7107138
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7107860
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7108148
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7108161
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7108535
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7109958
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7109977
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7110482
 
jack action said:
Yes, I set myself a new challenge by building my own computer program to solve the puzzle. I mentioned my progress and referred to it since then a few times:

https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7105113
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7105129
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7105393
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7105519
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7106040
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7106419
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7107138
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7107860
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7108148
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7108161
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7108535
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7109958
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7109977
https://www.physicsforums.com/threads/wordle-lovers-play-the-nyt-daily-game.1016903/post-7110482
Hah! So I’m not the only one. Although my solution might be a little more brute forcy. :smile:

EDIT: And messy. Don’t forget messy. :biggrin:
 
Man we are a sorry bunch of nerds, huh? o0)
 
jack action said:
Yes, I set myself a new challenge by building my own computer program to solve the puzzle. I mentioned my progress and referred to it since then a few times: […]
Yeah and sorry. I just never took it literally as in β€œprogram” program. I was thinking more along some Excel-sheet with some minimalistic BASIC thrown in for good mesure but that is not what you meant is it?
 
Wordle 1.178 4/6*

πŸŸ¨β¬›β¬›πŸŸ¨πŸŸ¨
β¬›πŸŸ¨πŸŸ¨β¬›πŸŸ©
β¬›πŸŸ©β¬›πŸŸ©πŸŸ©
🟩🟩🟩🟩🟩

3AFE500A-13EE-40FE-8971-D4D290507674.png

Oops, made a typo. And then it really refused to cooperate. Sincerely hope I didn’t ef it up for anyone.
 
Wordle 1,178 2/6

πŸŸ¨β¬›πŸŸ¨β¬›πŸŸ¨ [TREAD] 4 left - DEBIT DEITY DETOX ETUDE
🟩🟩🟩🟩🟩 [DEBIT]

sbrothy said:
Yeah and sorry. I just never took it literally as in β€œprogram” program. I was thinking more along some Excel-sheet with some minimalistic BASIC thrown in for good mesure but that is not what you meant is it?
A simple program I wrote in Bash (I replaced wget with _wget_ such that PF accepted it):
Bash:
#!/bin/bash
#
# arguments:
#
# none -> will get official Wordle past answers (once a day) AND give a seed word from the possible answers
#
# -o -> official Wordle: will consider past answers
#
# w-o+r*d-s- -> include hints from 'words':
#    '-': previous letter not included
#    '+': previous letter at the right place
#    '*': previous letter included but not at the right place
#
#    include as many words as necessary.
#
# Example:
#
# - wordle.sh
# - wordle.sh c-i-g-a*r*
# - wordle.sh -o c-i-g-a*r*
# - wordle.sh c-i-g-a*r* a*p-a*r+t-
# - wordle.sh -o c-i-g-a*r* a*p-a*r+t-
#


if [ $# = 0 ]
then
    fileDate=$(
        if [ -f past-answers.html ]
        then
            echo $(date -r past-answers.html | sed -E 's/^(([^ ]+ ){4}).+/\1/')
        else
            echo ''
            echo '' > past-answers.html
        fi
    )
    today=$(date | sed -E 's/^(([^ ]+ ){4}).+/\1/')
   
    if [ "$fileDate" != "$today" ]
    then
        _wget_ -q -O past-answers.html https://www.fiveforks.com/wordle/
    fi
   
    xmllint --html --xpath "//div[@id='vlist']" past-answers.html 2> /dev/null | sed -E 's/<[^>]+>//g' | sed -E 's/^(.{5}).+/\1/g' | sed -e '1,2d' | tr A-Z a-z > past-answers.txt
   
    comm -13 <(sort past-answers.txt) <(sort answerlist.txt) > futureanswerlist.txt
   
    shuf -n 1 futureanswerlist.txt
    exit
fi

FIRST=''
SECOND=''
THIRD=''
FOURTH=''
FIFTH=''

SOMEWHERE=''

NOT_FIRST=''
NOT_SECOND=''
NOT_THIRD=''
NOT_FOURTH=''
NOT_FIFTH=''

NOWHERE=''
future=''

for word in "$@"
do
    if [ $word = '-o' ]
    then
        future='future'
    else
        echo $word
        for ((i=0; i<${#word}; i+=2))
        do
            j=$((i+1))
       
            if [ "${word:j:1}" = '-' ]
            then
                NOWHERE="$NOWHERE${word:i:1}"
            elif [ "${word:j:1}" = '+' ]
            then
                case $i in
                    0)
                        FIRST="${word:i:1}"
                        ;;
                    2)
                        SECOND="${word:i:1}"
                        ;;
                    4)
                        THIRD="${word:i:1}"
                        ;;
                    6)
                        FOURTH="${word:i:1}"
                        ;;
                    8)
                        FIFTH="${word:i:1}"
                        ;;
                esac
            elif [ "${word:j:1}" = '*' ]
            then
                SOMEWHERE="$SOMEWHERE${word:i:1}"
                case $i in
                    0)
                        NOT_FIRST="$NOT_FIRST${word:i:1}"
                        ;;
                    2)
                        NOT_SECOND="$NOT_SECOND${word:i:1}"
                        ;;
                    4)
                        NOT_THIRD="$NOT_THIRD${word:i:1}"
                        ;;
                    6)
                        NOT_FOURTH="$NOT_FOURTH${word:i:1}"
                        ;;
                    8)
                        NOT_FIFTH="$NOT_FIFTH${word:i:1}"
                        ;;
                esac
            fi
        done
    fi
done

function set_unique {
    SET=$1
    TEMP=''

    for letters in "${SET[@]}"
   
    do
        declare -A char_count

        for ((i=0; i<${#letters}; i++))
        do
            char=${letters:i:1}
            char_count["$char"]=1
        done

        for char in "${!char_count[@]}"
        do
            TEMP=$TEMP$char
        done

        unset char_count
    done
    echo $TEMP
}

SOMEWHERE=$(set_unique "$SOMEWHERE")
NOWHERE=$(set_unique "$NOWHERE")
NOT_FIRST=$(set_unique "$NOT_FIRST")
NOT_SECOND=$(set_unique "$NOT_SECOND")
NOT_THIRD=$(set_unique "$NOT_THIRD")
NOT_FOURTH=$(set_unique "$NOT_FOURTH")
NOT_FIFTH=$(set_unique "$NOT_FIFTH")

echo $FIRST '-' $SECOND '-' $THIRD '-' $FOURTH '-' $FIFTH
echo $SOMEWHERE
echo $NOT_FIRST '-' $NOT_SECOND '-' $NOT_THIRD '-' $NOT_FOURTH '-' $NOT_FIFTH
echo $NOWHERE
echo '-----'


#---------------------#

somewhere=''
if [ $SOMEWHERE ]
then
    for ((i=0; i<${#SOMEWHERE}; i++))
    do
        somewhere="$somewhere(?=.*${SOMEWHERE:i:1}.*)"
    done
    for ((i=0; i<${#NOT_FIRST}; i++))
    do
        somewhere="$somewhere(?=[^${NOT_FIRST:i:1}].{4})"
    done
    for ((i=0; i<${#NOT_SECOND}; i++))
    do
        somewhere="$somewhere(?=.[^${NOT_SECOND:i:1}].{3})"
    done
    for ((i=0; i<${#NOT_THIRD}; i++))
    do
        somewhere="$somewhere(?=..[^${NOT_THIRD:i:1}]..)"
    done
    for ((i=0; i<${#NOT_FOURTH}; i++))
    do
        somewhere="$somewhere(?=.{3}[^${NOT_FOURTH:i:1}].)"
    done
    for ((i=0; i<${#NOT_FIFTH}; i++))
    do
        somewhere="$somewhere(?=.{4}[^${NOT_FIFTH:i:1}])"
    done
fi

if [ $FIRST ]
then
    first=$FIRST
elif [ $NOWHERE ]
then
    first="[^$NOWHERE]"
else
    first="."
fi

if [ $SECOND ]
then
    second=$SECOND
elif [ $NOWHERE ]
then
    second="[^$NOWHERE]"
else
    second="."
fi

if [ $THIRD ]
then
    third=$THIRD
elif [ $NOWHERE ]
then
    third="[^$NOWHERE]"
else
    third="."
fi

if [ $FOURTH ]
then
    fourth=$FOURTH
elif [ $NOWHERE ]
then
    fourth="[^$NOWHERE]"
else
    fourth="."
fi

if [ $FIFTH ]
then
    fifth=$FIFTH
elif [ $NOWHERE ]
then
    fifth="[^$NOWHERE]"
else
    fifth="."
fi

grep -P "$somewhere$first$second$third$fourth$fifth" ${future}answerlist.txt > possible-answers.txt

cat possible-answers.txt | wc -l
cat possible-answers.txt | head -n20
echo "-----"

DONE="$SOMEWHERE$NOWHERE$FIRST$SECOND$THIRD$FOURTH$FIFTH"

sed "s/[$DONE]//g" possible-answers.txt > possible-answers-letters.txt

ALPHABET="abcdefghijklmnopqrstuvwxyz"

echo $ALPHABET | sed "s/[$DONE]//g" | grep -o . > remaining-letters.txt

mapfile -t POSSIBLE < possible-answers-letters.txt
mapfile -t REMAINING < remaining-letters.txt

declare -A count

for ((i=0; i<${#REMAINING}; i++))
do
    char=${REMAINING:i:1}
    count["$char"]=0
done

for remaining in "${POSSIBLE[@]}"
do
    declare -A char_count

    for ((i=0; i<${#remaining}; i++))
    do
        char=${remaining:i:1}
        char_count["$char"]=1
    done

    for char in "${!char_count[@]}"
    do
        count["$char"]=$((count["$char"] + 1))
    done

    unset char_count
done

for char in "${!count[@]}"
do
    if [ ${count["$char"]} = 0 ]; then unset count["$char"]; fi
done

LENGTH=${#count[@]}
if [ $LENGTH -gt 5 ]; then LENGTH=5; fi


NEW_LETTERS=$(
for char in "${!count[@]}"
do
    echo $char '-' ${count["$char"]}
done |
sort -rn -k3 |
head -n$LENGTH |
sed -E "s/(.).+/\1/" |
tr -d "\n"
)

for ((i=0; i<${#NEW_LETTERS}; i++))
do
    new_letters="$new_letters(?=.*${NEW_LETTERS:i:1}.*)"
done

NEXT=$(grep -P "$new_letters....." possible-answers.txt | head -n10)
if [[ ! $NEXT ]]
then
    NEXT=$(grep -P "$new_letters....." ${future}answerlist.txt | head -n10)
fi
if [[ ! $NEXT ]]
then
    NEXT=$(grep -P "$new_letters....." wordlist.txt | head -n10)
fi

if [[ $NEXT ]]
then
    echo $NEXT
    exit
else
    LENGTH=$(( $LENGTH - 1 ))

    NEW_LETTERS=$(
    for char in "${!count[@]}"
    do
        echo $char '-' ${count["$char"]}
    done |
    sort -rn -k3 |
    head -n$LENGTH |
    sed -E "s/(.).+/\1/" |
    tr -d "\n"
    )

    new_letters=''

    for ((i=0; i<${#NEW_LETTERS}; i++))
    do
        new_letters="$new_letters(?=.*${NEW_LETTERS:i:1}.*)"
    done

    NEXT=$(grep -P "$new_letters....." possible-answers.txt | head -n10)
    if [[ ! $NEXT ]]
    then
        NEXT=$(grep -P "$new_letters....." ${future}answerlist.txt | head -n10)
    fi
    if [[ ! $NEXT ]]
    then
        NEXT=$(grep -P "$new_letters....." wordlist.txt | head -n10)
    fi
fi

if [[ $NEXT ]]
then
    echo $NEXT
    exit
else
    LENGTH=$(( $LENGTH - 1 ))

    NEW_LETTERS=$(
    for char in "${!count[@]}"
    do
        echo $char '-' ${count["$char"]}
    done |
    sort -rn -k3 |
    head -n$LENGTH |
    sed -E "s/(.).+/\1/" |
    tr -d "\n"
    )

    new_letters=''

    for ((i=0; i<${#NEW_LETTERS}; i++))
    do
        new_letters="$new_letters(?=.*${NEW_LETTERS:i:1}.*)"
    done

    NEXT=$(grep -P "$new_letters....." possible-answers.txt | head -n10)
    if [[ ! $NEXT ]]
    then
        NEXT=$(grep -P "$new_letters....." ${future}answerlist.txt | head -n10)
    fi
    if [[ ! $NEXT ]]
    then
        NEXT=$(grep -P "$new_letters....." wordlist.txt | head -n10)
    fi
fi

if [[ $NEXT ]]
then
    echo $NEXT
    exit
else
    LENGTH=$(( $LENGTH - 1 ))

    NEW_LETTERS=$(
    for char in "${!count[@]}"
    do
        echo $char '-' ${count["$char"]}
    done |
    sort -rn -k3 |
    head -n$LENGTH |
    sed -E "s/(.).+/\1/" |
    tr -d "\n"
    )

    new_letters=''

    for ((i=0; i<${#NEW_LETTERS}; i++))
    do
        new_letters="$new_letters(?=.*${NEW_LETTERS:i:1}.*)"
    done

    NEXT=$(grep -P "$new_letters....." possible-answers.txt | head -n10)
    if [[ ! $NEXT ]]
    then
        NEXT=$(grep -P "$new_letters....." ${future}answerlist.txt | head -n10)
    fi
    if [[ ! $NEXT ]]
    then
        NEXT=$(grep -P "$new_letters....." wordlist.txt | head -n10)
    fi
fi

if [[ $NEXT ]]
then
    echo $NEXT
    exit
else
    LENGTH=$(( $LENGTH - 1 ))

    NEW_LETTERS=$(
    for char in "${!count[@]}"
    do
        echo $char '-' ${count["$char"]}
    done |
    sort -rn -k3 |
    head -n$LENGTH |
    sed -E "s/(.).+/\1/" |
    tr -d "\n"
    )

    new_letters=''

    for ((i=0; i<${#NEW_LETTERS}; i++))
    do
        new_letters="$new_letters(?=.*${NEW_LETTERS:i:1}.*)"
    done

    NEXT=$(grep -P "$new_letters....." possible-answers.txt | head -n10)
    if [[ ! $NEXT ]]
    then
        NEXT=$(grep -P "$new_letters....." ${future}answerlist.txt | head -n10)
    fi
    if [[ ! $NEXT ]]
    then
        NEXT=$(grep -P "$new_letters....." wordlist.txt | head -n10)
    fi

    echo $NEXT
    exit
fi
to be used together with the files "answerlist.txt" (all possible answers) and "wordlist.txt" (all possible words that can be used).
 
Wordle 1,178 3/6

⬜⬜⬜⬜⬜
⬜⬜🟨⬜🟨
🟩🟩🟩🟩🟩

My program is to stare at the unused letters. It is a buggy program but sometimes it works!
 
  • Haha
Likes   Reactions: edwardII and OmCheeto
Wordle 1,179 5/6*

β¬›πŸŸ¨β¬›β¬›πŸŸ¨
β¬›β¬›πŸŸ¨πŸŸ©πŸŸ¨
πŸŸ©πŸŸ©β¬›πŸŸ©πŸŸ©
πŸŸ©πŸŸ©β¬›πŸŸ©πŸŸ©
🟩🟩🟩🟩🟩

Ech.

1725921745077.png

Feh. Next time I'm using the program!
:biggrin:
 
Never really considered BASH simple. Or rather I consider it counterintuitive. I prefer C/C++ or even assembler! But sure, the power of the CLI! Pipe, man, apropos, less, find, regex,awk, sed... Once you feel just a little at home going back to that other OS becomes downright emasculating.

When I use BASH it ends up looking like this:

Code:
#!/bin/bash


#######################################################################
# Perform cleanup
#######################################################################
cleanup=0
echo
read -rsn1 -t 5 -p $'\e[93;5mAbout to perform cleanup. Press any key to skip in the next 3 seconds...\033[0m'
if [ ! $? -eq 0 ]
then
    cleanup=1
else
    echo
    if [ -f ./pch.h.gch ]
    then
        read -rsn1 -t 5 -p $'\e[93;5mDo you want to keep the precompiled header (Y/n)...\033[0m' key
        if [ $? -neq 0 ]
        then
            case $key in
                n|N)
                    cleanup=1           
                ;;
                *)
                ;;
            esac
        fi
    fi
fi

if [ ! $cleanup -eq 0 ]
then
    echo
    echo $'\e[33mPerforming cleanup...\e[0m'
    echo
    ./clean.sh
    echo   
else
    echo
    echo $'\e[33mSkipping cleanup...\e[0m'
    echo
fi
           



#######################################################################
# Precompiled header
#######################################################################
echo
read -rsn1 -t 5 -p $'\e[93;5mAbout to precompile header pch.h. Press any key to skip in the next 3 seconds...\033[0m'
if [ $? -eq 0 ]
then
    echo
    echo $'\e[33mSkipping building precompiled header...\e[0m'
    echo
else
    echo
    echo $'\e[33mBuilding precompiled header...\e[0m'
    echo   
    g++ -H -v -std=gnu++2b -Wall -Wextra -fmax-errors=3 -O0 -fdiagnostics-color=always -x c++-header -c pch.h -o pch.h.gch
    echo

    if [[ $? -ne 0 ]]
    then
        echo   
        echo $'\e[31mError creating precompiled header.\e[0m'
        echo       
        exit 1
    else
        echo   
        echo $'\e[32mPrecompiled header successfully created.\e[0m'
        echo       
    fi
fi

if ! [ -f ./pch.h.gch ]; then
  echo
  echo $'\e[31mPrecompiled header not found. Stop.\033[0m'
  echo 
  exit 1;
fi


#######################################################################
# Build main executable
#######################################################################
echo
echo "Building main executable..."
echo
read -rsn1 -t 3 -p $'\e[93;5mAbout to build main executable. Press any key to skip in the next 3 seconds...\033[0m'
if [ $? -eq 0 ]
then
    echo
    echo $'\e[33mSkipping...\e[0m'
    echo
else
    echo
    echo $'\e[33mBuilding main executable...\e[0m'
    echo   
    g++ -H -v -std=gnu++2b -fdiagnostics-show-location=every-line -fdiagnostics-color=always -Wall -Wextra -fmax-errors=3 -O0 -o main -include pch.h main.cpp -L/usr/lib/x86_64-linux-gnu/cmake -lboost_filesystem -lboost_regex -lfmt
    echo

    if [[ $? -ne 0 ]]
    then
        echo   
        echo $'\e[31mError compiling main executable.\e[0m'
        echo       
        exit 1
    fi

    echo   
    echo $'\e[32mSuccess.\e[0m'
    echo       
fi

if ! [ -f ./main ]; then
  echo
  echo $'\e[31mmain not created. Stop.\033[0m'
  echo 
  exit 1;
fi

echo
echo "Done."
echo
exit 0
 
Last edited: