Skip to main content

Since you’re here...

... we have a small favour to ask. More people, like you, are reading and supporting our blog: "Chess Engines Diary". And unlike many other sites and blogs, we made the choice to keep our articles open for all, regardless of where they live or what they can afford to pay.

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.3.0



Tofiks - UCI chess engine
Rating CEDR=2256

v.1.3.0:
Score from 32bit to 16bit and Move from 16bit to 32bit. I decided to change up the types of the data my engine uses internally. I shifted 16bits from evaluation score used by the search towards the move type. 16bits is plenty to calculate scores for search with more than sufficient granularity. However, certain actions like finding the bitboard of the piece moved or determining if the move is a capture take significant calculation. This information is now also included in the Move type along with flags for isCastling, isDoublePawnPush.

While this change significantly slowed down my move generation it did speed up the make move functionality. The trade-off advantage for now seems minor but there are probably more potential speed up's available to be discovered. Also I still have 10bits unused from the 32.

Threefold repetition downgraded to twofold repetition
Threefold repetition I believe is just a human rule so that games do not accidentally and abruptly end in a draw when they shouldn't. But logically it does not make sense. If we assume we always play the best moves and the best moves only then if a position repeated itself twice there should be no logical reason it should not repeat itself thrice. Checking for 2-fold repetition is of course significantly cheaper than 3-fold. But I also discovered that the engine could not see three fold repetition draws from a distance because the transposition table would not permit the same position to be played out thrice. When we first repeat a position that is by definition a transposition to the initial position and a transposition table should be able to see that. So I noticed that I never hit the threefold repetition rule. I tested this in a completely lost position where the only way out is to check the enemy king any other move leads to instant mate. While the engine saw the mate and avoided it by delivering checks it could actually not determine that it was actually a draw but gave the evaluation still as favoring the opposition.

Tests, tests, tests... and fix some bugs
Like the threefold to twofold repetition bug was discovered by a test, some other bugs were too. I found a small inconsistency where white bishops would be valued more than black bishops. This is due to having a bug in eval - I entered a lot of positions which I evaluated without any further search. Flipped the colors and the side to move to represent the same position with swapped colors. And I found that in some circumstances the symmetry was broken and there was a bias in the colors.

Overall I had neglected tests for too long in my development. I have built a small and non-comprehensive list of tests:

Perft 6 positions from Chess Programming Wiki Perft results
Mate a small collection of mates from mate in 3 to mate in 6
PV correctness - check if the reported PV actually represents valid moves
Draw by repetition and forcing a draw in a otherwise lost game
Evaluation symmetry
Fuzz testing for encoding and decoding information to the transposition hash table
This is a small list and there positions in each are not exhaustive but it still has helped me with development speed due to the ability to making bold changes and simply re-running the tests and giving me a baseline confidence that it still functions mostly as it should.

Results
I played a round robin tournament with versions 1.0 through 1.3 to determine their relative strengths.

Rank Name                          Elo     +/-   Games    Wins  Losses   Draws   Points   Score    Draw   White   Black 
   1 tofiks-1.3                    182      27     600     378      89     133    444.5   74.1%   22.2%   74.8%   73.3% 
   2 tofiks-1.2                    108      25     600     315     134     151    390.5   65.1%   25.2%   69.2%   61.0% 
   3 tofiks-1.1                    -28      24     600     202     250     148    276.0   46.0%   24.7%   46.3%   45.7% 
   4 tofiks-1.0                   -304      35     600      57     479      64     89.0   14.8%   10.7%   15.3%   14.3% 
Given 3 weeks of development I am quite happy with the progress I have made.





Comments

Popular posts from this blog

New Strong Engines Test, by Chess Engines Diary, 2024.04.12

  💾  552 (!) games from the tournament download   👍 @chessenginesdiary  Country - Poland, City -  Malbork 🕓 Time 3'+3" 💻HP Pavilion i5-1035G1 8GB RAM 🖬 GUI-Banksia All  CEDR  317.321 games download  (01.04.2024 - 3'+3")  HypnoS 030424, Yuli GM Pro 16, Stockfish 16.1 and ShashChess 35 . These four engines scored the same number of points and placed at the top of the table in this strong tournament. Tech table: Engine KN/move NPS dep/mov time/mov mov/game time/game fails Alexandria 6.1.0 3218 576429 30.2 5.6 56.7 316.2 Berserk 13 4779 841025 36.7 5.7 56.0 318.1 Brainlearn 28 2275 366977 31.4 6.2 43.5 269.4 Caissa 1.18 5492 923486 30.2 5.9 50.4 299.7 Clover 6.1.19 4803 854377 31.4 5.6 62.2 349.4 Cool Iris 12.10 2201 356730 27.6 6.2 51.2 315.5 CorChess 20240331 2253 372774 27.4 6.0 52.2 315.8 Crystal 8 3582 571994 20.3 6.3 47.7 298.8 Fire 9.3 5225 876565 22.0 6.0 55.5 331.1 Fisherov chess monk 1.2 3487 619728 36.0 5.6 60.4 340.0 Hyp

New version chess engine: Raid 3.6 TacticaL RetreaT (Stockfish derivative)

