A sophisticated chess visualization platform that lets you witness ChatGPT playing against itself in 2D, 3D, and 5D time travel chess. This project was inspired by Gotham Chess's failure to impress me with their AI demonstrations and the mind-bending game 5D Chess With Multiverse Time Travel which I am not profitting from implementing, this is purely for fun.
Grandmaster provides three distinct chess experiences, each adding a new dimension of complexity:
-
2D Chess (Classical)
- Traditional chess visualization with LangChain-enabled AI moves
- Clean GUI interface using Tkinter
- Real-time move generation using OpenAI's GPT models
- Detailed chain-of-thought reasoning display
-
3D Chess
- Three-level chess board implementation
- Vertical movement between levels
- Enhanced visualization with level-based piece tracking
- Animated chat log showing AI reasoning
- Custom 3D move notation
-
5D Chess with Multiverse Time Travel
- Full implementation of official 5D Chess rules
- Timeline branching and parallel universe exploration
- Rich visualization of temporal and spatial moves
- Advanced piece movement across dimensions
- Timeline management and multiverse navigation
- Themed rendering with smooth animations
- AI vs AI Gameplay: Watch two instances of ChatGPT play against each other
- Chain-of-Thought Visualization: See the AI's reasoning process in real-time
- Multiple Dimensions: Experience chess in 2D, 3D, and 5D with time travel
- Rich Visualizations: Beautiful UI with themed boards and animated moves
- Real-time Analysis: Live commentary and move explanations
- Timeline Management: Track and visualize parallel universes in 5D chess
# Core dependencies
python >= 3.8
openai
langchain
python-chess # for 2D chess
PySide6 # for 5D chess
tkinter # included with Python, for 2D/3D chess
# Install required packages
pip install openai langchain python-chess PySide6-
Clone the repository:
git clone https://github.com/yourusername/Grandmaster.git cd Grandmaster -
Create a
.envfile in the project root:OPENAI_API_KEY=your_api_key_here -
Install dependencies:
pip install -r requirements.txt
python src/2d_chess.py- Launches a traditional chess board with AI vs AI gameplay
- Shows move generation and reasoning in real-time
- Uses python-chess for move validation
python src/3d_chess.py- Displays three chess boards representing different levels
- Allows pieces to move vertically between levels
- Features animated chat log with AI reasoning
python src/5d_chess.py- Implements full 5D chess rules with timeline branching
- Visualizes multiple timelines and parallel universes
- Shows temporal and spatial moves with animations
- Includes advanced UI with themed rendering
Grandmaster/
├── src/
│ ├── 2d_chess.py # Traditional chess implementation
│ ├── 3d_chess.py # Three-level chess visualization
│ ├── 5d_chess.py # 5D chess with multiverse time travel
├── .env # Environment variables (API keys)
└── README.md # This file
- Uses python-chess for move validation and board state
- Implements LangChain agent for move generation
- Features Tkinter-based GUI with Unicode chess pieces
- Includes console-based board visualization tool
- Custom 3D chess rules with three vertical levels
- Animated chat log showing AI reasoning
- Level-based move validation and piece tracking
- Enhanced visualization with multiple board views
- Complete implementation of official 5D chess rules
- Timeline branching and parallel universe management
- Advanced rendering with PySide6 and OpenGL
- Sophisticated move validation across dimensions
- Rich animations and visual effects
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by 5D Chess With Multiverse Time Travel
- Built using OpenAI's GPT models and LangChain
- Special thanks to the chess programming community
For questions and support, please open an issue in the GitHub repository.