# Worbot: creating a successful Wordle solver

My Wordle solver, Worbot, has the following statistical accomplishments:

It has missed the word entirely only twice. Ignore the current streak 0 because my program doesn’t actually track that. If you average it out, it comes to about 3.9. It plays entirely in hard mode. Here’s how I created it.

First, I scraped the list of target words from the original Wordle website (before the Times bought it). By target words, I mean words that can actually appear as the winning word. There are many valid words that are accepted as guesses, but never used as the target. I computed the frequency of each letter in each of the five positions in the target words. In case you want to know what they are, here are the top few.

1. SAAEE (most frequent in each position)
2. COINY (2nd most frequent)
3. BROST (3rd)

Then I ran the target list and selected 64 words that all scored high in the frequency of each letter, e.g. CRONE, SAINT.  I already had data from Google Nwords about the frequency of various words in English. I have word lists, including a 5-letter list, ordering the words by frequency. The top scorers are WHICH, THERE, THEIR, and WOULD. I wanted these because I knew that Wordle used mostly common words as target words. That’s the data I needed.

Now, to the logic of the program. For the first guess, it randomly selects one of those 64 words. It receives the usual feedback of gray, yellow and green. After that the program ignores the target list and refers only to my list of 5-letter words in frequency order. That list includes many words that are not possible target words, so the program doesn’t “cheat.”  It simply tests each word for conflicts and if it hits one, moves on to the next word. At each level, it uses the colors from all the previous guess results to cull out bad words.

For example, suppose the correct word is LINEN and Worbot guesses SAINT for its first guess. The I and N would be yellow, the rest gray. For the second guess, it would start with WHICH, but reject it because it doesn’t have an N. THERE would be skipped because it has a T and doesn’t have an N, and so forth. The first word it would come to with an I and an N is AGAIN, but that would be rejected because of the A, which was gray earlier. The first word that has no conflicts is GIVEN, the 65th word on the frequency list. This would produce green for the I, E, and N. And so on. If you are writing a solver, or just want to improve your guessing, I suggest you consider using this simple logic. BTW – Worbot has never gotten the word on its first try, and neither have I.

# The Hardy Boys books are now public domain!

I just discovered that Project Gutenberg is now publishing some of the Hardy Boys books for free download. I absolutely devoured those books when I was a kid. If you want to check them out, here’s a link to one of them: The House on the Cliff.

# Parable of the Sower by Octavia E. Butler

Lauren is a tall, strong, black teenager in Southern California. She watches the apocalypse, or, more accurately, slowpocalypse, engulf her area. Life has deteriorated to where thievery, arson, scavenging and bribery have become the overwhelming lifestyle. She has devised a plan to escape it and has concocted a religion, Earthseed, to provide philosophical underpinning for it. The book is classified as science fiction, rightfully so, but there are no aliens, monsters, or space travel. It is somewhat like The Road by Cormac McCarthy, but much better written and, at times at least, uplifting.

The book is slow to really get going. Her survival plan doesn’t really start until about halfway through the book, but it is imaginative and evocative at that point. I found it interesting enough, but also disliked the doomsaying assumptions made at the outset. In the book, virtually no one is to be trusted and government, police and all forms of power are corrupt and have abandoned the people. In my experience, when hard times or disasters hit, people come together and help each other out and so do our state, local, and federal authorities as well as non-profits. They don’t kill each other and set fire to a house in order to pillage their neighbors’ belongings. This kind of fiction can feed the paranoia of the survivalists and preppers. The book is a decent read, but just remember, it is fiction.

View all my reviews

# Misconceptions

I thought I’d clear up a few misconceptions.

This being tax time, I know of one common misconception. Some people think that if they get a little extra income that pushes them into the next higher bracket, they actually lose money. There are some very specialized taxpayer situations where this could be true; for example, if someone qualifies for a special deduction or benefit based on low income and they now earn more than the cutoff. But for the vast majority of taxpayers, the new, higher tax bracket applies only to the extra money you earned over the limit. All the money you earned lower than that limit is taxed exactly as before. In simple terms, if you earn more, you’re better off.

Another misconception that surprised me is about the lottery. A friend didn’t understand why anyone would buy a \$10 lottery ticket instead of a \$2 ticket since he knew every ticket has the same chance of winning. He thought “ticket” meant a piece of paper. In fact, one ticket is a string of numbers (6 numbers for Mega Millions and Powerball in the United States, \$2 per ticket). It’s possible to have multiple tickets on one piece of paper. A \$10 ticket has five strings of numbers and has five times the chances of winning as a \$2 ticket.

The last misconception is about electric vehicles (EVs). I’ve heard some people say they think EVs are not any better for the environment than gas cars because lithium mining is as destructive as drilling and refining petroleum for gas. I’m not going to argue the point about that because the manufacturing process uses plenty of energy and heavy metals for both types and varies a lot by size and features of the specific cars, but that misses the point. The harm gas cars cause to the environment is primarily the emissions from driving. EVs produce none; gasoline produces a lot and that’s causing climate change. Arguments that power plants that provide the electricity for EVs cause just as many emissions is simply not true, at least not in places where EVs are widely used like California and Norway. Most power there is produced by renewable sources like wind, solar, hydroelectric, and geothermal.

# Lessons in Chemistry by Bonnie Garmus

Lessons in Chemistry by Bonnie Garmus
My rating: 3 of 5 stars

Elizabeth Zott is a brilliant chemist, but this being the 1950s and 60s, and she a woman, she is not allowed to finish her PhD, she is sexually molested, hired at a fraction of the pay of her male colleagues who are anything but brilliant, and in general no one believes she is actually capable of being a scientist since she’s not a man. That’s just for starters. I am very sympathetic to this plot line since my own brilliant mother, who skipped two grades, was date raped in college by a football player, and when she reported it to her sorority mother, was expelled for immorality. Nothing happened to the football player. So, yes, stories like this do happen. The writing style was decent enough.

Having said that, the author lays it on too thick in the book. It’s 350 pages of the same thing, and it becomes very unbelievable very fast. Zott has a child out of wedlock with a fellow chemist and the child is more intelligent that Einstein and Feynman combined. So is her dog Six Thirty. I went to college in the 60s and plenty of women were successfully getting degrees and working in scientific fields. My daughter is a brilliant chemist and chose to leave academia for marriage and motherhood. She wasn’t fired or discriminated against, and she is happy with her choice. So the book just seemed like a diatribe against all men. I felt castigated for my Y chromosome all the way through. Maybe some women feel that way and will get off on this revenge porn of a sort, but I couldn’t make it past halfway. I skipped ahead from there until the end. The ending was unfortunately too predictable and too unbelievable.

View all my reviews

# Merrill Lynch Bank of America fail!

I just wasted over an hour trying to transfer funds from my checking account to my investment account at Merrill Lynch. This used to be easy before Bank of America took over Merrill Lynch. I could go on the Merrill website where I had already set up a relationship between the two accounts. The checking account is at Bank of the West, not Bank of America and pre-existed the B of A takeover.

Now I go through the same steps and get to a page where I fill in the information: i.e. into or out of the Merrill account, the amount, the date (next day). The only other option at that point is to click the button labeled “Continue Transfer.” I click that and get a big red error message saying:

You have exceeded the number of attempts allowed to enter a PIN. For assistance please call contact (sic) the Merrill Lynch Help desk.

At this point a new box appears where the “Continue Transfer” button had been. This box is labeled PIN in bold red. I try to click in it, but the web site has disabled it. This box wasn’t there the first time and I don’t even have a PIN for this. I’m already signed into my account with my regular password.

So I call my Financial Advisor at Merrill and only get voice mail. No one picks up. In the old days, an assistant would pick up if the advisor wasn’t available. I leave a voice mail. No one calls back right away, so I decide to call the Merrill 800 number showing on the web page for assistance. It took four calls. They went like this:

