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



Petrel 1.0 JA - new chess engine (Linux and Windows)


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



Comments