Kurdish Chess AI
شەترەنجی کوردی
A full Kurdish-language chess platform built from scratch with a custom minimax + alpha-beta AI engine, a Google Gemini 2.5 Flash coach, a mind-reading opponent-intent predictor, post-game analysis, and daily puzzle training — every screen fully localized in RTL Kurdish Sorani.

Minimax + Gemini 2.5
AI Engine
7
Difficulty Levels
Kurdish Sorani (RTL)
Language
chess-ai.ibrahim-eng.dev
Domain
No Chess Platform in Kurdish
Kurdish speakers who want to learn or practice chess have no dedicated platform in their own language — every serious chess site is in English or Arabic, which is a real barrier for beginners in Kurdistan.
Beyond translation, beginners also lack an accessible way to get move-by-move coaching, understand their opponent's intent, or review their own mistakes after a game — the tools serious players rely on simply didn't exist for Kurdish speakers.
Six Core Features
Every feature is reachable from the homepage and fully localized in Kurdish Sorani, right-to-left.
یاری لەگەڵ AI
Play against the custom minimax engine across 7 difficulty levels, from Beginner to Unlimited
ڕاهێنەری AI
Gemini-powered coach that questions your thinking and teaches strategy move by move
خوێندنەوەی مێشک
Mind-reading feature — predicts the opponent's intent, threats, and traps with probability scores
یاری لەگەڵ Gemini
Play directly against Google Gemini 2.5 Flash as a live AI opponent
شیکاری
Post-game analysis of accuracy, mistakes, and better alternative moves in Kurdish
ڕاهێنان
Daily puzzles and training drills to sharpen tactics
Architecture & How It Works
Custom Minimax + Alpha-Beta Pruning
The AI opponent is built entirely from scratch using chess.js for move generation and a hand-written minimax algorithm with alpha-beta pruning. The board is evaluated using classic material values (pawn=100 … queen=900) combined with per-piece piece-square tables that reward good positioning (e.g. knights in the center, pawns advancing, king safety in the opening).
Search depth scales with difficulty — from 1 ply at Beginner up to 6 plies at Unlimited — with alpha-beta pruning cutting off branches that can't improve the result, keeping even the deepest search fast in the browser.
7 Difficulty Levels
Gemini 2.5 Flash Coach & Analysis
Three dedicated API routes (/api/chat, /api/analyze, /api/ai-move) send the current board state — FEN, PGN, and full move list — to Google Gemini 2.5 Flash with Kurdish-only system prompts.
In coach mode, Gemini asks guiding questions instead of giving direct answers. In analysis mode, it reviews accuracy and mistakes after the game. In play-with-Gemini mode, it plays full moves directly as the opponent, replying in strict MOVE: / REASON: format that the app parses automatically.
Opponent-Intent Predictor
A dedicated mindReading mode prompts Gemini to act as a chess psychologist: given the current FEN/PGN, it predicts the opponent's primary intention, any attack being prepared, and traps being set — each with a probability score.
The response is returned as structured JSON (intention, probability, alternatives, explanation) so the UI can render it as a ranked list of predicted threats.
State Management
Zustand stores manage game state, move history, and settings without prop drilling across the board, sidebar, and chat panels.
Board & Rules Engine
react-chessboard renders the interactive board; chess.js validates every move, detects check/checkmate/stalemate/draws, and generates legal move lists for the AI.
Full RTL Localization
Every route — home, play, coach, analysis, mind-reading, training, statistics, profile, settings — is written natively in Kurdish Sorani with RTL layout throughout.
Impact
Deployed live at chess-ai.ibrahim-eng.dev, Kurdish Chess AI gives Kurdish speakers their first native-language chess trainer — combining a self-built game engine with modern generative AI for coaching, analysis, and psychological insight into an opponent's next move, all without ever leaving the Kurdish language.
Play Kurdish Chess AI
Try the live app or explore the full source code on GitHub.