A web application that analyzes chess games from Chess.com using AI to provide insights and recommendations.
Chrome extension here: https://chromewebstore.google.com/detail/chess-game-analyzer/chanagjlgmiaidodekmfpahbgmbjafkh
- 🎮 Fetch and analyze chess games from Chess.com
- 🤖 Dual AI Analysis:
- Google's Gemini 2.0 (default)
- OpenAI's GPT-4 (optional)
- 📊 Filter games by:
- Date ranges (Today, Last 7 days, Last 30 days)
- Game results (wins, resignations, timeouts)
chess-analyzer/
├── ai_model.py # AI analysis using Gemini/GPT-4
├── interface.py # Gradio web interface
├── main.py # Chess.com API integration
├── chess.png # Logo image
├── requirements.txt # Python dependencies
├── tests/ # Test suite
│ ├── __init__.py
│ ├── test_ai_model.py
│ ├── test_chess_analyzer.py
│ ├── test_interface.py
│ └── run_tests.py
├── Dockerfile # Container configuration
├── cloudbuild.yaml # Google Cloud Build config
└── .env # Environment variables (not tracked)
- Clone and Install
git clone <repository-url>
cd chess-analyzer
pip install -r requirements.txt- Configure Environment
# Create .env file with your API keys
echo "GOOGLE_API_KEY=your_gemini_key_here" > .env
echo "OPENAI_API_KEY=your_openai_key_here" >> .env # Optional for GPT-4- Run Locally
python interface.py# Run all tests
python -m tests.run_tests
# Run specific test file
python -m unittest tests/test_chess_analyzer.py# Build image
docker build -t chess-analyzer .
# Run container
docker run -p 8080:8080 \
-e GOOGLE_API_KEY=$GOOGLE_API_KEY \
-e OPENAI_API_KEY=$OPENAI_API_KEY \
chess-analyzerThis project is licensed under the MIT License.