1. A recorded message tells me I’m being recorded and says they have a special offer and asks if I am over 50 (press 1) or not (press 2). I don’t want to hear an offer so I press 0 repeatedly. It hangs up on me.
2. I call again. Same message. This time I press 1. A woman’s voice comes on telling me there’s a special offer of health insurance for seniors. I tell her I’m not interested and I need help with my account, but she keeps talking as I’m trying to talk. Probably a recording, although it didn’t sound like it. This time I hung up.
3. I call again intending to press 2, but a different message comes up, one recorded menu asking what I want to do. I say “transfer funds” and it understands and puts me in a queue for an associate. That takes a few minutes and a very polite woman comes on the phone and I explain all of the above. I’ll skip all the grisly detail, but she clearly didn’t understand what the web page was like or what the problem was; after 27 minutes she finally puts me into an automated system to create a PIN for funds transfer. It asks me to enter my 10-digit account number. The problem with that is I have two account numbers. One is an 8-digit Cash Management Account (CMA) number and the other is the account number on the Bank of America checking account associated with the CMA account. That’s 12 digits. I start entering that number and the system disconnects me.
4. I call again and eventually get through to another polite young lady. I go through the same thing again. This time she gets the point faster and tells me she will set up the PIN so I can transfer directly. First, though, she has to verify me through my phone and texts me a one-time PIN (not something to use for the deposit). I recite it back to her over the phone. Think about how stupid this is. She didn’t simply text it to the number associated with account as shown in her records, but asked me what phone number to text it to. Obviously it was the phone I was talking to her on; that could be anyone giving whatever phone they were calling on. All it proved is that the person calling was on a phone capable of receiving a text. But it turns out she also has to verify my identity through the branch office. At least she had the foresight to ask for my phone number so that if I get cut off, she’ll call me back, which the first woman didn’t do. She tells me she tried two different numbers at my branch and couldn’t get through. She says someone from my branch office will have to call me later and verify my identity. Why not ask me information like my address, routing and account numbers, etc.? I’m calling from the phone associated with the account. I can verify on the phone with a fingerprint. Why not use that? No, the branch has to do it in person. She ends the call. I try again on my computer and notice that this time the website produces a PIN box for me to use on the first try, but of course I still don’t have one. I tried using the one-time PIN she sent me earlier, but it doesn’t work. She had mentioned at some point in the call that they’ve had trouble with some browsers not displaying the web page correctly.

At this point I’d been on the phone for over an hour and the transfer still hasn’t happened. I realize I could have just written a check on the other account and used my Merrill phone app to deposit it in my Merrill account via photographic image. That app has always worked well. One problem with that is I have bad arthritis in my hands and really dislike having to write checks because it is painful. I don’t even like endorsing them because Merrill requires a rather wordy sentence on the back in addition to my signature. Also, that doesn’t work going the other way. My wife is the main user of the Bank of the West account and doesn’t have an app for it and ability to deposit over the phone. The bank may have one, but she refuses to get such a thing. She’s not a fan of tech. Most transfers are from Merrill to Bank of the West, so this transfer system needs to be fixed so I can do it both directions on my desktop computer.

I sit down at my computer and start to write this blog post when I get a phone call from my Merrill Advisor. I should mention at this point that he has always been very responsive and quick to meet my needs. I like him and his service. The problem is with the website and the whole design of the system to allow transfer but fails to give the ladies at the 800 number power and training to take care of things like this. If Merrill Lynch could do it, Bank of America should be able to. There isn’t even a need for a password. I’ve already had to sign in with username and password.

My advisor was unhappy and asked how he could help. I told him in brief form what I’d just gone through and he immediately took whatever steps were necessary to make the transfer happen. As I said, he’s always been responsive. He explained that when I’d called earlier he’d been out of the office driving his assistant to the airport, which is why neither he nor his assistant answered. I take him at his word, but I know that my previous advisor (both pre- and post-B of A takeover) always had someone to take any call that came in. That phone number was never left unmanned. He also said that the “back office” had sent him a message that I’d complained which counts against him as a client complaint. I agreed it was a client complaint but it was really with the website design and the bureaucracy with the back office system. He tells me there is always someone there at the branch and that the back office could have gotten through easily if they’d tried. My advisor was not familiar with what he called the FTS(?) PIN system. Neither am I, and apparently the back office people aren’t either. He said he will have someone see that I get a PIN. By the end of the phone call, it had been over 90 minutes of effort to complete this, and I still don’t have a PIN.

The whole point of associating the other bank account was so that the client can seamlessly make such transfers without the need to contact anyone at the branch or back office. My advisor assures me that he will always take care of me for such things, and I’m sure he will, but I shouldn’t have to call him, not for this. It is inevitable that he will not be available at times, being on vacation or having other clients to take care of, and apparently, his assistant isn’t always, either. That’s the whole reason for a computerized system. Why create it and then make it impossible to use without going through your advisor?