A classic word game Codenames, with an AI spin!
- 🤖 AI Spymaster: Generates clues using word vector embeddings (GloVe via Gensim).
- 🧠 AI Operative: Makes educated guesses based on the clue and board state.
- 🧑🤝🧑 Human Player: Play as the human Spymaster or Operative.
- 💬 Backend in FastAPI with Gensim NLP for vector-based clue generation.
- ⚡ Frontend in React.js with dynamic board rendering.
- 🎨 Responsive UI with real-time AI turns and guesses.
-
Navigate to the backend directory:
cd backend
-
Install required Python packages:
pip install -r requirements.txt
-
Run the backend:
- On Windows:
python main.py
- On Mac:
python3 main.py
Make sure you have internet access for the first time you run the backend as it will download the word vector model using Gensim.
-
Navigate to the frontend directory:
cd frontend
-
Install required dependencies:
npm install all
-
Start the frontend development server:
npm run dev
Your React app will now be running, and you should be able to interact with the game in your browser.
- The AI Spymaster calculates average vectors of its team's words and finds the closest word in GloVe space as the clue.
- The AI Operative uses the clue and vector similarity to select the most likely associated words on the board.
