Petrel, about the engine:
This engine is not strong, fast, or simple. It is relatively stable enough to serve as a sparring opponent for a weak engine.
The source code may be interesting for chess programmers due to several novel chess data structures.
The engine uses neither mailbox nor bitboard board representations. The fundamental data structure is a 16-byte vector: a vector of bytes for each chess piece on one side of the chessboard.
The engine incrementally updates the attack table using a unique data structure— a matrix of pieces and bitboards. Each bitboard rank is stored separately in one of 8 piece vectors. This allows a very fast implementation of the attackTo() function and relatively fast updates of the attack table state. The engine uses the so-called Reversed BitBoard (aka Hyperbola Quintessence) method for generating attacks of sliding pieces (bishops, rooks, queens).
Fully legal moves are generated in bulk from the attack matrix.
During the chess tree search, the engine does not distinguish between white and black playing sides. The PositionSide class represents a chess side without color specificity. Internally, squares are relative to each side's base rank, so all pawns push from RANK_2 and promote at RANK_8, both kings start at E1 square, etc.
Zobrist hashing uses only a few keys per piece type, which rotate to generate a key for each square. Changing the position's move side to move (null move) is a byte-reversed operation. This Zobrist implementation allows hash transpositions with color changes.
Author: Aleks Peshkov
Petrel 3.1 what's new?
First version with NNUE static evaluation. (768 -> (2*128) -> 1 scheme, bullet quantised.bin file).
minor time management improvement (petrel will spend more time on first moves)
CounterMove and FollowUpMove heuristics use first 2 legal moves out 4 in one slot (Move[Color][Piece][Square][4] array)
other minor move ordering improvements
Fixes from 3.0:
fixed serious evaluation accumulator incremental update bug
fixed code to use default bullet scale 400 and rebuild NN file for this scale (compatibility fix)
Attached linux binary file (requires external NN file in current working directory).
Windows/Linux & Android PGO builds by Jim Ablett (with embeded NN file):
Petrel 1.0 JA vs other engines:
| Critter 1.6a | 0/16 | -16 | 16 Games |
| Trout 1.0 JA | 4/14 | -6 | 14 Games |
| Senpai 2.0 JA | 0/14 | -14 | 14 Games |
| Rebel Extreme 1.1 | 0/14 | -14 | 14 Games |
| Molybdenum 4.1 JA | 0/14 | -14 | 14 Games |
| Topas 1.3.3 JA | 6.5/13 | +0 | 13 Games |
| Defenchess 2.3 JA | 0/13 | -13 | 13 Games |
| Pounce 1.2.4.8 JA | 3/11 | -5 | 11 Games |
| Rustic 3.99.0 JA | 6/10 | +2 | 10 Games |
| Wordfish 1.0 | 0/10 | -10 | 10 Games |
| Integral 7 dev.8bab JA | 0/10 | -10 | 10 Games |
| Spirit 040825 | 0/10 | -10 | 10 Games |
| Spirit 100825 | 0/9 | -9 | 9 Games |
| Omega 10 | 0/8 | -8 | 8 Games |
| Knightx 4.5 | 0/8 | -8 | 8 Games |
| Stockfish dev-20250809 | 0/8 | -8 | 8 Games |
| YuliGM Pro 20 | 0/8 | -8 | 8 Games |
| ShashChess 39 | 0/7 | -7 | 7 Games |
| Benbot 1.4.4 | 4/4 | +4 | 4 Games |
| Belofte 2.1.9 (u) JA | 4/4 | +4 | 4 Games |
| Rustic 3.99.0 | 2.5/4 | +1 | 4 Games |
Jim Ablett compiles:

Comments
Post a Comment