My first bitboard-based engine.
Obtain a third-party UCI-compatible chess GUI. Build this module's binary file locally (go build
). In the GUI settings, set the binary file as the "engine to use."
Perft is a debugging function that compares a move tree's leaf node count against an accepted value. The largest performance gains were from reducing memory allocations and the associated GC time.
Depth | Time | Speed (million leaves/s) |
---|---|---|
perft(4) | 0.15s | 1.35 |
perft(5) | 1.4s | 3.5 |
perft(6) | 16s | 7.1 |
I recommend starting by making a command-line game that makes random, legal moves against the player. At that point, reading about move generator debugging, search algorithms, and evaluation algorithms will help your engine make stronger moves.