Simplex is a (very) small mid-strength UCI chess engine written in Golang.
To play against it, you can challenge @SomeGoBot on Lichess.
The program uses a very slightly modified version of the library github.com/dylhunn/dragontoothmg, github.com/Cubix1729/dragontoothmg (with added null move support) for move generation and board state handling.
By default, Simplex uses a small NNUE network (with architecture 768 -> 128 -> 1).
A HCE (handcrafted evaluation function) is also available, with the following features:
- Material evaluation
- Piece-square tables
- Pawn structure evaluation
- Bonus for passed pawns
- Penalties for doubled and isolated pawns
- Bonus for rooks on open/semi-open files
- King safety
- Attacks near the king
- King virtual mobility (as a queen)
- Bishop pair bonus
- King-pawn tropism rewarding the king being close to friendly or ennemy pawns in the endgame
- Tapered interpolation between middlegame/endgame scores for all features
The HCE eval parameters aren't tuned, so they are probably suboptimal.
- Negamax with Alpha-Beta pruning
- Principal variation search (PVS)
- Late move reductions (LMR)
- Quiescence search
- Transposition table
- Iterative deepening
- Aspiration windows
- Move ordering with:
- Hash move first
- MVV-LVA
- Killer heuristic
- History heuristic
- Reverse futility pruning
- Razoring
- Futility pruning
- Late move pruning
- Delta pruning (for the quiescence search)
Simplex supports the UCI (Universal Chess Interface) protocol (at least the basic commands). It has only two UCI options:
Use NNUEto activate or deactivate the neural network evaluationHashto set the size of the transposition table (in MB)
Any contribution to this small project is welcome and appreciated! If you find a bug, want to suggest or add a feature, feel free to open an issue or a pull request.