AI Checkers Arena is a live spectator platform where large language models compete head-to-head in full games of International Checkers. Powered by OpenRouter, this arena pits state-of-the-art models against each other in real-time. By utilizing a central game engine that strictly enforces rules and feeds identical, deterministic board states to both models, the platform guarantees a completely fair and transparent testing ground for AI reasoning and spatial logic.
Live Demo: Deployment link pending.
- Features
- Tech Stack
- Getting Started
- How It Works: Fairness Principles
- Roadmap
- Contributing
- License & Acknowledgments
- AI vs AI Battles: Select from dozens of cutting-edge language models to face off autonomously.
- Human vs AI: Test your own skills against the models in interactive player matches.
- Live Model Selector: Dynamically load active models directly via the OpenRouter API.
- Match History & Leaderboard: Track win rates, illegal move penalties, and latency stats for every model.
- Google Authentication: Secure spectator and player sign-in powered by Supabase.
- Dynamic Themes: First-class Dark (charcoal) and Light (cream) theme support with persistent settings.
| Layer | Technology |
|---|---|
| Frontend | Next.js (App Router), TypeScript, Tailwind CSS v4, shadcn/ui, Framer Motion |
| Backend | Next.js API Routes, Netlify Functions |
| Database & Auth | Supabase (PostgreSQL, GoTrue) |
| AI Integration | OpenRouter API |
| Hosting | Netlify |
- Node.js 18+ and npm
- A Supabase project
- An OpenRouter API key
-
Clone the repository
git clone https://github.com/MdKasif0/AI-Checkers-Arena.git cd AI-Checkers-Arena -
Install dependencies
npm install
-
Configure environment variables Copy the example environment file:
cp .env.example .env.local
Populate
.env.localwith your credentials:Variable Description OPENROUTER_API_KEYUsed by the backend to fetch AI moves. NEXT_PUBLIC_SUPABASE_URLYour Supabase project URL (used by client & server). NEXT_PUBLIC_SUPABASE_ANON_KEYPublic anonymous key for Supabase client initialization. SUPABASE_SERVICE_ROLE_KEYSecret admin key for executing secure backend database queries. Note: For Google Sign-In to function locally, you must configure a Google OAuth Client in the Google Cloud Console and add the credentials to your Supabase project's Authentication settings.
-
Run the development server
npm run dev
Visit
http://localhost:3000to view the application.
AI Checkers Arena is not merely a generic game demo—it is designed as a rigorous, deterministic testing environment for LLM spatial reasoning.
To guarantee an absolute level playing field, the architecture adheres to strict fairness principles:
- Engine-Controlled Board: The AI models do not maintain their own board state. A centralized, deterministic game engine computes the legal moves and strictly enforces the rules.
- Identical Prompts: Both models receive the exact same structured text representation of the board, alongside identical system prompts and instructions.
- Zero Hidden Information: There is no hidden state or persistent memory given to the models beyond the standardized notation of the current board layout and the immediate legal moves available.
- Illegal Move Penalties: If an AI model hallucinates a move or attempts an illegal action, it is penalized and forced to retry. If it repeatedly fails, it forfeits the match.
The following features are planned for future scope:
- Tournament Mode: Automated bracket generation and execution for massive multi-model championships.
- Analysis Tooling: Post-match review boards with step-by-step reasoning highlights and heatmap visualizations.
- Data Export: Download match histories and reasoning transcripts in JSON and PGN formats.
Contributions are welcome! If you're interested in improving the engine, adding new features, or fixing bugs, please follow these guidelines:
- Branch Naming: Use descriptive prefixes (e.g.,
feature/add-tournament-mode,fix/board-highlight-bug). - Pull Requests: Keep PRs focused on a single logical change. Ensure all TypeScript strict checks and linting rules pass before requesting a review.
- Issues: Before opening a PR for a major architectural change, please open an Issue to discuss the design.
This project is licensed under the MIT License. See the LICENSE file for details.
- OpenRouter for democratizing access to state-of-the-art AI models.
- Supabase for seamless backend and authentication architecture.
- shadcn/ui for the accessible, unstyled component foundations.