
I also got a list of their co-ordinates.ħ. I ran the algorithm and got the list of possible words.Ħ. After getting the list of letters, I just converted it to a 4×4 grid.ĥ. I also removed the points of the letter in that image so the image would have low noise.Ĥ.

So what I did was, create a new image with the 16 boxes together with no space between the boxes, it was just all orange. For just a single letter, Tesseract JS had a hard time figuring a few characters out. I used Tesseract JS to get the characters being used. For the other edge, do the same, just vertically. Read the color of the screen pixel by pixel horizontally and look for 4 lines of orange(or whatever color the letter boxes are) with similar length. Use whatever feature you want to get a screenshot.Ģ. Move the cursor to those co-ordinates, simulating a drag.ġ. Get a list of all possible words with their x, y co-ordinaes in the screen.ħ. I used an android emulator, genymotion, to get the game running on my laptop.Ĥ. Since a lot of searches have to be performed, we have used a data structure better suited for string searching: Tries.Īfter all the basic algorithm was sorted out, the only things left to do were to implement it for the actual game. So for every word that we create using DFS, we check if the word is present in the word list. This gives a higher probability of the word being in the word list used by the game. I’ve actually got two word lists and created another one from those by using only the common words. We also maintain a word list of all possible words to check if the words that we form are valid or not. This sounds like a simple DFS traversal in this 4×4 grid and, indeed, it is You keep adding the letters till all the closest letters are used or there is no such word. We get a 4×4 grid of letters which can be used to form words by joining the closest letters to get a string. So as I struggled to get higher percentiles and actually averaged a measly 50%, I thought to create an autoplayer for the game. The highest percentile rating that I’ve gotten is about 85%, I believe. You form words and gain points and compete against people from around the world. So, I’ve recently been playing a fun, addictive game called wordament on my mobile where the objective is to form words from a matrix of letters.
