go-chess-minimax, v1.3
Posted on

The library that implements a chess engine based on the minimax algorithm.
Replace a hash table with an LRU cache in a transposition table implementation, reuse it between searches and refactor.
Change Log
- transposition table:
- store transpositions in an LRU cache instead of a hash table;
- share a transposition table between searches;
- disable storing zero moves in a transposition table;
- refactoring.
Features
- move searcher used the negamax algorithm;
- optimizations:
- alpha-beta pruning;
- transposition table:
- storing transpositions in an LRU cache;
- hashing a transposition by its representation in Forsyth–Edwards Notation;
- replacing same transpositions on storing in all cases;
- sharing a transposition table between searches;
- searching termination:
- by a deep;
- by a time;
- position evaluation only by a material (based on an evaluation function of Claude Shannon);
- architecture features:
- easily extensible and composable architecture of searching;
- composable searching terminators.
Benchmarks
chessminimax.CachedSearcher:
BenchmarkCachedSearcher_1Ply-8 100000 17615 ns/op
BenchmarkCachedSearcher_2Ply-8 100000 18070 ns/op
BenchmarkCachedSearcher_3Ply-8 100000 18059 ns/op
Repository
Link: https://github.com/thewizardplusplus/go-chess-minimax/tree/v1.3.
Content: code.
License: MIT.