Since you’re here...

We hope you will consider supporting us today. We need your support to continue to exist, because good entries are more and more work time. Every reader contribution, however big or small, is so valuable. Support "Chess Engines Diary" even a small amount– and it only takes a minute. Thank you.
============================== My email: jotes@go2.pl



Chess engine: Tofiks 1.1.0


Tofiks - UCI chess engine

v.1.1.0:
Again it's been not quite a year but a lot of time has passed since v1.1.0 in November 2022. There have been a lot of bug fixes, refinements and performance tweaks. Most notably the addition of an Aspiration Window during the Iterative Deepening Search which allows for a narrower search window and increases overall performance. Improved MVV-LVA and added History and KillerMove heuristics allow for better move ordering and that enables Late Move Pruning - when at depth the search will only look at the most promising moves ignoring moves late in the order.

There were also some failed experiments. Like LazySMP or implementing some Texel tuning for Piece-Square-Tables. While failed and shelved, lessons were learnt and I hope to revisit both of them soon. There also seems to still be some bugs with the PV line sometimes containing errors. I was not able to track it down but my guess is it has to do with some Transposition Table shenanigans. Before moving onto LazySMP that needs to be fully resolved as it relies heavily of an efficient use of Transposition Tables. Texel - I want to overhaul the evaluation part before I go into investing time into optimizing its values.

I also want to add more search heuristics like Late Move Reductions - looking at moves later in the move order at reduced depth. Some search extensions for most promising moves could also be investigated.

So that's all talk. How does it actually compare to v1.0.0 in its chess playing ability?

I ran a 200 game match between the two versions with a time control of 10s+0.5s and positions from the Arasan.pgn book with 10ply depth.

Score of tofiks-v1.1 vs tofiks-v1.0: 139 - 32 - 29 [0.767]
...      tofiks-v1.1 playing White: 66 - 14 - 20  [0.760] 100
...      tofiks-v1.1 playing Black: 73 - 18 - 9  [0.775] 100
...      White vs Black: 84 - 87 - 29  [0.492] 200
Elo difference: 207.5 +/- 51.5, LOS: 100.0 %, DrawRatio: 14.5 %
200 of 200 games finished.
So that's about +200 Elo difference and a clear improvement.

Installation
Latest stable version 64-bit binaries can be found in the release section.

Compile yourself
Clone repository or copy files
Make sure you have Golang 1.19+ installed
make build will compile it your native architecture.
In the Makefile you can change the GOAMD64VERSION variable. The values range from v1 to v4 and include various sets of extended instruction sets. A higher v-value should be expected to have better performance but might have more specific architecture and instruction set extension requirements. Most modern CPUs should be AVX2 compatible which is v3, v4 requires AVX512 support.
Feature Overview
Magic Bitboard move generator
MVV-LVA move ordering
Principal Variation Search with Aspiration Window
Null Move pruning
Late Move pruning
Transposition table
History Heuristic
Killer Move Heuristic
Quiescence search
Draw detection - repetition, 50-move rule and insufficient material
Piece-Square-Table evaluation for early game and endgame.
Pawn structure evaluation
King safety-activity evaluation
Piece specific evaluation
PolyGlot opening book support
Supported UCI commands and options:
uci - 'handshake' initialization by the GUI, engine responds with its id and supported options with their defaults and ranges
go - with the following options: wtime, btime, winc, binc, movestogo, depth, movestime, ponder and infinite
setoption name <option> value <value>
Ponder default false
OwnBook default false - if there is a PolyGlot book.bin in the same directory as the executable the engine will try to load it and allow the option to be toggled.
Hash - Transposition Table size in MB
Move Overhead - lag compensation variable. Works as a negative increment to reduce the alloted thinking time. Crucial for playing over the web where the go time variables might be already outdated when receiving the command and also adjust for the time the for the GUI to receive the bestmove.
Non-UCI commands:
go perft <depth> - perft display number of leaf nodes at depth grouped by legal moves in the position also displays the nodes per second value for performance benchmarking.
Acknoledgments
Lichess and the Community for nuturing my love for chess and offering a free open source platform for chess. Tofiks can be found playing on lichess under its bot account.
The authors of Official lichess bot client. It saved a lot of time and headaches adopting a reliable solution to interact with the Lichess API instead of coding all myself.
The authors of Blunder engine. It is a great reference to practical examples of engine principles and algorithms with its well documented code.
Everyone on TalkChess.com Forums who have been helpful and patient explainging even very basic concepts to me.
Chess Programming Wiki and its maintainers for creating a very comprehensive resource for everything chess programming related.
What's Changed
feat: reduce movegen branching by @likeawizard in #25
feat: remove metadata from move type by @likeawizard in #27
feat: lockless TT by @likeawizard in #29
merge with master by @likeawizard in #30
23 lazy smp by @likeawizard in #31
feat: ttable search fixes by @likeawizard in #33
feat: aspiration window by @likeawizard in #34
feat: pv moves from line by @likeawizard in #35
feat: refactor and safer overhead by @likeawizard in #36
feat: late move pruning, fixed move ordering by @likeawizard in #37
History heuristic by @likeawizard in #38
feat: moveSelector for ordering moves by @likeawizard in #39
release: updated README.md and version by @likeawizard in #40
Full Changelog: v1.0.0...v1.1.0





Comments