Older Version
Newer Version
GerdIsenberg
Apr 26, 2015
**[[Home]] * [[Engines]] * Winglet**
|| [[image:Winglet_with_attached_tufts_of_an_KC-135A.jpg link="http://en.wikipedia.org/wiki/File:Winglet_with_attached_tufts_of_an_KC-135A.jpg"]] ||~ || **Winglet**,
a didactic [[Open Source Engines|open source chess engines]] by [[Stef Luijten]] written in [[Cpp|C++]], licensed under the [[Free Software Foundation#GPL|GNU General Public License]]. The development of Winglet was documented on the website tutorial //Winglet, Writing a Chess Program in 99 Steps//, started in 2011, now hosted by the [[http://en.wikipedia.org/wiki/Wayback_Machine|Wayback Machine]] <ref>[[http://web.archive.org/web/20120621100214/http://www.sluijten.com/winglet/|Winglet, Writing a Chess Program in 99 Steps]] by [[Stef Luijten]], hosted by the [[http://en.wikipedia.org/wiki/Wayback_Machine|Wayback Machine]]</ref>. Winglet is intended as [[Bitboards|bitboard]] version of [[TSCP]] with [[WinBoard]] support <ref>[[http://www.talkchess.com/forum/viewtopic.php?t=38787|Writing a chess program in xx steps]] by [[Stef Luijten]], [[CCC]], April 18, 2011</ref>, and is loosely derived from [[Wing]], Stef Luijten's former private engine <ref>[[http://web.archive.org/web/20120621100214/http://www.sluijten.com/winglet/|Winglet, Writing a Chess Program in 99 Steps]] by [[Stef Luijten]], hosted by the [[http://en.wikipedia.org/wiki/Wayback_Machine|Wayback Machine]]</ref>, in the meantime also open source <ref>[[http://kirr.homeunix.org/chess/engines/Jim%20Ablett/WING/|Index of /chess/engines/Jim Ablett/WING]] by [[Jim Ablett]], hosted by [[Kirill Kryukov]]</ref>. ||
|| Winglet <ref>Winglet with attached [[https://en.wikipedia.org/wiki/Tuft_%28aeronautics%29|tufts]] of an [[https://en.wikipedia.org/wiki/Boeing_KC-135_Stratotanker|KC-135A]] during [[https://en.wikipedia.org/wiki/NASA|NASA]] Winglet stu dy 1979. The tufts are needed to measure the [[https://en.wikipedia.org/wiki/Airflow|airflow]], [[https://en.wikipedia.org/wiki/Wingtip_device#Winglet|Winglet from Wingtip device - Wikipedia]], [[http://www.dfrc.nasa.gov/Gallery/Photo/KC-135/HTML/EC79-11481.html|KC-135 EC79-11481: KC-135A in flight - closeup of winglet with attached tufts]], August 20, 1979</ref> ||~ ||^ ||
[[toc]]
=Description=
==Board Representation==
[[#SlidingAttacks]]Winglet applies a mixture of [[Kindergarten Bitboards]] and [[Magic Bitboards]] <ref>[[http://web.archive.org/web/20120621060943/http://www.sluijten.com/winglet/11movegen03.htm#Move_generation_for_sliding_pieces_-_magic_bitboards_|Writing a chess program in 99 steps - Move generation for sliding pieces]] by [[Stef Luijten]], [[http://en.wikipedia.org/wiki/Wayback_Machine|Wayback Machine]]</ref> to determine [[Sliding Piece Attacks|sliding piece attacks]] with 32 [[https://en.wikipedia.org/wiki/Kibibyte|KiB]] precalculated lookup tables[64][64] each on [[Ranks|ranks]], [[Files|files]], [[Diagonals|diagonals]] and [[Anti-Diagonals|anti-diagonals]], indexed by [[Squares|square]] and hashed line [[Occupancy|occupancy]] - the [[First Rank Attacks#TheOuterSquares|inner six bits]] multiplied by a [[Magic Bitboards|magic factor]] and shifted right by the strange looking 57, while 58 is more natural to ensure a six bit index range, using a constant factor (b-File) for all squares of a diagonal or anti-diagonal, ...
[[code format="cpp"]]
U64 arrDiagonalAttacks[64][64]] /* requires initialization */
U64 diagonalKindergartenAttacks(U64 occ, enumSquare sq) {
occ = (diagonalMaskEx[sq] & occ) * C64(0x0202020202020202) >> 58;
return arrDiagonalAttacks[sq][occ];
}
[[code]]
... but "magic" Winglet factors are designed such that the most significant bit of the 64-bit product will always be clear, that is positive if interpreted as signed 64-bit integer. It seems, Winglet's occupied index calculations emulate Wing's [[Rotated Bitboards|rotated bitboard]] indices for same attack table layout:
[[code format="cpp"]]
/* Winglet's occupancy state == Wing's occupancy state */
(occ & MG_DIAGA8H1MASK[sq]) * MG_DIAGA8H1MAGIC[sq] >> 57 == (occ045 >> DIAGA8H1_ATTACK_SHIFT[sq]) & 63
(occ & MG_DIAGA1H8MASK[sq]) * MG_DIAGA1H8MAGIC[sq] >> 57 == (occ315 >> DIAGA1H8_ATTACK_SHIFT[sq]) & 63
(occ & MG_FILEMASK[sq]) * MG_FILEMAGIC[sq]) >> 57 == (occ090 >> FILE_ATTACK_SHIFT[sq]) & 63
[[code]]
==Search==
* [[Iterative Deepening]]
* [[Alpha-Beta]]
* [[Principal Variation Search]]
* [[Quiescence Search]]
* [[MVV-LVA]]
* [[Static Exchange Evaluation]]
* [[Null Move Pruning]]
==Evaluation==
* [[Material#Balance|Material Balance]]
* [[Piece-Square Tables]]
* [[Pawn Structure]]
> [[Passed Pawn]]
> [[Backward Pawn]]
> [[Doubled Pawn]]
> [[Isolated Pawn]]
* [[Bishop Pair]]
* [[Rook on Open File]]
* [[Tarrasch Rule|Rook behind Passers]]
* [[King Safety]] in [[Opening]], [[Middlegame]]
> [[King Safety#PawnShield|Pawn Shield]]
> [[King Safety#KingTropism|King Tropism]]
* [[King Centralization]] in [[Endgame]]
=See also=
* [[Chesser]] by [[Syed Fahad]] <ref>[[http://www.talkchess.com/forum/viewtopic.php?t=54740|Chesser: A Chess Engine derived from wingletx]] by [[Syed Fahad]], [[CCC]], December 24, 2014</ref>
* [[Godot]] by [[Ulysse Carion]] <ref>[[https://github.com/ucarion/godot|ucarion/godot · GitHub]]</ref>
* [[Kenny]] by [[Kenshin Himura]] <ref>[[https://github.com/kenshinthebattosai/kenny|kenshinthebattosai/Kenny · GitHub]]</ref> <ref>[[http://www.talkchess.com/forum/viewtopic.php?t=46814|New Winboard Engine 'Kenny' - JA builds available]] by [[Jim Ablett]], [[CCC]], January 08, 2013</ref>
* [[Vajolet]] by [[Marco Belli]] <ref>[[http://www.talkchess.com/forum/viewtopic.php?t=52709&start=18|Re: where to start chess programming?]] by [[Marco Belli]], [[CCC]], June 22, 2014</ref>
* [[Wing]] by [[Stef Luijten]]
=Postings=
* [[http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=51701|writing a chess engine in xx steps]] by [[Stef Luijten|wing]], [[Computer Chess Forums|Winboard Forum]], April 18, 2011
* [[http://www.talkchess.com/forum/viewtopic.php?t=38787|Writing a chess program in xx steps]] by [[Stef Luijten]], [[CCC]], April 18, 2011
* [[http://www.open-chess.org/viewtopic.php?f=5&t=1354|Chess Programming/Concepts for Beginners]] by MoldyJacket, [[Computer Chess Forums|OpenChess Forum]], April 18, 2011
* [[http://schach.chess.com/forum/view/general/winglet-chess-engine-revived|Winglet Chess Engine; Revived!]] by [[http://www.chess.com/members/view/PortugalTheMan|PortugalTheMan]], [[https://en.wikipedia.org/wiki/Chess.com|Chess.com]], Septermber 24, 2014 <ref>[[https://github.com/PortugalTheMan/winglet/tree/master|PortugalTheMan/winglet · GitHub]]</ref>
=External Links=
==Chess Engine==
* [[http://kirr.homeunix.org/chess/engines/Jim%20Ablett/WINGLET/|Index of /chess/engines/Jim Ablett/WINGLET]] by [[Jim Ablett]], hosted by [[Kirill Kryukov]]
* [[https://github.com/PortugalTheMan/winglet/tree/master|PortugalTheMan/winglet · GitHub]] <ref>[[http://schach.chess.com/forum/view/general/winglet-chess-engine-revived|Winglet Chess Engine; Revived!]] by [[http://www.chess.com/members/view/PortugalTheMan|PortugalTheMan]], [[https://en.wikipedia.org/wiki/Chess.com|Chess.com]], Septermber 24, 2014</ref>
* [[http://aghaznawi.comuf.com/computer%20chess/winglet/|winglet, writing a chess program in 99 steps]] by [[Stef Luijten]], hosted by [[Abdullah Al-Ghaznawi]] <ref>copy was taken in March 07, 2013, images and archives included</ref>
==Tutorial Archive==
[[include page="Winglet to include"]]
==Misc==
* [[https://en.wikipedia.org/wiki/Wingtip_device#Winglet|Winglet from Wingtip device - Wikipedia]]
* [[http://theflyingengineer.com/flightdeck/winglets-and-sharklets/|Winglets and Sharklets | The Flying Engineer]]
* [[http://www.b737.org.uk/winglets.htm|Boeing 737 Winglets]]
* [[http://www.airbus.com/innovation/proven-concepts/in-design/winglets/|Winglets | Airbus, a leading aircraft manufacturer]]
=References=
<references />
=What links here?=
[[include page="Winglet" component="backlinks" limit="40"]]
**[[Engines|Up one Level]]**