How puzzles are generated in lexagons
Hey! Time for a devlog on how lexagons puzzles work!
Now, if you’re not familiar with what a lexagons puzzle is (then play it!), then the aim is to make a word for each puzzle. You are given some letters that could form the start of many words, and then you are offered choices of letters to add on to the end of the word. You keep going until you’ve made something that is a target length but also actually a word.
Lots of trick choices are also offered to you though, so be careful to not choose any of these! As soon as what you have cannot be extended to become a valid word any further, you lose the word, and must start again with another one. Each time you choose some letters, they are added to the word, and new letters are offered.
Everyone in the world competes each day to complete the same puzzles – so everyone was given unk as the first letters for the first word on chilled mode on this particular day, and the choices is, em, nl, etc…
Every time you successfully make a word, it is ‘rated’ based on its rarity, and you are awarded up to 10 points, if the word is the rarest one that could have been made with all the letters offered.
So how do we generate these puzzles?
First, we have a function that generates a random mixture of valid letters and trick letters based on the word that has been built so far. This balance shifts over time, based on the game difficulty and the number of words you’ve already made. This randomness is seeded from an RNG seed that everyone playing the same daily puzzle uses.
But before you’ve even made your first choice, the game has already tried everything. It exhaustively evaluates every word that could be made in this puzzle.
Above are the first choices that could be made, and here is the whole puzzle:
The letters you start off with are the ones shown in the blue hexagon at the top, all trick letters are the red hexagons, and green hexagons are when you’ve successfully made a word that’s long enough for this puzzle (in the first puzzle of Regular difficulty, the word needs to be at least 6 letters long!)
So there’s quite a few words that can be made here:
- biking
- bikers
- bikeways
- bikeway
- bikinis
- bikinied
- bikini
But there are loads of different ways of getting to the same word sometimes. Just try to not to fall for any tricks and make a word like… bikewag or, uh, bikewars.
So those are all the words you can make. As mentioned, you get 10 points for making the rarest word, and fewer for more common words. So at the same time as the game works out how many words you could make, it also checks its list of words to know which ones are more rare than others. I have this information for every word in my word list, which I’ve calculated from a popular corpus of words freely available from Google.
So in this case bikinied is the rarest word, and the one you want to go for. Sorry, I gave you the answer, but this puzzle was a while ago, so it’s not going to help you much.
So that’s level one, the first word you make in the puzzle. As you make more words, and approach the number you need to complete the puzzle (10), the game starts to give you more trick letters.
Here’s the level ten puzzle:
As you can see, there are a lot more trick letters in this one. But there’s still two words you can make in there, shepherdesses and shellackings, so you need to work hard to make sure you find them!
Sometimes the options get pretty complex, here’s level five:
But obviously you as the player don’t really see this complexity. You just see there are many words you could possibly make, and try to search for the rarest one.
So yeah, in the process of making these diagrams to talk about this puzzle generation, I managed to get a pretty good score the other day:
😎
Hope you enjoyed learning about lexagon puzzles!
lexagons
A unique daily word game that expands your vocabulary!
Status | Released |
Author | SKYLE |
Genre | Puzzle |
Tags | daily, daily-challenge, thinky-game, Word game |
More posts
- Major lexagons update!Jan 15, 2024
Leave a comment
Log in with itch.io to leave a comment.