Inspiration
My inspiration came from watching people struggle to learn chess. I saw beginners get discouraged after losing to stronger players, give up because they did not understand why their moves were bad, and stop playing altogether because they felt there was no clear path to improvement.
I wanted to build something different. Not just a game where you play against an AI and that is it, but a teaching tool that helps you understand chess as you play. Something that shows you the right move before you make your move, explains strategies at your level, and encourages you to come back every day to get a little bit better.
I am Gesner Deslandes, Engineer in Chief at GlobalInternet.py. We are a software company based in Haiti that builds tailor-made solutions connecting the global market with our local expertise. We believe that education and technology can transform lives, and we wanted to create a product that reflects this mission.
I also wanted to make chess learning accessible to everyone. That is why we added support for four languages: English, Spanish, French, and Haitian Creole. Chess is a universal language, but the people who play it speak many different ones. By making the app multilingual, we are opening the door to players around the world who might not have felt welcome in other chess apps.
The hook came naturally once I started thinking about how people actually learn. They do not learn by playing one game and stopping. They learn by playing consistently, day after day, and applying what they learned yesterday to today's game. That is the core of our daily retention strategy. Every day, the game offers fresh strategies to try, new challenges to attempt, and the opportunity to beat your own record. This creates a habit loop that keeps players coming back.
What it does
Play Chess Against the Machine is a web-based chess game where players challenge an AI opponent powered by Stockfish, the strongest open-source chess engine in the world.
But this is not just another chess game. It is a teaching tool that helps you improve every time you play.
The AI Teaching Feature shows you the best move according to Stockfish before you make your move. This means you are constantly learning what the strongest move is in any position. You can choose to play that move or any other legal move, but you always know what the optimal move would have been.
The Difficulty Levels let the AI adapt to your skill level. Beginners can play at level 1, intermediate players at level 10, and advanced players at level 18. This keeps the game challenging but not frustrating.
The Winning Strategies Section gives each difficulty level three proven winning strategies. Beginners learn about Fool's Mate and Scholar's Mate. Intermediate players learn about the Fried Liver Attack and Queen's Gambit. Advanced players study the Sicilian Dragon and Ruy Lopez Marshall Attack. Players can read these strategies, study them, and then try to execute them in their games.
The Move History Tracking saves every move you make. You can download your complete move history after the game and review your performance. This is essential for learning from your mistakes.
The Multilingual Support allows the app to work in English, Spanish, French, and Haitian Creole. Players can switch languages instantly from the sidebar, and all text, instructions, and feedback will appear in their chosen language.
The Daily Retention Hooks encourage daily play by offering fresh learning experiences. Each day, players are challenged to try a new strategy, beat their previous win streak, or reach a new difficulty level. This creates a compelling reason to return day after day.
How we built it
We built the game using a combination of technologies that balance performance, accessibility, and ease of development.
For the frontend, we used Streamlit, a Python web framework that allows us to build interactive web apps quickly. Streamlit's simplicity meant we could focus on the game logic and user experience rather than fighting with frontend frameworks.
For the AI opponent, we integrated Stockfish, the strongest open-source chess engine. Stockfish runs locally on the server and calculates the best move for any position. We set the skill level based on the player's chosen difficulty.
For the game logic, we used the python-chess library to handle all chess logic. This library manages board state, legal moves, move validation, check detection, checkmate detection, stalemate, and insufficient material draws. It also handles SAN (Standard Algebraic Notation) conversion for move display.
For multilingual support, we built a dictionary-based translation system. Each language has a complete dictionary of all text strings used in the app. When the user selects a language, the app pulls the corresponding dictionary and renders all text in that language.
For the design, we used custom CSS with a dark theme and Haitian flag branding. The flag appears in the sidebar and on the login page, giving the app a unique cultural identity.
For deployment, we deployed the app on Streamlit Cloud, which allows us to host the app for free and scale as needed.
Challenges we ran into
One of the biggest technical challenges we faced was handling the chess notation correctly. When a player makes a move, we need to display the move in Standard Algebraic Notation (SAN) so that humans can read it. However, in the python-chess library, the SAN representation of a move depends on the current board state. If you push the move to the board first, you lose the context needed to generate the SAN correctly. We solved this by generating the SAN string before pushing the move to the board, then storing that string in the move history.
Another challenge was making the AI move seamlessly. We wanted the AI to move automatically when it is its turn, without the player needing to click anything. To achieve this, we used a combination of Streamlit's rerun mechanism and session state flags to trigger the AI move and then refresh the page.
Stockfish installation was also tricky. The app needs to find the Stockfish executable on the server, and different environments have different paths. We implemented a fallback mechanism that tries multiple common paths before giving up.
Finally, we had to ensure the game handles edge cases properly. Checkmate, stalemate, and insufficient material all need to be detected correctly, and the game should end appropriately with the right message for each outcome.
Accomplishments that we are proud of
We are proud of several things.
First, we built a fully functional chess game that actually teaches. The app does not just let you play against an AI. It actively teaches you the best move, shows you winning strategies, and helps you understand why certain moves are good or bad.
Second, we added multilingual support. Supporting four languages in a chess app is rare. We are proud that we made the app accessible to players who speak English, Spanish, French, and Haitian Creole.
Third, we designed daily retention hooks. We thought carefully about what would make players return. The daily challenges, win streak tracking, and difficulty progression create a habit loop that keeps players engaged.
Fourth, we gave the app a strong branding and identity. The app proudly displays the Haitian flag and is built by GlobalInternet.py. We are proud to represent Haitian engineering talent on a global platform.
Fifth, we created a clean, polished user experience. The app works well on both desktop and mobile. The chess board is responsive, the controls are intuitive, and the interface is clean and uncluttered.
What we learned
Building this app taught us several lessons.
We learned the importance of user feedback. Showing the best move to the player before they move is a powerful teaching tool. It turns the game into a learning experience.
We learned that retention is about value, not gimmicks. Players will not come back because you ask them to. They will come back because you offer them something valuable. For us, that value is daily learning and progress.
We learned that multilingual design requires planning. Building a multilingual app from the start was much easier than trying to add translations later. Our dictionary-based approach worked well and allowed us to add new languages easily.
We learned that edge cases matter. Chess has many edge cases like stalemate, insufficient material, and threefold repetition. We learned the importance of testing all of them thoroughly.
We learned that simplicity wins. We could have built a complex frontend with React, but Streamlit allowed us to focus on the game logic and user experience. Sometimes the simplest tool is the right tool.
What is next for Play Chess Against the Machine
We have big plans for the future.
First, we plan to port the game to Devvit Web. This will allow the game to run directly in Reddit feeds as Interactive Posts, reaching millions of Reddit users.
Second, we plan to rebuild the chess board using Phaser for smooth animations and a more polished experience.
Third, we will implement a daily challenges system where players are given a specific position to solve or a strategic goal to achieve.
Fourth, we will allow users to submit their own opening strategies, puzzles, and tactical challenges. The best submissions will be featured as daily challenges for the community.
Fifth, we will add leaderboards so players can compete with others in their subreddit.
Sixth, we will create a dedicated subreddit where players can discuss strategies, share their best games, and participate in community tournaments.

Log in or sign up for Devpost to join the conversation.