This is not polished at all, did as quick thing but turned out pretty cool
AI Chess is a cool and interactive web-based chess game that combines the classic game of chess with cutting-edge AI technology. Play against an AI opponent that not only makes strategic moves but also engages in witty banter!
- Interactive chessboard interface
- Real-time AI opponent powered by GPT-4
- Chat functionality for player-AI interaction
- Dynamic move analysis and reasoning
- Entertaining "trash talk" from the AI
- The frontend is built using HTML, CSS, and JavaScript, featuring a responsive chessboard and chat interface. - claude helped, based
- The backend is powered by FastAPI, did some websocket stuff for the chat, http for the moves, I don't care, just wanted to test this idea out
- Chess moves are processed using the
python-chess
library, stockfish, downloaded with brew to use - The AI opponent makes use OpenAI's GPT-4o-mini model through the
instructor
library, which makes use of stockfish options, adds some commentary, and some shit talk for fun.
What makes this project stand out, OMG!!:
- AI-Powered Opponent: Play against an AI that thinks and communicates like a chess grandmaster.
- Dynamic Analysis: Get real-time reasoning behind each AI move.
- Entertaining Interactions: Enjoy witty "trash talk" from the AI, adding a fun twist to the game.
- Seamless Integration: Combines classic chess gameplay with modern AI technology.
- Frontend: HTML, CSS, JavaScript, chessboard.js
- Backend: Python, FastAPI, Pydantic.
- AI: OpenAI's GPT-4o-mini,
instructor
library - Chess Logic:
python-chess
library
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
brew install stockfish
or whatever you use for package management, then change the path in the code plz - Set up your OpenAI API key in a
.env
file - Run the server:
uvicorn app.api:app --port 8000
- Open
http://localhost:8000
in your browser
Start playing and experience the future of chess with AI Chess Master!
OBS: If you did not realize, 90% of this readme was claude sonnet writing, just to have anything, but anyways, cool project, love to use instructor, love to leverate LLMs and AI's in general to develop solutions / product. Crazy cool to work with