Inspiration
I used to play chess with my grandpa every summer day when I was a kid, and those games were about more than just moving pieces—they were about learning, discussing the game, and connecting. This project aims to recreate some of that magic by blending a nostalgic, tactile chess experience with an always-available, patient AI coach that can explain moves and strategies just like a mentor would.
What it does
AI Chess Coach 3D is a fully cross-platform chess application built with Compose Multiplatform. It features a highly realistic, high-fidelity 3D UI (including small details like wear and cracks on the board and pieces) and five distinct AI coaching surfaces:
- An on-device Move Coach and Game Summary that analyze your play in real-time.
- A Rules Q&A to help beginners.
- A cloud-backed Opening Explainer and Position Chat for deep-diving into specific board states. It includes full support for standard chess rules, Stockfish engine integration with adjustable difficulty, auto-saving, PGN export/import, and a seamless monetization flow using RevenueCat.
Building process, challenges, accomplishments
I am documenting the full engineering journey at https://medium.com/@gabor.berenyi.california and in the project's README.
- Architecture: We built it using Compose Multiplatform targeting Android, Desktop (JVM), Web (Wasm), and iOS. We strictly separated the platform-agnostic chess engine (:chess-core) from the UI and AI layers so there is no duplicated logic.
- 3D Rendering: The biggest challenge was the 3D pipeline. We built a renderer-agnostic state (Board3DScene) that translates FEN strings into 3D scenes, which is then implemented across platforms using Google's Filament engine (SceneView on Android, native C++ on Desktop, and WebGL on Web). The UI is a rewrite of the old and incomplete vkChess project, see THIRD_PARTY_NOTICES.md in the repository.
- AI & Verification: We orchestrated both on-device inference (LiteRT-LM) and a Ktor/pgvector backend for cloud retrieval. To ensure the AI doesn't hallucinate, the model only narrates assessments generated by deterministic code. We also built a rigid verification rig to mathematically prove our move generator's correctness against ground-truth Stockfish counts.
What we learned
We also learned that shipping "AI" features in a game requires rigorous guardrails; we had to build a dedicated rule-based evaluation suite (:evals) to mathematically enforce the AI's grounding, tone, and reading level so it acts like a helpful coach rather than a generic chatbot.
What's next for AI Chess Coach 3D
Our immediate focus is a successful launch on the Google Play Store! After that, we plan to refine the RevenueCat monetization tiers, expand the AI coach's pedagogical ability by analyzing long-term player habits across multiple sessions, and continue optimizing our on-device LLM inference for even faster real-time coaching.
Built With
- aicore
- apple-intelligence
- cmp
- gemma
- google-filament
- kmp
- mlkit
- pgvector
- stockfish
Log in or sign up for Devpost to join the conversation.