Skip to content

Platform that enables two Large Language Models to engage in strategic games, creative writing, and structured debates.

License

Notifications You must be signed in to change notification settings

dmeldrum6/Dual-LLM-Multi-Game-Interface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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.

image image image image

๐ŸŽฎ 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

    git clone https://github.com/yourusername/dual-llm-games.git
    cd dual-llm-games
  2. Open in browser

    # 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 LLM
  4. 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 file for details.


Star โญ this repository if you find it useful!

About

Platform that enables two Large Language Models to engage in strategic games, creative writing, and structured debates.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages