A modern implementation of the Connect 6 game with an advanced AI opponent using the Minimax algorithm with Alpha-Beta pruning.
- Connect 6 Game
- 🎮 Multiple game modes:
- Player vs Player
- Player vs AI
- AI vs AI
- 🤖 AI with three difficulty levels:
- Easy (1-ply search)
- Medium (3-ply search)
- Hard (5-ply search)
- 🎯 Advanced AI using Minimax with Alpha-Beta pruning
- 💾 Save/Load game functionality
- 🎨 Modern UI with animations
- 📱 Cross-platform support
- 🔍 Detailed game statistics and analysis
- 🎯 Customizable board size (default 15x15)
- 💾 Game replay functionality
- Qt 6.0 or higher
- C++17 compatible compiler
- CMake 3.15 or higher
# Clone the repository
git clone git@github.com:impelixx/connect_6.git
cd connect6
# Create and enter build directory
mkdir build && cd build
# Configure and build
cmake ..
make
./connect6cmake -G "Visual Studio 17 2022" ..
cmake --build . --config Releasecmake -G "Xcode" ..
cmake --build . --config Releasecmake -G "Unix Makefiles" ..
makeConnect 6 is a two-player game played on a 15x15 board. Players take turns placing their pieces (black and white) on the board. The first player to create a line of 6 or more pieces in any direction (horizontal, vertical, or diagonal) wins the game.
- Players alternate turns placing one piece per turn
- Black moves first
- A win is achieved by creating a line of 6 or more pieces
- Lines can be horizontal, vertical, or diagonal
- The game ends in a draw if the board is filled without a winner
The game features an advanced AI opponent that uses:
- Minimax algorithm with Alpha-Beta pruning
- Pattern recognition for move evaluation
- Center control strategy
- Move ordering optimization
For detailed information about the AI implementation, see Algorithm Documentation.
connect6/
├── src/ # Source code
│ ├── ai/ # AI implementation
│ ├── gui/ # User interface
│ ├── core/ # Game logic
│ └── utils/ # Utility functions
├── include/ # Header files
├── tests/ # Unit tests
├── docs/ # Documentation
├── resources/ # Game resources
└── build/ # Build directory
-
Install required dependencies:
# Ubuntu/Debian sudo apt-get install qt6-base-dev cmake build-essential # macOS brew install qt@6 cmake # Windows # Install Qt 6 and Visual Studio
-
Configure development tools:
# Enable debug build cmake -DCMAKE_BUILD_TYPE=Debug ..
cd build
ctest --output-on-failureContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the Google C++ Style Guide
- Use meaningful variable and function names
- Add comments for complex logic
- Write unit tests for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- Qt Framework for the GUI
- Modern C++ features for performance optimization
- Alpha-Beta pruning algorithm for AI optimization
- Contributors and maintainers of the project


