Tracks
Innovating with AI (Chess bot)
Side Tracks/Challenges
Best Use of CockroachDB, Most Creative Use of Twilio
Inspiration
We were inspired by texting plugins like GamePigeon, which allow users to play turn-based games right in their text message history.
What it does
Users can text the dedicated ChessMS phone number and engage in a text-based game of chess right in their messages. Users can set the difficulty of the bot they play against, and keep track of their lifetime wins/losses.
How we built it
User messages are sent and received using Twilio's Python API. We store the game states of all users in a CockroachDB database. The chess bot moves are made using Python's Stockfish library. The codebase is run as a Flask web app on an ngrok server.
Challenges we ran into
- Inconsistencies between the interfaces of the two chess libraries we used
- Setting up Twilio to relay messages correctly
- Deciding what database schema to use and how to relate it to Python-side user information
- Displaying the chess table with Unicode characters of consistent widths
Accomplishments that we're proud of
- Actually getting the messages to send with Twilio!
- Getting a chess board to display with Unicode
What we learned
We learned how to connect together databases, servers, web APIs.
What's next for ChessMS
Nothing!