Wordle is a game by Josh Wardle in which you try to guess a 5-letter word in at most six attempts. After each guess, the letters which are not in the word are highlighted in grey, the letters which are in the word, but are in the wrong place are highlighted in yellow, and the letters which are in the correct spot in the word are highlighted green. If a guess contains repeated letters, but there is only one instance of that letter in the word, the second instance of the letter is marked grey.
I am wondering what perfect Wordle play looks like. One can easily gain access to a day's answer by digging around the source of the webpage, which also allows one to reduce the difficulty of the game significantly by considerations on the game's dictionary of solutions. Because the the site imposes more limited strategies in this way, I am interested in the strategy a computer would execute for the general Wordle game as defined by the rules listed above. I am considering a strategy to be optimal if it minimizes guesses needed to find the answer on average, without any knowledge of the word beforehand. I am also not necessarily looking for a strategy that is executable by a human, rather I would like a series of steps that can be taken by a theoretical perfect player to minimize guesses.
For my own play, I have found that (in a certain Scrabble dictionary) the most common letters in 5-letter words are S, E, A, O, and R. I usually guess 'AROSE' as my first guess (although AEROS and SOARE work just as well) which seems to give the best chance of finding multiple yellow and green letters. If 'AROSE' is all grey, this seems to narrow the possible answers by a considerable amount, but if any of the letters are correct it seems that it would not actually that helpful for a perfect player. Therefore, I think that an actual perfect strategy would aim to halve the solution space with every guess, but I don't know if this is correct or how I would prove its correctness. I am also unsure how I would algorithmically determine the best word for executing this strategy at each step.
There is also the consideration of Hard Mode, a toggle on the website that forces the player to use letters in future guesses which have been confirmed as yellow or green. I imagine that a strategy for Hard Mode would look considerably different from a normal strategy, so I would be interested in answers regarding this as well as the normal mode.