Older Version
Newer Version
GerdIsenberg
Nov 10, 2017
**[[Home]] * [[Engines]] * Senpai** || [[image:320px-Great_Wave_off_Kanagawa2.jpg link="https://en.wikipedia.org/wiki/File:Great_Wave_off_Kanagawa2.jpg"]] ||~ || **Senpai**, (Japanese: 先輩) an [[UCI]] compliant [[Open Source Engines|open source chess engine]] by [[Fabien Letouzey]], written from scratch in [[Cpp#11|C++11]] and distributed under the [[Free Software Foundation#GPL|GNU General Public License version 3]]. Senpai 1.0 was precisely published ten years after the release of [[Fruit|Fruit 1.0]] on March 17, 2014 <ref>[[http://www.talkchess.com/forum/viewtopic.php?t=51637|Senpai 1.0 (new engine)]] by [[Fabien Letouzey]], [[CCC]], March 17, 2014</ref> . It comes with one source file, senpai_10.cpp, structured by namespaces, further with [[https://en.wikipedia.org/wiki/Executable|executables]] for various platforms and operating systems, such as [[Linux]], [[Mac OS]], [[Windows]] and [[Android]] <ref>[[http://www.chessprogramming.net/senpai/|Senpai Chess Engine - Computer Chess Programming]] hosted by [[Steve Maughan]]</ref>. 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]] <ref>[[http://www.talkchess.com/forum/viewtopic.php?t=65680|Senpai 2.0]] by [[Fabien Letouzey]], [[CCC]], November 10, 2017</ref>. || || [[Arts#Hokusai|Katsushika Hokusai]], The Great Wave off Kanagawa <ref>[[https://en.wikipedia.org/wiki/The_Great_Wave_off_Kanagawa|The Great Wave off Kanagawa]], [[Arts#Hokusai|Katsushika Hokusai]], c. 1829–32, the first print in Hokusai's series [[https://en.wikipedia.org/wiki/Thirty-six_Views_of_Mount_Fuji|Thirty-six Views of Mount Fuji]], current location: [[https://en.wikipedia.org/wiki/Library_of_Congress|Library of Congress]], see [[https://en.wikipedia.org/wiki/Culture_of_Japan|Culture of Japan]]</ref> ||~ ||^ || [[toc]] =Description= ==Board Representation== Senpai is a [[Bitboards|bitboard]] engine and [[Square Mapping Considerations#LittleEndianFileRankMapping|maps]] consecutive bits to squares along a [[Files|file]] (a1,a2,...,a8,b1,...h8). With the option to implement [[Magic Bitboards|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 [[BMI2#PEXTBitboards|PEXT bitboards]] for [[BMI2]] platforms. [[BitScan]] aka [[BitScan#TrailingZeroCount|trailing zero count]], and [[Population Count|population count]] use [[https://en.wikipedia.org/wiki/GNU_Compiler_Collection|GCC]] builtins <ref>__builtin_ctzll,__ builtin_popcountll, [[http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Other-Builtins.html|Other Builtins - Using the GNU Compiler Collection (GCC)]]</ref> if available for the target architecture, and otherwise rely on [[BitScan#DeBruijnMultiplation|De Bruijn multiplication]] and [[Population Count#SWARPopcount|SWAR-popcount]]. In Senpai **2.0** the [[Copy-Make|copy/make]] approach is used, customary in games with fewer [[Pieces|piece types]] than chess. || [[image:lefr.JPG width="326" link="Bibob"]] || || Senpai's [[Square Mapping Considerations#LittleEndianFileRankMapping|Little-Endian File-Rank Mapping]] <ref>[[Bibob]] image</ref> || ==Search== Senpai applies a [[Parallel Search|parallel search]] with one master and a pool of helper [[Thread|threads]], following the [[Young Brothers Wait Concept]]. The serial search is [[Principal Variation Search|PVS]] [[Alpha-Beta|alpha-beta]] with [[Transposition Table|transposition table]] inside an [[Iterative Deepening|iterative deepening]] framework with [[Aspiration Windows|aspiration windows]]. Beside the obligarory [[Null Move Pruning|Null move pruning]] and [[Late Move Reductions|LMR]], Senpai further uses [[Futility Pruning#MoveCountBasedPruning|late move pruning]] and more aggressive [[Futility Pruning|futility pruning]] the last few plies. Senpai **2.0** further applies [[Singular Extensions#RestrictedSE|restricted singular extensions]] and additional [[Reductions|reduction]]/[[Pruning|pruning]] of "losing" moves ([[Static Exchange Evaluation|SEE]]< 0). ==Evaluation== Compared to Fruit's [[Evaluation|evaluation]], Senpai has a more precise [[Mobility|mobility]] considering safety and [[Center Control|center weights]], and evaluates tactical moves. Senpai **2.0** considers a [[Tempo|tempo]] and [[Space|space]], and uses a scoring by [[Automated Tuning#LogisticRegression|logistic regression]]. =Etymology= Senpai is a Japanese term applied to the mentor system in wide use in [[https://en.wikipedia.org/wiki/Culture_of_Japan|Japanese culture]], roughly equivalent to the Western concept of a [[https://en.wikipedia.org/wiki/Mentorship|mentorship]]. In [[https://en.wikipedia.org/wiki/Japanese_martial_arts|Japanese martial arts]], the term Senpai generally refers to senior level students who hold a [[https://en.wikipedia.org/wiki/Black_belt_%28martial_arts%29|black belt]] <ref>[[https://en.wikipedia.org/wiki/Senpai_and_k%C5%8Dhai|Senpai and kōhai - Wikipedia]]</ref> . Use in English may carry humorous or affectionate connotations. This is possibly due to (assumed) reference to modern [[https://en.wikipedia.org/wiki/Media_of_Japan|Japanese media]], or possibly a [[https://en.wikipedia.org/wiki/Accidental_gap|lexical gap]] <ref>[[http://en.wiktionary.org/wiki/senpai|senpai - Wiktionary]]</ref> . =See also= * [[Chess-64]] * [[Fruit]] * [[Kōhai]] <ref>[[http://www.talkchess.com/forum/viewtopic.php?t=60393|Kohai 1.0 Released - a Senpai Derivative]] by [[Michael Byrne|Michael B]], [[CCC]], June 06, 2016</ref> <ref>[[https://github.com/MichaelB7/Kohai-Chess|GitHub - MichaelB7/Kohai-Chess: UCI Chess Engine, a derivative of Senpai 1.0]]</ref> =Forum Posts= * [[http://www.talkchess.com/forum/viewtopic.php?t=51637|Senpai 1.0 (new engine)]] by [[Fabien Letouzey]], [[CCC]], March 17, 2014 * [[http://www.talkchess.com/forum/viewtopic.php?t=51652|First blitz impressions: Senpai 1.0 et al]] by [[Michael Scheidl|Mike Scheidl]], [[CCC]], March 18, 2014 * [[http://www.open-chess.org/viewtopic.php?f=5&t=2618|C++11 threads seem to get shafted for cycles]] by [[Dann Corbit|User923005]], [[Computer Chess Forums|OpenChess Forum]], March 18, 2014 » [[Cpp|C++]], [[Parallel Search]], [[Thread]] * [[http://www.talkchess.com/forum/viewtopic.php?t=60393|Kohai 1.0 Released - a Senpai Derivative]] by [[Michael Byrne|Michael B]], [[CCC]], June 06, 2016 * [[http://www.talkchess.com/forum/viewtopic.php?t=65680|Senpai 2.0]] by [[Fabien Letouzey]], [[CCC]], November 10, 2017 =External Links= ==Chess engine== * [[http://www.chessprogramming.net/senpai/|Senpai Chess Engine - Computer Chess Programming]] hosted by [[Steve Maughan]] * [[http://www.amateurschach.de/main/_senpai.htm|Frank's Chess Page, Senpai by Fabian Letouzey]] hosted by [[Frank Quisinsky]] * [[http://www.computerchess.org.uk/ccrl/4040/cgi/engine_details.cgi?print=Details&each_game=1&eng=Senpai%201.0%2064-bit%204CPU#Senpai_1_0_64-bit_4CPU|Senpai 1.0 64-bit 4CPU]] in [[CCRL|CCRL 40/40]] ==Misc== * [[https://en.wikipedia.org/wiki/Senpai_and_k%C5%8Dhai|Senpai and kōhai - Wikipedia]] * [[http://en.wiktionary.org/wiki/senpai|senpai - Wiktionary]] * [[http://en.wiktionary.org/wiki/%E5%85%88%E8%BC%A9|先輩 - Wiktionary]] * [[https://en.wikipedia.org/wiki/Sensei|Sensei - Wikipedia]] * [[https://www.ronniescotts.co.uk/performances/view/896-hiromi-the-trio-project-featuring-steve-smith-and-anthony-jackson|Hiromi The Trio Project]] – [[https://en.wikipedia.org/wiki/Another_Mind|Dançando no Paraíso]], [[https://en.wikipedia.org/wiki/YouTube|YouTube]] Video > [[Videos#HiromiUehara|Hiromi Uehara]], [[Videos#AnthonyJackson|Anthony Jackson]], [[https://en.wikipedia.org/wiki/Steve_Smith_(musician)|Steve Smith]] > [[media type="youtube" key="AtSlIG_HKeg"]] =References= <references /> =What links here?= [[include page="Senpai" component="backlinks" limit="40"]] **[[Engines|Up one level]]**