Senpai
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].
Contents
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.
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
- Senpai 1.0 (new engine) by Fabien Letouzey, CCC, March 17, 2014
- First blitz impressions: Senpai 1.0 et al by Mike Scheidl, CCC, March 18, 2014
- C++11 threads seem to get shafted for cycles by User923005, OpenChess Forum, March 18, 2014 » C++, Parallel Search, Thread
- Kohai 1.0 Released - a Senpai Derivative by Michael B, CCC, June 06, 2016
- Senpai 2.0 by Fabien Letouzey, CCC, November 10, 2017
External Links
Chess engine
- Senpai Chess Engine - Computer Chess Programming hosted by Steve Maughan
- Frank's Chess Page, Senpai by Fabian Letouzey hosted by Frank Quisinsky
- Senpai 2.0 64-bit 4CPU in CCRL 40/40
Misc
- Senpai and kōhai - Wikipedia
- senpai - Wiktionary
- 先輩 - Wiktionary
- Sensei - Wikipedia
- Hiromi The Trio Project – Dançando no Paraíso, YouTube Video
References
- ↑ The Great Wave off Kanagawa, Katsushika Hokusai, c. 1829–32, the first print in Hokusai's series Thirty-six Views of Mount Fuji, current location: Library of Congress, see Culture of Japan
- ↑ Senpai 1.0 (new engine) by Fabien Letouzey, CCC, March 17, 2014
- ↑ Senpai Chess Engine - Computer Chess Programming hosted by Steve Maughan
- ↑ Senpai 2.0 by Fabien Letouzey, CCC, November 10, 2017
- ↑ __builtin_ctzll,__ builtin_popcountll, Other Builtins - Using the GNU Compiler Collection (GCC)
- ↑ Bibob image
- ↑ Senpai and kōhai - Wikipedia
- ↑ senpai - Wiktionary
- ↑ Kohai 1.0 Released - a Senpai Derivative by Michael B, CCC, June 06, 2016
- ↑ GitHub - MichaelB7/Kohai-Chess: UCI Chess Engine, a derivative of Senpai 1.0