Raid - is a Stockfish derivative . Rating CEDR=3743 Raid 3.2 - results: Polyfish 240114 7/14 +0 14 Games Hazard 4.21 DuaL 6.5/12 +1 12 Games Leptir 100124 6/12 +0 12 Games Arasan 24.1 7.5/10 +5 10 Games Uralochka 3.41 dev1 6/10 +2 10 Games Caissa 1.16 5.5/10 +1 10 Games SF-PRO 07.01.2024 5/10 +0 10 Games Stockfish 20240117 5/10 +0 10 Games Minic 3.41 7/8 +6 8 Games Pawn 3.0 6.5/8 +5 8 Games Texel 1.11 5.5/8 +3 8 Games RubiChess 20240112 5/8 +2 8 Games CorChess 20240103 4/8 +0 8 Games Counter 5.5 4.5/6 +3 6 Games Obsidian 10.0 3.5/6 +1 6 Games Fisherov chess monk 1.2 3/6 +0 6 Games Avalanche 2.1.0 3.5/4 +3 4 Games Starzix 4.0 2.5/4 +1 4 Games Cool Iris 11.80 2/4 +0 4 Games Blue Marlin 15.7 2/4 +0 4 Games AI 28.0 2/4 +0 4 Games

New version chess engine: Lc0 v.0.31.0-rc2

LcZero - CEDR Rating=3712 v0.31.0-rc2: In this version: Changed cuda compilation options to use -arch=native or -arch=all-major if no specific version is requested, with fallback for older cuda that don't support those options. Updated android builds to use openblas 0.3.27. A few small fixes. Individual statistics:  Lc0 BT4 Clover 6.1 5.5/8 +3 8 Games RofChade 3.1 4.5/8 +1 8 Games Dragon 3.3 4.5/8 +1 8 Games SF-PRO 19.11.2023 4/8 +0 8 Games YuliGM PrO 15 3.5/8 -1 8 Games ShashChess 34.5 3.5/8 -1 8 Games Sawfish 2TC 3.5/6 +1 6 Games Polyfish 231120 3.5/6 +1 6 Games Hazard 4.1 3/6 +0 6 Games Raid 3.1 3/6 +0 6 Games Eman 9.80 3/6 +0 6 Games Incognito 4 3/6 +0 6 Games Vanilla 14c 3/6 +0 6 Games Patzer AI X-256 2.5/6 -1 6 Games SugaR AI SE 2.5/5 +0 5 Games Altair 6.0.0 3.5/4 +3 4 Games Caissa 1.15 3/4 +2 4 Games Seer 2.8.0 2.5/4 +1 4 Games Fisherov chess monk 1.2 2.5/4 +1 4 Games Crystal 7 CMB 2.5/4 +1 4 Games Chess-System-Tal-2 2.5/4 +1 4 Games Lc0 v.0.31.0-rc2 (gpu-nvidia-cudnn) d

Yuliirma 4.0 wins Strong Engines Tournament (Tests by Jörn Gronemann, Heide, 2024.04.26 Time: 3'+3")

Our next test, a large tournament in which over 1,000 games were played, was won by the Yuliirma 4.0 chess engine. This engine is only available to our testers. In second place is the official version of Stockfish 16.1 and in third place is Stockfish 20240421 . GPU NVIDIA  RTX 3060 ti. GUI-Banksia, For Every Engine only 1 CPU and 512 Hashtables, Book - short ICCF book,  6TBs. 🕒🕒Time 3'+3"   1050 (!!!) tournaments games download   💾 All games CEDR  317.321 games download  01.04.2024  (3'+3")    @chessenginesdiary

New version chess engine: ShashChess 35.1

ShashChess - UCI chess engine. Rating CEDR=3747 (01.04.2024) ShashChess is a free UCI chess engine derived from Stockfish family chess engines.  v.35.1: ShashChess 35.1 Nodestime option corrected futility pruning: parent node ShashChess 34.5 - results: Corchess 20231123 50.5/100 +1 100 Games Eman 9.80 19.5/38 +1 38 Games Patzer AI X-256 18.5/38 -1 38 Games Brainlearn 26.4 18/38 -2 38 Games Hazard 4.1 17.5/36 -1 36 Games Raid 3.1 16/32 +0 32 Games Crystal 7 CMB 16/32 +0 32 Games Dragon 3.3 16.5/30 +3 30 Games Polyfish 231120 15.5/30 +1 30 Games Stockfish 16 15/30 +0 30 Games Sawfish 2TC 14/28 +0 28 Games Deep Blue 20230628 14/28 +0 28 Games Incognito 4 12.5/26 -1 26 Games YuliGM PrO 15 12.5/24 +1 24 Games Vanilla 14c 12/24 +0 24 Games Fisherov chess monk 1.2 13/22 +4 22 Games Cool Iris 11.50 11/22 +0 22 Games SF-PRO 19.11.23 8.5/16 +1 16 Games YuliGM Pro 14 6/12 +0 12 Games Killfish 231123 6/12 +0 12 Games Killfish 071223 5.5/12 -1 12 Games ShashChess 35.1 - download