Crossword Auto Solver

Some time ago, I saw a challenge online from the Luxembourgish newspaper RTL. They released a crossword every week, for years. Now their new challenge was to get all the results from the crosswords published to this date to win a nice price. The thing is, there were almost 170 Crosswords, and when I tried to solve one by hand it took me roughly 20 minutes. So I figured there is not a lot of competition if I can gather all the results myself.

Since I am not a linguist or a crossword lover of some sort, but a nerd, I knew I wanted to come up with a way to break the game. So I played around with it to find its weaknesses. One big weakness was that whenever a letter was typed into a case, the game would automatically tell you if that letter was wrong or right. I am not sure if that was intentional but that allowed for a very straightforward brute force attack on the crosswords.

So I went ahead and I wrote a program that took screencaptures, checked the screen for the crossword, figured out which cell to brute force and started to type a letter. The browser then automatically colored the border of the box red if the letter was in an incorrect spot. The program then takes another screenshot and checks if the letter is solved and moves on.

This was quite slow so to save me some time, I started to look for optimizations. One way to get more progress in less time was to not use the alphabetical order of characters to try, but the statistical distribution. This saved me lots of processing time and the list of crosswords solved was growing quickly.

During the development I also found that you could just brute force the cases that compose the solution. But for my own satisfaction, I nonetheless wanted to solve the entire crossword puzzles.

After two evenings of fun “solving” crosswords, I had all the results I needed and handed in my results. I did not win. But it was a lot of fun coming up with my own creative way of solving this challenge.

I did not publish the results, but the code is open source and you can have a look at it if you like using this link to my github repository.

If you also have a repetitive task that you want to automate, feel free to contact me using this email address!