Implementation of a chess engine based on Minimax with Alpha Beta Pruning.
This is a chess engine implementation in Go that uses the Minimax algorithm with Alpha-Beta pruning for move calculation. It includes both a command-line interface and a web server component.
- Go 1.23.2 or higher
- notnil/chess package
- Clone the repository:
git clone <repository-url>
cd chess-engine- Install dependencies:
go mod downloadRun the engine with a specific FEN position:
go run main.go "your-fen-string"If no FEN string is provided, it will use a default position.
The engine also provides a web server interface that runs on port 2828.
- Start the server:
go run main.go- Available endpoints:
GET /- Basic health checkPOST /info- Calculate best move for a given position{ "depth": 5, "fen": "your-fen-string" }POST /analysis- Analyze chess positions (WIP)
DEBUG: Set to any value to enable debug output
- Minimax algorithm with Alpha-Beta pruning
- Iterative Deepening Search (IDS)
- Position evaluation using piece values and piece-square tables
- Web API for move calculation
- Support for FEN position input
main.go- Entry pointengine/- Core chess engine implementationcontroller/- Web server and API handlerstest/- Test utilities