Inspiration
I was inspired by games like Little Alchemy, Codenames, and Wikipedia Speedrun to create a game which let's you combine concepts to reach a target as fast as possible.
What it does
You are able to select a difficulty and a category of your choosing, and difficulty. The game gives you a few starting blocks, and a target goal. Your goal is to reach the target in as few merges as possible. Drag blocks together to watch them turn into something new, it's magic!
How we built it
I downloaded a database of all wikipedia article names and sorted them into genres. A vector for each term is stored in Weaviate and is pre-calculated using OpenAi's text-embedding-3-large model, with 3072 dimensions per term. After the user selects a genre and difficulty, the model randomly selects the number of starting blocks and combines them repeatedly and randomly to get a target goal: Easy difficulty starts with 5 blocks and 3 random combinations. Medium difficulty starts with 10 blocks and 5 random combinations. Hard difficulty starts with 15 blocks and 8 random combinations.
The app runs on streamlit, and the entire processing language is python. When two blocks merge, the average vector is calculated and the merged result is the term with the closest vector calculated by cosine similarity to the average vector.
Challenges we ran into
I had many challenges along the way, from choosing my dataset, computing vector combinations, and creating a game within a gui designed for data science like streamlit. The hardest ones were finding a good database of terms and figuring out how to get vectors and store them on demand. It would be impossible to store all the vectors and run all computations inside the web app, which I had to sign up for and make calls to Weaviate cloud. I eventually chose the wikipedia English dataset due to its wide range of both cultural and dictionary terms, and its focus on nouns over other words.
Accomplishments that we're proud of
I'm proud of how I managed to balance developing this app and completing all my other work this weekend (I'm running a 2 hour SI exam review session tonight for CS250). Also I'm dog sitting this weekend, so that added some extra time challenges along the way.
What we learned
I learned about how to integrate AI APIS into my apps and how to design and build my own game from scratch.
What's next for Wordage
I'd like to add persistent game states across stages, and make the goals like a connect-the-dots to make users achieve some far-fetched connections. I'd also like to add a daily challenge, similar to world, and add persistent game statistics with cookies.
Built With
- chatgpt
- egg
- huggingfaces
- openai
- python
- streamlit
- weaviate
Log in or sign up for Devpost to join the conversation.