Lexico Bot Strategy

In Lexico there are a finite number of possible moves that you can make on your turn. A perfect bot with a basic strategy would be one that compares each of these possible moves to find the one that gives you the highest number of points that turn.
However, this may be extremely difficult to do before time runs out on your turn. Because of this, optimizing your bot would mean efficiently finding as many moves as possible before the timer runs out.

Basic strategy

Finding possible moves can be broken down into two jobs: finding positions for words and finding the words themselves. For the first job, having been given a board, we want to find all the spaces adjacent to the current tiles on the board and the directions that words can go using that space.
There are many ways to do this, such as randomly choosing a coordinate and checking to see whether it is empty and adjacent to a square. Another way is to compare the previous board to the current one, so you can keep a constantly updating list of possible tile positions. Try to find as efficient a method as possible!
The second job involves using the tiles in hand and the letters available on the board to find words in the dictionary provided. However, checking if each word can be placed on the board takes a long time- there are over 150,000 words! Instead, try to reduce the number of words checked by altering the size of the dictionary- for example by the first letter.
It's also extremely important that you don't go over the ResponseDeadline- if you go over the time limit you automatically lose. Therefore, it's a good idea to check throughout the calculateMove() function whether you're getting close to the deadline. If you are, make sure you give your best move so far.

Tactics

There are lots of tactics within Lexico to optimise your win rate. You'd assume that passing your go or exchanging tiles is never a good option, but it can improve your odds of playing all seven tiles in one move, or getting one of the multipliers.
Keeping certain types of letters is also important, as you dont want to end up with a hand of all vowels or all consonants. Another good keep is the letter 'S', as this can be put on the end of words already on the board but also on your (perpendicular) word, scoring a large number of points.
Keeping Blank tiles is also very important, as these can lead to a 7 tile play, and an extra 50 points!

Advanced strategies

As the game goes on, there are more possible places for words and more tiles to interact with, so finding the optimal play often takes longer. A useful thing to do is to use the spare time you have on your first few turns to help you out on the later ones.
This can be saving the board state in persisetentData so searching for spaces takes less time later on, or sorting the dictionary in different ways to help you find the best words quickly.

Multipliers

In the Multipliers version of the game, getting the biggest words on the triple or double words spaces is likely to win you the game, especially when combined with triple or double letter spaces. However, you also want to consider not letting your opponent use those tiles- try to avoid putting useful letters near those multipliers.

iconLexicoBlack.png
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License