This project consists of a basic chess engine (consumable as a library), a chess server and a web-based frontend. You can play against other users or against a bot, which uses a custom evaluation function under the hood that is around 1000 Elo.
- Java 21 for the chess engine and server with user management, login system and multiplayer game management
- Nuxt 3 for the user-facing frontend
- Custom websocket- and JSON-based protocol for data interchange between frontend and backend
- Microsoft Azure for hosting. Other providers work too, it's just what our deployment guide targets.
You can play chess against a bot around a 1000 Elo rating or choose to play against another user.
- Utilizes the Minmax algorithm with alpha-beta pruning for move generation, the depth of the search is proportional to the count of pieces on the board.
- Custom evaluation function, that calculates the value of a position based on material, mobility and if there is a checkmate. Here is a simplified version:
This is a very basic approach to chess evaluation.
public int evaluate() { return absoluteMaterialEvaluation() + mobilityEvaluation() + relativeMobilityEvaluation() + enemyInCheckMate(); }
- Basic move generation and validation
- Game logic to handle turns, check/checkmate detection, and game state management
- User management with login and session handling functionality
- Game management handling creating, joining, and playing games
- Custom communication protocol
- Login page
- Game lobby with active games and players
- Game creation, customization, and joining
- Interactive chessboard
- Game history
- Player information
- Responsive design for mobile and desktop
- Player chat functionality
- Themes for the chessboard