This is a game similar to Wordle where you try to guess a word. The catch is that you have unlimited guesses, but at every turn you are know what "direction" word you must travel in.
If the word of the day is "banana" and you guess "dishwasher", our AI system will point you in what it thinks is a more correct "direction". It might say that you need to go in a "more fruity" direction by suggesting apple, or a more "yellow" direction by suggesting sunflower.
The technical architecture is that we have the browser which we run on, the frontend uses the browser for storage so if you were to refresh the webpage the content on the screen is the same. This means we don't need to store user information in a database. The frontend communicates with the backend by asking for the hint word/if the user guesses the word correctly, the backend will return the hidden word as a vector, the hint word, the hint word as a vector, what the secret word is for the day (not showing the user if they guessed it incorrectly). It gets the embeddings by querying the database for the word embedding for the hidden word and then running some similarities.
The dependencies for this project is postgres, rust, react, npm.
Then after installing that, clone this repository, you then just need to run ./run.sh and it should setup the backend and frontend. You can go to http://localhost:4040/ and see the game from there.
The final application connects to a database hosted on Google Cloud Platform. To save costs, this database instance has been disabled, but the database can be run locally.
In particular, setup libpq.
After setting the environment variable containing a DATABASE_URL=postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...] (e.g., in a file called '.env'), run cargo install diesel & diesel setup. The url in <Rocket.toml> also needs to be set to the above database URL.
Ian Chen: Wrote Database ORM code, setup Github Actions
Benlin Gan: Word2Vec Model, part of database integration
Matt Handzel: Frontend, creating frontend and backend connection
Franklin Zhang: Cloud database, misc. frontend and backend code
