Senpai

From Chessprogramming wiki
Jump to: navigation, search

Home * Engines * Senpai

Katsushika Hokusai, The Great Wave off Kanagawa [1]

Senpai, (Japanese: 先輩)
an UCI compliant open source chess engine by Fabien Letouzey, written from scratch in C++11 and distributed under the GNU General Public License version 3. Senpai 1.0 was precisely published ten years after the release of Fruit 1.0 on March 17, 2014 [2] . It comes with one source file, senpai_10.cpp, structured by namespaces, further with executables for various platforms and operating systems, such as Linux, Mac OS, Windows and Android [3]. Senpai 2.0 released in November 2017 was a complete rewrite with a consistent codebase for multiple games such as Draughts, Chess960, Shogi, and Othello [4].

Description

Board Representation

Senpai is a bitboard engine and maps consecutive bits to squares along a file (a1,a2,...,a8,b1,...h8). With the option to implement magic bitboards later, Senpai so far uses the Blockers and Beyond loop approach to determine attack-sets for all pieces except pawns, while Senpai 2.0 features PEXT bitboards for BMI2 platforms. BitScan aka trailing zero count, and population count use GCC builtins [5] if available for the target architecture, and otherwise rely on De Bruijn multiplication and SWAR-popcount. In Senpai 2.0 the copy/make approach is used, customary in games with fewer piece types than chess.

Lefr.JPG

Senpai's Little-Endian File-Rank Mapping [6]

Search

Senpai applies a parallel search with one master and a pool of helper threads, following the Young Brothers Wait Concept. The serial search is PVS alpha-beta with transposition table inside an iterative deepening framework with aspiration windows. Beside the obligarory Null move pruning and LMR, Senpai further uses late move pruning and more aggressive futility pruning the last few plies. Senpai 2.0 further applies restricted singular extensions and additional reduction/pruning of "losing" moves (SEE< 0).

Evaluation

Compared to Fruit's evaluation, Senpai has a more precise mobility considering safety and center weights, and evaluates tactical moves. Senpai 2.0 considers a tempo and space, and uses a scoring by logistic regression.

Etymology

Senpai is a Japanese term applied to the mentor system in wide use in Japanese culture, roughly equivalent to the Western concept of a mentorship. In Japanese martial arts, the term Senpai generally refers to senior level students who hold a black belt [7] . Use in English may carry humorous or affectionate connotations. This is possibly due to (assumed) reference to modern Japanese media, or possibly a lexical gap [8] .

See also

Forum Posts

External Links

Chess engine

Misc

Hiromi Uehara, Anthony Jackson, Steve Smith

References

Up one level