https://github.com/dmeldrum6/dual-llm-multi-game-interface
Platform that enables two Large Language Models to engage in strategic games, creative writing, and structured debates.
https://github.com/dmeldrum6/dual-llm-multi-game-interface
ai-games ai-research artificial-intelligence chess claude conversational-ai creative-ai games javascript llm machine-learning model-comparison openai web-app
Last synced: about 2 months ago
JSON representation
Platform that enables two Large Language Models to engage in strategic games, creative writing, and structured debates.
- Host: GitHub
- URL: https://github.com/dmeldrum6/dual-llm-multi-game-interface
- Owner: dmeldrum6
- License: mit
- Created: 2025-08-25T03:33:43.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-08-26T15:20:50.000Z (about 2 months ago)
- Last Synced: 2025-08-26T21:08:22.434Z (about 2 months ago)
- Topics: ai-games, ai-research, artificial-intelligence, chess, claude, conversational-ai, creative-ai, games, javascript, llm, machine-learning, model-comparison, openai, web-app
- Language: HTML
- Homepage:
- Size: 69.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dual LLM Multi-Game Interface
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.
![]()
![]()
![]()
## 🎮 Game Modes
### Strategic Games
- **♟️ Chess** - Full algebraic notation support with move validation
- **⚫ Othello/Reversi** - Dynamic disc flipping with visual feedback### Creative & Discussion
- **💬 Structured Debates** - Topic-driven conversations and discussions
- **📖 Collaborative Story Writing** - Genre-based creative writing with customizable parameters## ✨ Features
- **🔄 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## 🚀 Quick Start
### Prerequisites
- Web browser with JavaScript enabled
- API keys for your preferred LLM services (OpenAI, Anthropic, etc.)### Installation
1. **Clone the repository**
```bash
git clone https://github.com/yourusername/dual-llm-games.git
cd dual-llm-games
```2. **Open in browser**
```bash
# Serve locally (recommended)
python -m http.server 8000
# OR simply open dual_llm_chat.html in your browser
```3. **Configure LLM APIs**
- Enter your API endpoints and keys in the configuration section
- Select your preferred models
- Customize system prompts for each LLM4. **Start Playing!**
- Choose a game mode
- Click "Start Game" and watch the AIs compete## 🎯 Configuration
### Supported API Formats
- **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)### System Prompts
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## 🎲 Game Rules & Formats
### Chess
- Standard algebraic notation (e4, Nf3, O-O, etc.)
- Full board position tracking with FEN notation
- Move validation with detailed error feedback### Othello
- Coordinate moves (A1, B2, etc.) or "pass"
- Automatic disc flipping with visual animations
- Valid move highlighting and game end detection### Story Writing
- Configurable sentence limits (1-5 sentences per turn)
- Genre selection (Mystery, Fantasy, Sci-Fi, Romance, Horror, Comedy, Adventure)
- Word and sentence count tracking## 📊 Analytics & Export
### Real-time Statistics
- Move/turn counters
- Game duration tracking
- Piece/score counts
- Current player indicators### Export Formats
All sessions can be exported as JSON with:
- Complete move/conversation history
- Game metadata and timestamps
- Final board positions
- Performance statistics
- Model configuration details## 📚 Research Applications
### AI Model Comparison
- **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### Use Cases
- **Educational**: Demonstrate AI capabilities
- **Research**: Model evaluation and comparison
- **Entertainment**: Watch AIs compete and create
- **Development**: Test and debug LLM integrations## 🐛 Troubleshooting
### Common Issues
1. **API Errors**: Verify endpoints and authentication
2. **Invalid Moves**: Check model understanding of game rules
3. **CORS Issues**: Serve from localhost or enable CORS
4. **Performance**: Some models may need longer timeouts## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
**Star ⭐ this repository if you find it useful!**