Changes

Jump to: navigation, search

Apery

5,156 bytes added, 15:50, 8 August 2020
Created page with "'''Home * Engines * Apery''' border|right|thumb|250px| [[:Category:Toriyama Sekien|Toriyama Sekien - [https://en.wikipedia.org/w..."
'''[[Main Page|Home]] * [[Engines]] * Apery'''

[[FILE:SekienAyakashi.jpg|border|right|thumb|250px| [[:Category:Toriyama Sekien|Toriyama Sekien]] - [https://en.wikipedia.org/wiki/Ayakashi_(y%C5%8Dkai) Ayakashi] <ref>[https://en.wikipedia.org/wiki/Ayakashi_(y%C5%8Dkai) Ayakashi] from the [https://en.wikipedia.org/wiki/Konjaku_Gazu_Zoku_Hyakki Konjaku Gazu Zoku Hyakki] (今昔画図続百鬼) by [[:Category:Toriyama Sekien|Toriyama Sekien]], circa 1779, [https://en.wikipedia.org/wiki/Wikimedia_Commons Wikimedia Commons]</ref> ]]

'''Apery''',<br/>
an [[USI]] compliant [[:Category:Open Source|open source]] [[Shogi]] engine developed by [[Takuya Hiraoka]],
initially written in [[Cpp|C++]], in 2019 ported to [[Rust]] <ref>[https://github.com/HiraokaTakuya/apery_rust GitHub - HiraokaTakuya/apery_rust: USI shogi engine written in Rust]</ref>,
licensed under the [[Free Software Foundation#GPL|GPL v3.0]]. Apery's [[Search|search]] is derived from [[Stockfish]] with [[Board Representation|board representation]] and [[Move Generation|move generation]] adopted to Shogi,
including [[Magic Bitboards|magic bitboards]] for the [[Sliding Pieces|sliding pieces]] [[Rook|rook]], [[Bishop|bishop]], as well as the [[Sliding Piece Attacks|sliding attack subsets]] of the promoted dragon and horse - of course due to the 7-bit inner piece occupancy of the 9x9 board, somewhat bigger tables.
The improved search of the Rust version makes it stronger than the C++ version, despite a little bit lower [[Nodes per Second|NPS]].
Apery's initial [[Evaluation|evaluation]] was [[Bonanza]] like, using [[Piece-Square Tables|piece-square tables]] indexed by king location and further two-piece locations, dubbed KPP or KKP.
More recent versions require evaluation function binaries as a sub-module as specified by the USI Eval_Dir command.
Since 2012, Apery regularly participates at [[World Computer Shogi Championship|World Computer Shogi Championships]]. It won the [[WCSC24]] in 2014, and became third at the [[WCSC28]] in 2018.

=Bitboards=
Shogi [[Bitboards]] are defined as [[Array|array]] of two [[Quad Word|quad words]].
==[[Cpp|C++]]==
The C++ Apery has a conditional compiled [https://en.wikipedia.org/wiki/Union_type union type] with 128-bit type __m128i,
explicitly taking advantage of [[SSE2]] and [[SSE4]] instructions <ref>[https://github.com/HiraokaTakuya/apery/blob/master/src/bitboard.hpp apery/bitboard.hpp at master · HiraokaTakuya/apery · GitHub]</ref>.
<pre>
class Bitboard {
...
private:
#if defined (HAVE_SSE2) || defined (HAVE_SSE4)
union {
u64 p_[2];
__m128i m_;
};
#else
u64 p_[2]; // p_[0] : Seeing from the front, 1 to 79 are arranged vertically. Use 63 bits. Call it right.。
// p_[1] : Seeing from the front, 8 bits from 1 to 19 are arranged vertically. Use 18 bits. Call it left.
#endif
};
</pre>
==[[Rust]]==
<ref>[https://github.com/HiraokaTakuya/apery_rust/blob/master/src/bitboard.rs#L6 apery_rust/bitboard.rs at master · HiraokaTakuya/apery_rust · GitHub]</ref>
<pre>
pub struct Bitboard {
pub v: [u64; 2],
}
</pre>
=Publications=
* [[Takenobu Takizawa]], [[Takeshi Ito]], [[Takuya Hiraoka]], [[Kunihito Hoki]] ('''2015'''). ''[https://link.springer.com/referenceworkentry/10.1007/978-3-319-08234-9_22-1 Contemporary Computer Shogi]''. [https://link.springer.com/referencework/10.1007/978-3-319-08234-9 Encyclopedia of Computer Graphics and Games]

=Forum Posts=
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=61407 Japanese Chess (Shogi) Engines USI - Shogidokoro-GUI 3.7.2] by [[Norbert Raimund Leisner]], [[CCC]], September 12, 2016
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=61441 WinBoard 4.8.0 for Shogi - Tanuki USI Engine] by [[Norbert Raimund Leisner]], [[CCC]], September 16, 2016
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=72754&start=1 Re: The Stockfish of shogi] by [[Fabian Fichter]], [[CCC]], January 07, 2020

=External Links=
==Shogi Engine==
* [https://hiraokatakuya.github.io/apery/ Apery]
* [https://github.com/HiraokaTakuya/apery_rust GitHub - HiraokaTakuya/apery_rust: USI shogi engine written in Rust]
* [https://github.com/HiraokaTakuya/apery GitHub - HiraokaTakuya/apery: a USI Shogi engine]
* [https://www.apply.computer-shogi.org/wcsc30/appeal/Apery/apery_appeal_wcsc30.html WCSC30 Apery Appeal document] (Japanese)
==Misc==
* [https://en.wikipedia.org/wiki/Roger_Ap%C3%A9ry Roger Apéry from Wikipedia] » [[Mathematician#RApery|Roger Apéry]]
* [https://mathshistory.st-andrews.ac.uk/Biographies/Apery/ Roger Apéry (1916 - 1994) - Biography] - [https://en.wikipedia.org/wiki/MacTutor_History_of_Mathematics_archive MacTutor History of Mathematics]
* [https://en.wikipedia.org/wiki/Ap%C3%A9ry%27s_constant Apéry's constant from Wikipedia]
* [https://en.wikipedia.org/wiki/Ap%C3%A9ry%27s_theorem Apéry's theorem from Wikipedia]

=References=
<references />
'''[[Engines|Up one Level]]'''
[[Category:Shogi]]
[[Category:GPL]]
[[Category:Open Source]]
[[Category:USI]]
[[Category:PC]]
[[Category:X64]]
[[Category:Rust]]
[[Category:Windows]]
[[Category:Linux]]
[[Category:Demonology]]
[[Category:Toriyama Sekien]]

Navigation menu