Hey Devs ๐,
I recently built a fun and insightful game called Chess IQ Analyzer โ a project that combines chess, performance analytics, and a touch of psychology. The best part? I built it with a lot of help from Amazon Q CLI, an AI-powered terminal assistant that accelerated the entire process.
Letโs dive into what this project is all about, how I made it, and how you can build something similar too.
๐ง What Is Chess IQ Analyzer?
Chess IQ Analyzer is more than just a chess game. Itโs a full-featured chess experience with performance tracking and IQ evaluation based on your moves.
Key Features:
โ๏ธ Play 10-minute games vs a computer powered by the Minimax algorithm
๐ Get post-game stats like accuracy, win/loss ratio, and IQ score
๐ View a chart of your IQ growth over time
๐งฌ Automatically classify player levels: Beginner, Intermediate, or Master
Think of it like your personal chess coach and analyst โ all built in Python using Pygame.
๐ Tech Stack
Here's the full stack I used:
Feature Tools -> Libraries
Game UI -> pygame
AI Opponent -> Minimax algorithm
Stats & IQ Tracking -> Python logic + JSON
Performance Charts -> matplotlib (for future version)
File Handling -> Standard Python I/O
AI Assistant -> ๐ง Amazon Q CLI
Version Control -> GitHub Desktop
๐ ๏ธ How Amazon Q CLI Helped
Before we dive into code โ a quick shoutout to Amazon Q CLI ๐ง .
Amazon Q CLI is like having an AI-powered coding buddy inside your terminal. I used it to:
Scaffold my folder structure and modules quickly
Generate boilerplate for Python classes (like the Minimax AI logic)
Write testable components
Fix bugs and validate logic inline
๐ If you're building Python games or AI-based apps, Amazon Q CLI can seriously boost productivity while keeping your flow uninterrupted.
๐๏ธ Project Structure
CHESS_IQ_ANALYZE/
โโโ assets/ # Chess piece images
โโโ data/ # Game logs, stats, IQ records
โโโ chess_engine/ # Game logic and Minimax AI
โโโ analysis/ # Accuracy & IQ computation
โโโ iq/ # IQ model & progress tracker
โโโ ui/ # Pygame board + stats screen
โโโ utils/ # Configs, logging, file I/O
โโโ tests/ # Unit tests
โโโ main.py # Game launcher
โโโ requirements.txt
โโโ README.md
๐จโ๐ป How It Works
๐ฎ 1. Player vs AI
Start the game and play a 10-minute timed match against a computer opponent powered by the Minimax algorithm. The AI gets smarter as your level increases, giving you a real challenge every time you play.
๐ฅ 2. Tracking Moves
Every move you and the AI make is stored in a file called moves_input.json. After each match, this data is automatically logged and used for performance review.
๐ 3. Evaluating Performance
Using smart logic in analyzer.py and iq_model.py, the system analyzes your performance and assigns an IQ score based on:
Move accuracy
Game result
Time usage
Decision quality
This IQ is then used to track your chess intelligence growth over time.
๐งพ 4. Updating Stats
After each game, key statistics are saved in player_stats.json,
including:
๐น๏ธ Total games played
โ
Win/Loss ratio
๐ง Current IQ score
๐ IQ trend line
๐งฌ Player level: Beginner, Intermediate, or Master
๐ 5. Visualization & Reports
We're working on beautiful graph-based IQ visualizations using matplotlib and dynamic dashboards that will let you:
๐ See how your IQ has evolved after each match
๐งพ Access a summary report of your stats, accuracy, and progress
๐ง Reflect on how you're improving โ not just in chess, but in decision-making too!
These insights will be displayed in the UI via the stats_view.py module.
โจ Final Thoughts
Building this project was not just technically fun โ it was creatively rewarding. Using Amazon Q CLI made it even smoother and more enjoyable. Whether you're a beginner or an advanced dev, Q CLI can help you code faster, cleaner, and smarter.
๐ง Play chess. Track your brain. Level up.
Linkdin post
Top comments (1)
interesting, would be great to see the game screenshots or code repo