Play Chess Against the Machine – Learn by Winning
I built an interactive chess game where you play against an AI that explains each move. The dashboard helps beginners understand why a move is good or bad.
Game Link (password: 20082010)
https://share.google/HjSmYsy7akZbMkiKC/
GitHub Repository
https://github.com/Deslandes1/PlayChessAgainstTheMachineMarch2026
Features
Three AI difficulties - Easy with random moves, Medium that prefers captures, Hard with simple evaluation.
Interactive board using dropdowns to select from and to squares.
Move explanations for every move including captures, development, central control, and checks.
Dashboard showing your last move, the AI's last move, and game status.
New game button to restart anytime.
Run locally
pip install -r requirements.txt
streamlit run app.py
This project is perfect for beginners learning chess tactics. The AI explains its reasoning step by step so you learn while you play.
Feedback and stars on GitHub are welcome.
Top comments (2)
Chess with move explanations – that's actually brilliant
Most chess engines just crush you and leave you wondering why you lost. Adding move explanations (development, central control, checks) turns this into a learning tool, not just a game.
The three difficulty levels are smart too. Easy = random moves gives beginners a real chance to win, while Hard with simple evaluation still feels like an actual opponent.
One tiny suggestion if you ever iterate on this: consider highlighting the last move on the board (visually) so it's easier to follow along with the explanation. Streamlit has some decent board customization options.
Also, password‑protected Google Share link? That's an interesting choice – keeps bots away, I guess 😄
Nice work on this. Starred the repo.
Cheers,
Jack
DEV.to/ggle.in
PS: the google link doesnt work as it used to be.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.