Inspiration
There's something about language that seems out of grasp for computers, which makes it even more surprising when simple heuristics or straightforward math can produce useful results for a language task. In computational linguistics this semester, we learned that words can be represented as vectors, and the cosine similarity between those vectors can serve as a measure of how similar in meaning two words are.
A game called semantle, born out of the wordle craze, got popular a few weeks ago which used this metric to set up a game: guess the target word with the only clues you get being how close your last guess was, semantically. I wanted to replicate this game, and make it better, as there are a few frustrating things about it.
What it does
A target word is chosen by the program. The user must input guesses, with the only clues provided being the similarity of the last word guessed to the target word. In this version, hints are accessible (at a cost), and there is an overt way to lose (not infinite guesses). The scope of the target word has also been constrained, which I think makes the game a lot more fun.
How we built it
A pretrained word2vec model is loaded through the gensim library, which also computes cosine similarity. The logic lives in a python file, and the whole thing is set up in the browser using Flask.
Challenges we ran into
This was my first time using Flask. It was fun learning more about Jinja, Gensim and Bootstrap/CSS as well. One of the most difficult tasks was to watch others play the game and improve user behavior.
Accomplishments that we're proud of
Firstly, it replicates nearly all of semantle's game mechanics. I believe this is general version is an improvement for a few reasons including limited scope of target word (no worries about inflections or similarity differences across different parts of speech), ability to ask for hints, ability to play it more than once a day, and non-infinite guesses.
What we learned
A whole lot of Flask today. Also deepened my understanding of how gensim works, and how it could work with Flask. Lastly, learned a lot about how people play games and how to present game mechanics/instructions to users.
What's next for Get This Bear Out of My Supermarket
nltk can be used to limit or check part of speech, and Wordnet, through nltk, can be used to check categories of words. To know if or how these can make this game more fun needs to be tested on real players first though.


Log in or sign up for Devpost to join the conversation.