A high-performance chess engine written in C, featuring an advanced move generation system, graphical interface, and bot API for automated gameplay.
- Bitboard representation for efficient board state management
- Magic bitboards for O(1) sliding piece move generation
- Multi-threaded perft testing achieving up to 80 million moves per second
- Compact move structures optimized for cache efficiency
- Interactive chess board with visual piece movement
- Human vs Bot gameplay
- Bot vs Bot gameplay
- bot communication
- Support for bot vs bot matches
- Standardized move format and game state representation
- Easy integration for custom chess engines
- Legal move generation with full rule support
- Evaluation function for position assessment
- Search algorithms for move selection
- Support for standard chess notation
- GCC or compatible C compiler
- Make build system
- POSIX threads support (for multi-threading)
- SDL2 for ui
# Clone the repository
git clone [https://github.com/TomBaran501/chessboardEngine.git]
cd [chessboardEngine]
# Build and run the project
make runComprehensive documentation is available in the documentation/ folder:
- Move Generation - Technical details on the legal move generation system, optimization techniques, and performance benchmarks
- Bot API - API specification for developing and connecting chess bots
- Main Commands - Command-line interface reference and usage guide
Launch the graphical interface and play against the built-in chess engine. Use the documented commands to control the game flow.
Start the API server and connect your bots to compete against each other. See the Bot API documentation for integration details.
Run perft tests to verify move generation correctness and measure performance:
./chess
go perft [depth]├── src/ # Source code files
├── lib/ # Header files
├── documentation/ # Project documentation
├── tests/ # Test suites
├── bots/ # Test suites
├── Makefile # Build configuration
└── README.md # This file
- Move generation: Up to 80 million moves/second (perft)
- Evaluation speed: Between 5 millions and 40 millions positions evaluated per second
- Efficient bitboard-based board representation
- Magic bitboard move generation for sliding pieces
- Multi-threaded perft calculations
- Cache-optimized data structures
- Minimal memory footprint per move
MIT License
Copyright (c) 2025 Baran Tom
- Magic bitboard implementation inspired by Chess Programming Wiki
- Perft positions from standard test suites
Note: This is an educational/hobby project demonstrating advanced techniques in chess programming and game engine development.