Finding the mystery word using genetic algorithms
In recent years, online mystery-word games have gained significant popularity. One standout among them is Semantle, a game that challenges you to guess the word of the day based on its meaning.
This game provides feedback on how semantically similar your guesses are to the target word and features a “Hot and Cold” meter that indicates the proximity of your guess to the secret word.
Behind the scenes, Semantle employs word embeddings, specifically Word2Vec, to represent both the mystery word and players’ guesses. It calculates the semantic similarity between them by measuring the difference between their representations: the closer the vectors, the greater the resemblance between the words. The similarity score returned by the game ranges from -100 (very different from the answer) to 100 (identical to the answer).
In the following subsections, we will create two Python programs. The first serves as a simulation...