AI Agent with Facial Emotion & Voice Recognition for the Bluffing Card Game "Cheat"
CHEAiT is an intelligent AI agent that plays the bluffing card game Cheat. Unlike traditional AI opponents, CHEAiT leverages Facial Emotion Recognition (FER) and Voice Recognition to analyze real-time player behavior and detect potential bluffing attempts. This multi-modal approach creates a more engaging and challenging gameplay experience.
In the card game Cheat, players take turns playing cards and claiming a rank (e.g., "three 5s"). The challenge is that you can play any cards you want—and other players must decide whether to believe you or call "Cheat!" If you're caught bluffing, you lose. If someone incorrectly accuses you, they lose.
- Intelligent AI Agent - Uses Google Gemini API for strategic decision-making
- Facial Emotion Recognition - Analyzes player facial expressions via DeepFace
- Voice Recognition - Captures and analyzes voice patterns using VOSK
- Real-time Analysis - Processes multimodal data during gameplay to inform bluff detection
- WebSocket Game Server - Supports multiplayer gameplay with live game state synchronization
- Interactive React Frontend - User-friendly interface for playing against the AI
Prerequisites: Python 3.8+, Node.js 16+, npm or yarn
-
Clone the repository
git clone https://github.com/samfeast/whack25.git cd whack25 -
Install Python dependencies
pip install -r requirements.txt
-
Download the VOSK Voice Model
- Download the English US model from: https://alphacephei.com/vosk/models
- Extract to:
./client/vision/vosk-model-en-us-0.22/
# Example (Linux/Mac) wget "https://alphacephei.com/vosk/models/vosk-model-en-us-0.22.zip" unzip vosk-model-en-us-0.22.zip -d ./client/vision/
-
Configure Gemini API Key
- Create a
.envfile in the project root - Add your Google Gemini API key:
OTIS="your-gemini-api-key-here"- Obtain an API key from Google AI Studio
- Create a
-
Start the backend server
cd api python main.py # or with gunicorn for production gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app
The server will start at
http://localhost:8000 -
Install and start the frontend
cd client/frontend/my-app npm install npm startThe app will open at
http://localhost:3000
- Ensure both backend and frontend servers are running
- Open the frontend at
http://localhost:3000 - Enter your username and join the game
- The AI will analyze your emotions and voice patterns throughout the game
- Make strategic decisions: play cards, call "Cheat," or bluff!
CHEAiT uses three signals to inform its bluff detection strategy:
- Facial Expression Analysis - Detects seven emotion states (angry, happy, sad, fear, surprise, disgust, neutral) using DeepFace
- Voice Patterns - Analyzes voice recognition output and transcribed text using VOSK
- Game State Logic - Considers the game state, remaining cards, and probability theory
The Gemini API synthesizes these signals to make informed decisions about whether to trust or challenge a player.
@misc{cheait_WHACK2025,
author = {Feast, Sam and Nowak, Maks and Ryley, Oscar},
title = {CHEAiT: AI Agent with Facial Emotion and Voice Recognition for the Bluffing Card Game Cheat},
year = {2025},
publisher = {GitHub},
journal = {GitHub Repository},
howpublished = {\url{https://github.com/samfeast/whack25}},
note = {WHACK 2025 Hackathon Project}
}