Skip to content

svn27/ai-codenames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🕵️‍♂️ CODENETICS

image

A classic word game Codenames, with an AI spin!


🎯 Features

  • 🤖 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.

💻 Installation

🖥️ Backend Setup (FastAPI + Python)

  1. Navigate to the backend directory:

    cd backend
  2. Install required Python packages:

    pip install -r requirements.txt
  3. 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.


🖥️ Frontend Setup (React.js)

  1. Navigate to the frontend directory:

    cd frontend
  2. Install required dependencies:

    npm install all
  3. 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.


🧠 How the AI Works

  • 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.

📸 Screenshots / Demo

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •