A web-based platform that enables two Large Language Models to engage in strategic games, creative writing, and structured debates. Watch AI models compete in chess and Othello, or collaborate on creative storytelling projects.




- โ๏ธ Chess - Full algebraic notation support with move validation
- โซ Othello/Reversi - Dynamic disc flipping with visual feedback
- ๐ฌ Structured Debates - Topic-driven conversations and discussions
- ๐ Collaborative Story Writing - Genre-based creative writing with customizable parameters
- ๐ Real-time Game Visualization - Interactive boards with animations and move highlighting
- ๐ค Universal LLM Support - Compatible with OpenAI, Anthropic, and OpenAI-compatible APIs
- ๐ Comprehensive Analytics - Move history, statistics, and performance tracking
- ๐จ Dark/Light Theme - Responsive design with theme switching
- ๐ Export Functionality - JSON export of complete game sessions for analysis
โ ๏ธ Enhanced Error Handling - Intelligent move validation with contextual feedback
- Web browser with JavaScript enabled
- API keys for your preferred LLM services (OpenAI, Anthropic, etc.)
-
Clone the repository
git clone https://github.com/yourusername/dual-llm-games.git cd dual-llm-games
-
Open in browser
# Serve locally (recommended) python -m http.server 8000 # OR simply open dual_llm_chat.html in your browser
-
Configure LLM APIs
- Enter your API endpoints and keys in the configuration section
- Select your preferred models
- Customize system prompts for each LLM
-
Start Playing!
- Choose a game mode
- Click "Start Game" and watch the AIs compete
- OpenAI API (GPT-3.5, GPT-4, etc.)
- Anthropic Claude (via OpenAI-compatible endpoints)
- Local Models (Ollama, LM Studio, etc.)
- Custom Endpoints (Any OpenAI-compatible API)
Each game mode includes optimized system prompts:
- Chess: Strategic notation and position analysis
- Othello: Flanking strategy and disc placement
- Story: Genre-specific creative writing guidance
- Debate: Structured argumentation and evidence-based discussion
- Standard algebraic notation (e4, Nf3, O-O, etc.)
- Full board position tracking with FEN notation
- Move validation with detailed error feedback
- Coordinate moves (A1, B2, etc.) or "pass"
- Automatic disc flipping with visual animations
- Valid move highlighting and game end detection
- Configurable sentence limits (1-5 sentences per turn)
- Genre selection (Mystery, Fantasy, Sci-Fi, Romance, Horror, Comedy, Adventure)
- Word and sentence count tracking
- Move/turn counters
- Game duration tracking
- Piece/score counts
- Current player indicators
All sessions can be exported as JSON with:
- Complete move/conversation history
- Game metadata and timestamps
- Final board positions
- Performance statistics
- Model configuration details
- Strategic Reasoning: Compare chess/Othello performance
- Creative Ability: Analyze story quality and coherence
- Rule Following: Measure move format compliance
- Adaptability: Test response to invalid moves
- Educational: Demonstrate AI capabilities
- Research: Model evaluation and comparison
- Entertainment: Watch AIs compete and create
- Development: Test and debug LLM integrations
- API Errors: Verify endpoints and authentication
- Invalid Moves: Check model understanding of game rules
- CORS Issues: Serve from localhost or enable CORS
- Performance: Some models may need longer timeouts
This project is licensed under the MIT License - see the LICENSE file for details.
Star โญ this repository if you find it useful!