<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:access="http://www.bloglines.com/about/specs/fac-1.0">
  <access:restriction relationship="allow" />
  <channel>
    <title>Wikispaces : chessprogramming - items matching description</title>
    <link>https://chessprogramming.wikispaces.com/space/view</link>
    <description>Filtered items at Wikispaces : chessprogramming</description>
    
    <webMaster>help@wikispaces.com (Wikispaces)</webMaster>
    <generator>https://www.wikispaces.com/</generator>
    <ttl>60</ttl>
    <atom:link href="https://chessprogramming.wikispaces.com/space/xmlo?v=rss_2_0" rel="self" type="application/rss+xml" />
    <image>
      <title>Wikispaces : chessprogramming - items matching description</title>
      <url>https://www.wikispaces.com/i/l.png</url>
      <link>https://chessprogramming.wikispaces.com/space/view</link>
      <width>140</width>
      <height>48</height>
      <description>Wikispaces</description>
    </image>

    <item>
      <title>Defended Pawns (Bitboards)</title>
      <link>https://chessprogramming.wikispaces.com/Defended+Pawns+%28Bitboards%29</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Defended+Pawns+%28Bitboards%29</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Defended+Pawns+%28Bitboards%29</comments>
      <pubDate>Fri, 27 Feb 2015 14:46:51 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextTocRule:23:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:23 --&gt;&lt;!-- ws:start:WikiTextTocRule:24: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Defended&quot;&gt;Defended&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:24 --&gt;&lt;!-- ws:start:WikiTextTocRule:25: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Defenders&quot;&gt;Defenders&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:25 --&gt;&lt;!-- ws:start:WikiTextTocRule:26: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Defended Defenders&quot;&gt;Defended Defenders&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:26 --&gt;&lt;!-- ws:start:WikiTextTocRule:27: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Not Defended Defenders&quot;&gt;Not Defended Defenders&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:27 --&gt;&lt;!-- ws:start:WikiTextTocRule:28: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Not Defending Defended&quot;&gt;Not Defending Defended&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:28 --&gt;&lt;!-- ws:start:WikiTextTocRule:29: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Forum Posts&quot;&gt;Forum Posts&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:29 --&gt;&lt;!-- ws:start:WikiTextTocRule:30: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:30 --&gt;&lt;!-- ws:start:WikiTextTocRule:31: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:31 --&gt;&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Defended Pawns&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Working in the bitboard centric world to determine pawn related pattern set-wise.&lt;br /&gt;
&lt;br /&gt;
Each pawn, member of the own &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Attacks%20%28Bitboards%29&quot;&gt;pawn attack set&lt;/a&gt; is obviously defended by a pawn, thus likely not a winning capture target for opponent pieces (except pawns). If a defended pawn is &lt;a class=&quot;wiki_link&quot; href=&quot;/Open%20Pawns%20%28Bitboards%29&quot;&gt;open&lt;/a&gt;, opponent rooks on &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawns%20and%20Files%20%28Bitboards%29#HalfopenFiles&quot;&gt;half-open&lt;/a&gt; files bang one&#039;s head against a brick wall.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:32:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@Defended&amp;quot; title=&amp;quot;Anchor: Defended&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;Defended&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:32 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:9:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Defended&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:9 --&gt;Defended&lt;/h1&gt;
 Again, it is advantageous to keep disjoint east-west attack sets for a unique 1:1 source-target relationship. On demand we can use the union or intersection on the fly. Note that attack direction is related to the target square. East attack is from south/north-west to north/south-east&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;white pawns         defended            defended&amp;lt;br/&amp;gt;                    from west -&amp;amp;gt;        from east &amp;amp;lt;-&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . 1 . . .     . . . . 1 . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . 1 .&amp;lt;br/&amp;gt;. . 1 . . . . 1     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;white pawns         defended            defended
                    from west -&amp;gt;        from east &amp;lt;-
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . 1 . . .     . . . . 1 . . .     . . . . . . . .
. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . 1 .
. . 1 . . . . 1     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wPawnDefendedFromWest(U64 wpawns) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; wPawnEastAttacks(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wPawnDefendedFromEast(U64 wpawns) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; wPawnWestAttacks(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wPawnDefendedFromWest&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; wPawnEastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wPawnDefendedFromEast&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; wPawnWestAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:33:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@Defenders&amp;quot; title=&amp;quot;Anchor: Defenders&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;Defenders&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:33 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:11:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Defenders&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:11 --&gt;Defenders&lt;/h1&gt;
 To get the set of defenders on the fly, we use the intersection of white pawns with it&#039;s &amp;quot;black&amp;quot; attacks:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;white pawns         defenders           defenders&amp;lt;br/&amp;gt;                    from west           from east&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . 1 . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . 1 . . . . 1     . . 1 . . . . .     . . . . . . . 1&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;white pawns         defenders           defenders
                    from west           from east
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . 1 . . .     . . . . . . . .     . . . . . . . .
. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . . .
. . 1 . . . . 1     . . 1 . . . . .     . . . . . . . 1
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wPawnDefendersFromWest(U64 wpawns) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; bPawnWestAttacks(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wPawnDefendersFromEast(U64 wpawns) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; bPawnEastAttacks(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wPawnDefendersFromWest&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; bPawnWestAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wPawnDefendersFromEast&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; bPawnEastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;Otherwise, if the set of defenders was already determined (or vice versa), we can already take advantage of the unique target/source relation ship:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;wPawnDefendersFromWest = wPawnDefendedFromWest &amp;amp;gt;&amp;amp;gt; 9;&amp;lt;br/&amp;gt;wPawnDefendersFromEast = wPawnDefendedFromEast &amp;amp;gt;&amp;amp;gt; 7;&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;wPawnDefendersFromWest &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; wPawnDefendedFromWest &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
wPawnDefendersFromEast &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; wPawnDefendedFromEast &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:34:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@DefendedDefenders&amp;quot; title=&amp;quot;Anchor: DefendedDefenders&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;DefendedDefenders&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:34 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:13:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Defended Defenders&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:13 --&gt;Defended Defenders&lt;/h1&gt;
 Defended defenders already are the inner pawns of a at least &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20chain&quot;&gt;triple-chain&lt;/a&gt;, the d5 pawn for instance:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:5:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;white pawns         defended            defended&amp;lt;br/&amp;gt;                    from west           from east&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . 1 . . .     . . . . 1 . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . 1 .&amp;lt;br/&amp;gt;. . 1 . . . . 1     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;white pawns         defenders           defenders&amp;lt;br/&amp;gt;                    from west           from east&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . 1 . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . 1 . . . . 1     . . 1 . . . . .     . . . . . . . 1&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                    defenders and       defenders and&amp;lt;br/&amp;gt;white pawns         defended            defended&amp;lt;br/&amp;gt;                    from west           from east&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . 1 . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . 1 . . . . 1     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;white pawns         defended            defended
                    from west           from east
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . 1 . . .     . . . . 1 . . .     . . . . . . . .
. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . 1 .
. . 1 . . . . 1     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
&amp;nbsp;
white pawns         defenders           defenders
                    from west           from east
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . 1 . . .     . . . . . . . .     . . . . . . . .
. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . . .
. . 1 . . . . 1     . . 1 . . . . .     . . . . . . . 1
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
&amp;nbsp;
                    defenders and       defenders and
white pawns         defended            defended
                    from west           from east
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . 1 . . .     . . . . . . . .     . . . . . . . .
. . . 1 . . 1 .     . . . 1 . . . .     . . . . . . . .
. . 1 . . . . 1     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:5 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:35:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@NotDefendedDefenders&amp;quot; title=&amp;quot;Anchor: NotDefendedDefenders&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;NotDefendedDefenders&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:35 --&gt; &lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:15:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;Not Defended Defenders&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:15 --&gt;Not Defended Defenders&lt;/h1&gt;
 Not defended defenders are the base of a &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20chain&quot;&gt;chain&lt;/a&gt; - target of opponent attacks:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:6:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;                    not defended        not defended&amp;lt;br/&amp;gt;white pawns         defenders           defenders&amp;lt;br/&amp;gt;                    from west           from east&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . 1 . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . 1 . . 1 .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . 1 . . . . 1     . . 1 . . . . .     . . . . . . . 1&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;                    not defended        not defended
white pawns         defenders           defenders
                    from west           from east
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . 1 . . .     . . . . . . . .     . . . . . . . .
. . . 1 . . 1 .     . . . . . . . .     . . . . . . . .
. . 1 . . . . 1     . . 1 . . . . .     . . . . . . . 1
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:6 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:36:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@NotDefendingDefended&amp;quot; title=&amp;quot;Anchor: NotDefendingDefended&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;NotDefendingDefended&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:36 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:17:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc4&quot;&gt;&lt;a name=&quot;Not Defending Defended&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:17 --&gt;Not Defending Defended&lt;/h1&gt;
 Defended pawns not defending other pawns are likely the peak of a &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20chain&quot;&gt;chain&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:7:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;                    not defending       not defending&amp;lt;br/&amp;gt;white pawns         defended            defended&amp;lt;br/&amp;gt;                    from west           from east&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . 1 . . .     . . . . 1 . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . 1 . . 1 .     . . . . . . . .     . . . . . . 1 .&amp;lt;br/&amp;gt;. . 1 . . . . 1     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;                    not defending       not defending
white pawns         defended            defended
                    from west           from east
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . 1 . . .     . . . . 1 . . .     . . . . . . . .
. . . 1 . . 1 .     . . . . . . . .     . . . . . . 1 .
. . 1 . . . . 1     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:7 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:19:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc5&quot;&gt;&lt;a name=&quot;Forum Posts&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:19 --&gt;Forum Posts&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=55477&quot; rel=&quot;nofollow&quot;&gt;pattern coding in bitboards&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawel%20Koziol&quot;&gt;Pawel Koziol&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, February 26, 2015 » &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20chain&quot;&gt;Pawn chain&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:21:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc6&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:21 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:08:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Defended Pawns (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;10&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Defended Pawns (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;10&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Defended_Pawns_(Bitboards) includeBody-Defended%20Pawns%20%28Bitboards%29 includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tfoot class=&quot;includeBacklinksFooter&quot;&gt;
    &lt;tr&gt;
      &lt;td colspan=&quot;5&quot;&gt;&lt;a href=&quot;https://chessprogramming.wikispaces.com/page/links/Defended+Pawns+%28Bitboards%29&quot;&gt;More Links&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tfoot&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Connected+Passed+Pawns&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Connected Passed Pawns&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 27, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Dartmouth+CP&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Dartmouth CP&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 19, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Defended+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Defended Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 27, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Demolito&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Demolito&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 1, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Gk&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Gk&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 9, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawel+Koziol&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawel Koziol&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Dec 17, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+chain&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn chain&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Levers+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Levers (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Protected+Passed+Pawn&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Protected Passed Pawn&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 7, 2012&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:08 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Design Principles</title>
      <link>https://chessprogramming.wikispaces.com/Design+Principles</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Design+Principles</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Design+Principles</comments>
      <pubDate>Wed, 17 Jan 2018 18:50:12 GMT</pubDate>
      <description>&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * Design Principles&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
By &lt;a class=&quot;wiki_link&quot; href=&quot;/Steffan%20Westcott&quot;&gt;Steffan Westcott&lt;/a&gt; &lt;!-- ws:start:WikiTextRefRule:3:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.stmintz.com/ccc/index.php?id=261259&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Bitboard algorithm design principles&amp;lt;/a&amp;gt; by &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/Steffan%20Westcott&amp;quot;&amp;gt;Steffan Westcott&amp;lt;/a&amp;gt;, &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/CCC&amp;quot;&amp;gt;CCC&amp;lt;/a&amp;gt;, October 23, 2002&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:3 --&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;tt&gt;I should add that these techniques (&lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;Kogge-Stone&lt;/a&gt;) are designed to take advantage of the parallel nature of bitboards, in that they consider the entire board. Here, routines like RookMovesUp() will calculate the upward rook moves of all friendly rooks.&lt;/tt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;tt&gt;In general, I first identify a (bit) pattern of interest, then devise methods for recognising all instances of that pattern on the board. Pattern instances are counted as late as possible, if at all. The complexity of the patterns varies greatly. Simple ones are like &lt;a class=&quot;wiki_link&quot; href=&quot;/Open%20file&quot;&gt;OpenFiles()&lt;/a&gt;, UnmovedRooks(), &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Attacks%20%28Bitboards%29&quot;&gt;PawnAttacks()&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Rams%20%28Bitboards%29&quot;&gt;PawnRams()&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Duo%20Trio%20Quart%20%28Bitboards%29&quot;&gt;PawnDuos()&lt;/a&gt;, KingIsUpRight(). Medium complexity are ones like ConnectedRooks(), RooksCanCastle(), OnKingDiagonal(), NearKingDiagonal(), &lt;a class=&quot;wiki_link&quot; href=&quot;/Outposts&quot;&gt;OutPost()&lt;/a&gt;. Complex examples are &lt;a class=&quot;wiki_link&quot; href=&quot;/Fortress&quot;&gt;Fortress()&lt;/a&gt;, PawnMass(), &lt;a class=&quot;wiki_link&quot; href=&quot;/King%20Safety#PawnStorm&quot;&gt;PawnStorm()&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Backward%20Pawns%20%28Bitboards%29&quot;&gt;BackwardPawns()&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Material#Signature&quot;&gt;MaterialSignature()&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Square%20Control&quot;&gt;WeakSquareControl()&lt;/a&gt;, StrongSquareControl(), &lt;a class=&quot;wiki_link&quot; href=&quot;/Space&quot;&gt;SpaceBehindPawnFront()&lt;/a&gt;, StrongKnightOutposts(), &lt;a class=&quot;wiki_link&quot; href=&quot;/Fianchetto&quot;&gt;StrongFianchettoedBishops()&lt;/a&gt;, WeakWhiteSquares(), &lt;a class=&quot;wiki_link&quot; href=&quot;/King%20Safety#PawnShield&quot;&gt;KingShelter()&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Game%20Phases&quot;&gt;GamePhase()&lt;/a&gt;.&lt;/tt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;tt&gt;Often the more complex patterns are combinations of the simpler ones. In fact, the chess position itself can be viewed as composed of &#039;primitive&#039; or &#039;atomic&#039; patterns (bitboards). Most of the simpler patterns are returned as bitboards, where set bits indicate a (bit) pattern match. This is fine where simple square-centric patterns are sought, and a yes/no for each square is sufficient.&lt;/tt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;tt&gt;Complex patterns like KingShelter() and GamePhase() are really functions which classify (group together) general patterns spread across the whole board, eg. KingShelter() classifies the pawn structure near the king (matches against a large pattern set), MaterialSignature() returns things like BNbn to classify the material balance.&lt;/tt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;tt&gt;Just considering the simple patterns, if your engine deals with pattern instances in a serial fashion (strictly one at a time), the algorithm requirements are sufficiently different that an alternative may be better eg. rotated bitboard table lookups, or perhaps even a different board representation altogether. To my mind, the major reason to use bitboards in the first place is to find many pattern instances quickly. In summary, I would advise that my algorithms are no magic bullet - They are better judged in the wider context of your engine design and target architecture.&lt;/tt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:5:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Rererences&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:5 --&gt;Rererences&lt;/h1&gt;
&lt;!-- ws:start:WikiTextReferencesRule:59:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=261259&quot; rel=&quot;nofollow&quot;&gt;Bitboard algorithm design principles&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Steffan%20Westcott&quot;&gt;Steffan Westcott&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, October 23, 2002&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:59 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:7:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:7 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:00:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Design Principles&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;40&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Design Principles&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;40&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Design_Principles includeBody-Design%20Principles includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Bitboards&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Bitboards&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Chunking&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Chunking&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 12, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Design+Principles&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Design Principles&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Kogge-Stone+Algorithm&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 17, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pattern+Recognition&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pattern Recognition&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 8, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Steffan+Westcott&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Steffan Westcott&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 21, 2014&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:00 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Double and Triple (Bitboards)</title>
      <link>https://chessprogramming.wikispaces.com/Double+and+Triple+%28Bitboards%29</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Double+and+Triple+%28Bitboards%29</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Double+and+Triple+%28Bitboards%29</comments>
      <pubDate>Thu, 12 May 2016 19:25:45 GMT</pubDate>
      <description>&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Double and Triple&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextTocRule:16:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:16 --&gt;&lt;!-- ws:start:WikiTextTocRule:17: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#By Square&quot;&gt;By Square&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:17 --&gt;&lt;!-- ws:start:WikiTextTocRule:18: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Multiple Pawns&quot;&gt;Multiple Pawns&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:18 --&gt;&lt;!-- ws:start:WikiTextTocRule:19: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Forum Posts&quot;&gt;Forum Posts&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:19 --&gt;&lt;!-- ws:start:WikiTextTocRule:20: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:20 --&gt;&lt;!-- ws:start:WikiTextTocRule:21: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:21 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:8:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;By Square&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:8 --&gt;By Square&lt;/h1&gt;
 Working in the &lt;strong&gt;square centric world&lt;/strong&gt; of the board implies using a square index of one particular pawn, likely from &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Serialization&quot;&gt;bitboard traversal&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
For &lt;a class=&quot;wiki_link&quot; href=&quot;/Doubled%20Pawn&quot;&gt;doubled&lt;/a&gt; (twins) or multiple pawns on a file, we simply intersect the file-mask by own-pawns and perform a &lt;a class=&quot;wiki_link&quot; href=&quot;/Population%20Count&quot;&gt;population count&lt;/a&gt;. This symmetrical property appears to be equal for white and black pawns, except for the before- and behind semantic.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;wPawnsOnFile = arrFiles[sqOfWhitePawn] &amp;amp;amp; pawnBB[white];&amp;lt;br/&amp;gt;if ( wPawnsOnFile &amp;amp;amp; (wPawnsOnFile-1) ) -&amp;amp;gt; white pawn is a least double pawn&amp;lt;br/&amp;gt;if ( wPawnsOnFile &amp;amp;amp; arrNortRay[sqOfWhitePawns] ) -&amp;amp;gt; white pawn has own pawn ahead&amp;lt;br/&amp;gt;if ( wPawnsOnFile &amp;amp;amp; arrSoutRay[sqOfWhitePawns] ) -&amp;amp;gt; white pawn has own pawn behind&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;wPawnsOnFile &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; arrFiles&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sqOfWhitePawn&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pawnBB&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;white&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wPawnsOnFile &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wPawnsOnFile&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; white pawn is a least &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; pawn
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wPawnsOnFile &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; arrNortRay&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sqOfWhitePawns&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; white pawn has own pawn ahead
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wPawnsOnFile &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; arrSoutRay&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sqOfWhitePawns&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; white pawn has own pawn behind&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;arrFiles[d*]&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;arrFiles[d*]
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;The arrFiles might be condensed to eight bitboards only, instead of 64 - if we index by&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;file(sq) == sq &amp;amp;amp; 7&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;file(sq) == sq &amp;amp; 7&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;instead of square.&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:22:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@Multiple&amp;quot; title=&amp;quot;Anchor: Multiple&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;Multiple&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:22 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:10:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Multiple Pawns&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:10 --&gt;Multiple Pawns&lt;/h1&gt;
 Working in the &lt;strong&gt;bitboard centric world&lt;/strong&gt; to determine pawn related pattern set-wise.&lt;br /&gt;
&lt;br /&gt;
All pawns that are member of the &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Spans&quot;&gt;rearspan&lt;/a&gt; of all own pawns, have at least one pawn in front on the same file. All pawns that are member of the &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Spans&quot;&gt;frontspan&lt;/a&gt; of all own pawns, have at least one pawn behind on the same file.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;// pawns with at least one pawn in front on the same file&amp;lt;br/&amp;gt;U64 wPawnsBehindOwn(U64 wpawns) {return wpawns &amp;amp;amp; wRearSpans(wpawns);}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;// pawns with at least one pawn behind on the same file&amp;lt;br/&amp;gt;U64 wPawnsInfrontOwn (U64 wpawns) {return wpawns &amp;amp;amp; wFrontSpans(wpawns);}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// pawns with at least one pawn in front on the same file&lt;/span&gt;
U64 wPawnsBehindOwn&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; wRearSpans&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// pawns with at least one pawn behind on the same file&lt;/span&gt;
U64 wPawnsInfrontOwn &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; wFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;Obviously, since each pawn in front of a pawn implies this pawn behind, the number of pawns in front is equal the number of pawns behind.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;popCount(wPawnsBehindOwn) == popCount(wPawnsInfrontOwn)&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;popCount&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wPawnsBehindOwn&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; popCount&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wPawnsInfrontOwn&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;The intersection of both sets implies at least a triple, thus a pawn in front and behind.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:5:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wPawnsInfrontAndBehindOwn (U64 wpawns) {&amp;lt;br/&amp;gt;   return wPawnsInfrontOwn(wpawns) &amp;amp;amp;  wPawnsBehindOwn(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wPawnsInfrontAndBehindOwn &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wPawnsInfrontOwn&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;  wPawnsBehindOwn&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:5 --&gt;If the intersection is empty on a file, it is a double pawn or a twin.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:6:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;fileWithAtLeastTriple = fileFill(infrontAndBehindOwn);&amp;lt;br/&amp;gt;rearTwin  = behindOwn  &amp;amp;amp; ~fileWithAtLeastTriple;&amp;lt;br/&amp;gt;frontTwin = infrontOwn &amp;amp;amp; ~fileWithAtLeastTriple;&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;fileWithAtLeastTriple &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; fileFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;infrontAndBehindOwn&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
rearTwin  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; behindOwn  &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; ~fileWithAtLeastTriple&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
frontTwin &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; infrontOwn &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; ~fileWithAtLeastTriple&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:6 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:12:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Forum Posts&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:12 --&gt;Forum Posts&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=29689&quot; rel=&quot;nofollow&quot;&gt;Doubled and Backward Pawn Engine &amp;quot;Definitions&amp;quot;&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Brian%20Richardson&quot;&gt;Brian Richardson&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, September 07, 2009&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=60133&quot; rel=&quot;nofollow&quot;&gt;Doubled pawns&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Stefano%20Gemma&quot;&gt;Stefano Gemma&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, May 11, 2016&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:14:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:14 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:07:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Double and Triple (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Double and Triple (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Double_and_Triple_(Bitboards) includeBody-Double%20and%20Triple%20%28Bitboards%29 includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Aegon+1993&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Aegon 1993&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 26, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Dispersion+and+Distortion&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Dispersion and Distortion&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Double+and+Triple+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Double and Triple (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 12, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Doubled+Pawn&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Doubled Pawn&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 27, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hans+Kmoch&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hans Kmoch&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:07 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Dumb7Fill</title>
      <link>https://chessprogramming.wikispaces.com/Dumb7Fill</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Dumb7Fill</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Dumb7Fill</comments>
      <pubDate>Fri, 27 May 2016 08:32:45 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextTocRule:41:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:41 --&gt;&lt;!-- ws:start:WikiTextTocRule:42: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Occluded Fill&quot;&gt;Occluded Fill&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:42 --&gt;&lt;!-- ws:start:WikiTextTocRule:43: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Occluded Fill-Seven Fill Cycles&quot;&gt;Seven Fill Cycles&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:43 --&gt;&lt;!-- ws:start:WikiTextTocRule:44: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Occluded Fill-Fill Loop&quot;&gt;Fill Loop&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:44 --&gt;&lt;!-- ws:start:WikiTextTocRule:45: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Occluded Fill-Unrolled Loop&quot;&gt;Unrolled Loop&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:45 --&gt;&lt;!-- ws:start:WikiTextTocRule:46: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Attack Fill&quot;&gt;Attack Fill&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:46 --&gt;&lt;!-- ws:start:WikiTextTocRule:47: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Attack Fill-Comparison with Kogge-Stone&quot;&gt;Comparison with Kogge-Stone&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:47 --&gt;&lt;!-- ws:start:WikiTextTocRule:48: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Attack Fill-All Directions&quot;&gt;All Directions&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:48 --&gt;&lt;!-- ws:start:WikiTextTocRule:49: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Generalized Rays&quot;&gt;Generalized Rays&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:49 --&gt;&lt;!-- ws:start:WikiTextTocRule:50: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Generalized Rays-Loop Version&quot;&gt;Loop Version&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:50 --&gt;&lt;!-- ws:start:WikiTextTocRule:51: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Generalized Rays-Unrolled Attacks&quot;&gt;Unrolled Attacks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:51 --&gt;&lt;!-- ws:start:WikiTextTocRule:52: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:52 --&gt;&lt;!-- ws:start:WikiTextTocRule:53: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:53 --&gt;&lt;!-- ws:start:WikiTextTocRule:54: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:54 --&gt;&lt;!-- ws:start:WikiTextTocRule:55: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:55 --&gt;&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Piece%20Attacks&quot;&gt;Sliding Piece Attacks&lt;/a&gt; * Dumb7Fill&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Dumb7Fill&lt;/strong&gt; - the obvious, straight forward &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Flood_fill&quot; rel=&quot;nofollow&quot;&gt;flood-fill&lt;/a&gt; approach works &lt;strong&gt;set-wise&lt;/strong&gt; - &lt;strong&gt;seven&lt;/strong&gt; times one fill-cycle by &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;one step only&lt;/a&gt; in one of eight &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;directions&lt;/a&gt;. We rely on the &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Compass_rose&quot; rel=&quot;nofollow&quot;&gt;compass rose&lt;/a&gt; to identify ray-directions.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;  noWe         nort         noEa&amp;lt;br/&amp;gt;          +7    +8    +9&amp;lt;br/&amp;gt;              \  |  /&amp;lt;br/&amp;gt;  west    -1 &amp;amp;lt;-  0 -&amp;amp;gt; +1    east&amp;lt;br/&amp;gt;              /  |  \&amp;lt;br/&amp;gt;          -9    -8    -7&amp;lt;br/&amp;gt;  soWe         sout         soEa&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;  noWe         nort         noEa
          +7    +8    +9
              \  |  /
  west    -1 &amp;lt;-  0 -&amp;gt; +1    east
              /  |  \
          -9    -8    -7
  soWe         sout         soEa&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;!-- ws:start:WikiTextIncludeRule:012:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/page?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;MappingHint&amp;amp;quot;&amp;quot; title=&amp;quot;Include page: page=&amp;amp;quot;MappingHint&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;

&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;/Square%20Mapping%20Considerations&quot;&gt;&lt;img src=&quot;/file/view/mapping.JPG/93134172/mapping.JPG&quot; alt=&quot;mapping.JPG&quot; title=&quot;mapping.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;td&gt;&lt;em&gt;Code samples and bitboard diagrams rely on &lt;a class=&quot;wiki_link&quot; href=&quot;/Square%20Mapping%20Considerations#LittleEndianRankFileMapping&quot;&gt;Little endian file and rank mapping&lt;/a&gt;&lt;/em&gt;.&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:end:WikiTextIncludeRule:012 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:56:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@OccludedFill&amp;quot; title=&amp;quot;Anchor: OccludedFill&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;OccludedFill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:56 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:15:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Occluded Fill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:15 --&gt;Occluded Fill&lt;/h1&gt;
 An &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.thefreedictionary.com/occluded&quot; rel=&quot;nofollow&quot;&gt;occluded&lt;/a&gt; fill includes the flood generating &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Pieces&quot;&gt;sliding pieces&lt;/a&gt;, but excludes the blocker. It is base of attack fills. One additional &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;direction shift&lt;/a&gt; excludes the sliders but includes the blocker.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:17:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Occluded Fill-Seven Fill Cycles&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:17 --&gt;Seven Fill Cycles&lt;/h2&gt;
 The sliding pieces generate the flood. They were &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;shifted one step&lt;/a&gt; in the desired direction and &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#Intersection&quot;&gt;intersected&lt;/a&gt; with the set of empty squares, the propagator. The flood aggregates the intersection and the cycle repeats six further times to cover the maximum &lt;a class=&quot;wiki_link&quot; href=&quot;/Distance&quot;&gt;distance&lt;/a&gt; on the &lt;a class=&quot;wiki_link&quot; href=&quot;/Chessboard&quot;&gt;chessboard&lt;/a&gt;. A blocker, not member of propagator, stops the flood in that particular ray-direction for one sliding piece. Therefor occluded fill contains the initial generator but excludes any blocker.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 soutOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   for (int cycle = 0; cycle &amp;amp;lt; 7; cycle++)&amp;lt;br/&amp;gt;      gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 8);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 soutOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; cycle &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; cycle &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; cycle&lt;span class=&quot;sy2&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:19:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Occluded Fill-Fill Loop&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:19 --&gt;Fill Loop&lt;/h2&gt;
 Alternatively one may save move-instructions by introducing an explicit flood accumulator, and to probably terminate the loop early if the flood stops:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 soutOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   U64 flood = 0;&amp;lt;br/&amp;gt;   while (gen) {&amp;lt;br/&amp;gt;      flood |= gen;&amp;lt;br/&amp;gt;      gen = (gen &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; pro;&amp;lt;br/&amp;gt;   }&amp;lt;br/&amp;gt;   return flood;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 soutOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
      flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
      gen &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pro&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; flood&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:21:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc3&quot;&gt;&lt;a name=&quot;Occluded Fill-Unrolled Loop&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:21 --&gt;Unrolled Loop&lt;/h2&gt;
 To &lt;a class=&quot;wiki_link&quot; href=&quot;/Avoiding%20Branches&quot;&gt;avoid conditional branches&lt;/a&gt; and to schedule several directions in parallel, the &amp;quot;real&amp;quot; dumb7fill unrolls the loop:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 soutOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   U64 flood = gen;&amp;lt;br/&amp;gt;   flood |= gen = (gen &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; pro;&amp;lt;br/&amp;gt;   flood |= gen = (gen &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; pro;&amp;lt;br/&amp;gt;   flood |= gen = (gen &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; pro;&amp;lt;br/&amp;gt;   flood |= gen = (gen &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; pro;&amp;lt;br/&amp;gt;   flood |= gen = (gen &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; pro;&amp;lt;br/&amp;gt;   flood |= gen = (gen &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; pro;&amp;lt;br/&amp;gt;   flood |=       (gen &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; pro;&amp;lt;br/&amp;gt;   return flood;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 soutOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; gen &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pro&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; gen &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pro&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; gen &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pro&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; gen &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pro&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; gen &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pro&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; gen &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pro&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pro&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; flood&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;Some south fill cycles in slow motion:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;flood = gen =&amp;lt;br/&amp;gt;brooks|bqueen       empty&amp;lt;br/&amp;gt;1 . . . . . . .     . 1 1 1 1 1 . 1&amp;lt;br/&amp;gt;. . . 1 . . . .     1 1 . . 1 . 1 .&amp;lt;br/&amp;gt;. . . . . . . .     1 . 1 1 1 1 . 1&amp;lt;br/&amp;gt;. . . . . . . .     1 1 . 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . 1 . .     1 1 1 . 1 . 1 1&amp;lt;br/&amp;gt;. . . . . . . .     1 1 . 1 1 1 1 .&amp;lt;br/&amp;gt;. . . . . . . .     . . . 1 1 . . 1&amp;lt;br/&amp;gt;. . . . . . . .     . 1 1 . 1 1 . 1&amp;lt;br/&amp;gt;1.fill&amp;lt;br/&amp;gt; gen = gen &amp;amp;gt;&amp;amp;gt; 8   &amp;amp;amp;  empty           =&amp;amp;gt;  flood&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . . . . . .&amp;lt;br/&amp;gt;1 . . . . . . .      1 . . . . . . .     1 . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .      . . . 1 . . . .     . . . 1 . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . 1 . .&amp;lt;br/&amp;gt;. . . . . 1 . .      . . . . . 1 . .     . . . . . 1 . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;2.fill&amp;lt;br/&amp;gt; gen = gen &amp;amp;gt;&amp;amp;gt; 8   &amp;amp;amp;  empty               flood  |= ...&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . 1 . . . .&amp;lt;br/&amp;gt;1 . . . . . . .      1 . . . . . . .     1 . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .      . . . 1 . . . .     . . . 1 . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . 1 . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . 1 . .&amp;lt;br/&amp;gt;. . . . . 1 . .      . . . . . 0 . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;3.fill&amp;lt;br/&amp;gt; gen = gen &amp;amp;gt;&amp;amp;gt; 8   &amp;amp;amp;  empty               flood |= ...&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . 1 . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . 1 . . . .&amp;lt;br/&amp;gt;1 . . . . . . .      1 . . . . . . .     1 . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .      . . . 0 . . . .     . . . . . 1 . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . 1 . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;...&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;6.fill&amp;lt;br/&amp;gt; gen = gen &amp;amp;gt;&amp;amp;gt; 8  &amp;amp;amp;   empty               flood  |= ...&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . 1 . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . 1 . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . 1 . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . . . 1 . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     1 . . . . 1 . .&amp;lt;br/&amp;gt;1 . . . . . . .      0 . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;flood = gen =
brooks|bqueen       empty
1 . . . . . . .     . 1 1 1 1 1 . 1
. . . 1 . . . .     1 1 . . 1 . 1 .
. . . . . . . .     1 . 1 1 1 1 . 1
. . . . . . . .     1 1 . 1 1 1 1 1
. . . . . 1 . .     1 1 1 . 1 . 1 1
. . . . . . . .     1 1 . 1 1 1 1 .
. . . . . . . .     . . . 1 1 . . 1
. . . . . . . .     . 1 1 . 1 1 . 1
1.fill
 gen = gen &amp;gt;&amp;gt; 8   &amp;amp;  empty           =&amp;gt;  flood
. . . . . . . .      . . . . . . . .     1 . . . . . . .
1 . . . . . . .      1 . . . . . . .     1 . . 1 . . . .
. . . 1 . . . .      . . . 1 . . . .     . . . 1 . . . .
. . . . . . . .      . . . . . . . .     . . . . . . . .
. . . . . . . .      . . . . . . . .     . . . . . 1 . .
. . . . . 1 . .      . . . . . 1 . .     . . . . . 1 . .
. . . . . . . .      . . . . . . . .     . . . . . . . .
. . . . . . . .      . . . . . . . .     . . . . . . . .
2.fill
 gen = gen &amp;gt;&amp;gt; 8   &amp;amp;  empty               flood  |= ...
. . . . . . . .      . . . . . . . .     1 . . . . . . .
. . . . . . . .      . . . . . . . .     1 . . 1 . . . .
1 . . . . . . .      1 . . . . . . .     1 . . 1 . . . .
. . . 1 . . . .      . . . 1 . . . .     . . . 1 . . . .
. . . . . . . .      . . . . . . . .     . . . . . 1 . .
. . . . . . . .      . . . . . . . .     . . . . . 1 . .
. . . . . 1 . .      . . . . . 0 . .     . . . . . . . .
. . . . . . . .      . . . . . . . .     . . . . . . . .
3.fill
 gen = gen &amp;gt;&amp;gt; 8   &amp;amp;  empty               flood |= ...
. . . . . . . .      . . . . . . . .     1 . . . . . . .
. . . . . . . .      . . . . . . . .     1 . . 1 . . . .
. . . . . . . .      . . . . . . . .     1 . . 1 . . . .
1 . . . . . . .      1 . . . . . . .     1 . . 1 . . . .
. . . 1 . . . .      . . . 0 . . . .     . . . . . 1 . .
. . . . . . . .      . . . . . . . .     . . . . . 1 . .
. . . . . . . .      . . . . . . . .     . . . . . . . .
. . . . . . . .      . . . . . . . .     . . . . . . . .
&amp;nbsp;
...
&amp;nbsp;
6.fill
 gen = gen &amp;gt;&amp;gt; 8  &amp;amp;   empty               flood  |= ...
. . . . . . . .      . . . . . . . .     1 . . . . . . .
. . . . . . . .      . . . . . . . .     1 . . 1 . . . .
. . . . . . . .      . . . . . . . .     1 . . 1 . . . .
. . . . . . . .      . . . . . . . .     1 . . 1 . . . .
. . . . . . . .      . . . . . . . .     1 . . . . 1 . .
. . . . . . . .      . . . . . . . .     1 . . . . 1 . .
1 . . . . . . .      0 . . . . . . .     . . . . . . . .
. . . . . . . .      . . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;The flood already stopped, the final 7th fill cycles don&#039;t change anything.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:23:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc4&quot;&gt;&lt;a name=&quot;Attack Fill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:23 --&gt;Attack Fill&lt;/h1&gt;
 To get attacks, one additional &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;direction shift&lt;/a&gt; of the occluded fill is necessary to exclude the rooks/queen and include the blocker:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:5:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 soutAttacks (U64 rooks, U64 empty) {return soutOne(soutOccl(rooks, empty));}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 soutAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; soutOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;soutOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks, empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:5 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:25:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc5&quot;&gt;&lt;a name=&quot;Attack Fill-Comparison with Kogge-Stone&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:25 --&gt;Comparison with Kogge-Stone&lt;/h2&gt;
 To combine the dumb7fill as attack getter, we also can take advantage of &lt;a class=&quot;wiki_link&quot; href=&quot;/First%20Rank%20Attacks#TheOuterSquares&quot;&gt;outer square&lt;/a&gt; occupancy doesn&#039;t affect the attack set. We need one fill cycle less, before the final shift. That takes 19 operations. In anticipation to &lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms&quot;&gt;parallel prefix&lt;/a&gt;, a &lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;Kogge-Stone&lt;/a&gt; approach takes 14 instructions, 5 less. Kogge-Stone needs more move-instructions and a temporary register to compute generator as well as propagator, while dumb7fill uses a const propagator:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:6:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;dumb7fill                                  | Kogge-Stone Algorithm&amp;lt;br/&amp;gt;                                           |&amp;lt;br/&amp;gt;U64 soutAttacks(U64 rooks, U64 empty) {    | U64 soutAttacks(U64 rooks, U64 empty) {&amp;lt;br/&amp;gt;   U64 flood = rooks;                      |    rooks |= empty &amp;amp;amp; (rooks &amp;amp;gt;&amp;amp;gt;  8);&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;  |    empty  = empty &amp;amp;amp; (empty &amp;amp;gt;&amp;amp;gt;  8);&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;  |    rooks |= empty &amp;amp;amp; (rooks &amp;amp;gt;&amp;amp;gt; 16);&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;  |    empty  = empty &amp;amp;amp; (empty &amp;amp;gt;&amp;amp;gt; 16);&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;  |    rooks |= empty &amp;amp;amp; (rooks &amp;amp;gt;&amp;amp;gt; 32);&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;  |    return            rooks &amp;amp;gt;&amp;amp;gt;  8;&amp;lt;br/&amp;gt;   flood |=         (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;  | }&amp;lt;br/&amp;gt;   return            flood &amp;amp;gt;&amp;amp;gt; 8;           |&amp;lt;br/&amp;gt;}                                          |&amp;lt;br/&amp;gt;                                           |&amp;lt;br/&amp;gt;in x86/64 assembly                         | in x86/64 assembly&amp;lt;br/&amp;gt;; dumb7fill                                |  ; koggeStone&amp;lt;br/&amp;gt;; rooks rdx                                |  ; rooks rdx&amp;lt;br/&amp;gt;; empty rcx                                |  ; empty rcx&amp;lt;br/&amp;gt;                                           |&amp;lt;br/&amp;gt;  mov   rax, rdx                           |    mov   rax, rdx&amp;lt;br/&amp;gt;                                           |    shr   rax, 8&amp;lt;br/&amp;gt;  shr   rdx, 8                             |    and   rax, rcx&amp;lt;br/&amp;gt;  and   rdx, rcx                           |    or    rdx, rax&amp;lt;br/&amp;gt;  or    rax, rdx                           |&amp;lt;br/&amp;gt;                                           |    mov   rax, rcx&amp;lt;br/&amp;gt;  shr   rdx, 8                             |    shr   rax, 8&amp;lt;br/&amp;gt;  and   rdx, rcx                           |    and   rcx, rax&amp;lt;br/&amp;gt;  or    rax, rdx                           |&amp;lt;br/&amp;gt;                                           |    mov   rax, rdx&amp;lt;br/&amp;gt;  shr   rdx, 8                             |    shr   rax, 16&amp;lt;br/&amp;gt;  and   rdx, rcx                           |    and   rax, rcx&amp;lt;br/&amp;gt;  or    rax, rdx                           |    or    rdx, rax&amp;lt;br/&amp;gt;                                           |&amp;lt;br/&amp;gt;  shr   rdx, 8                             |    mov   rax, rcx&amp;lt;br/&amp;gt;  and   rdx, rcx                           |    shr   rax, 16&amp;lt;br/&amp;gt;  or    rax, rdx                           |    and   rcx, rax&amp;lt;br/&amp;gt;                                           |&amp;lt;br/&amp;gt;  shr   rdx, 8                             |    mov   rax, rdx&amp;lt;br/&amp;gt;  and   rdx, rcx                           |    shr   rax, 32&amp;lt;br/&amp;gt;  or    rax, rdx                           |    and   rax, rcx&amp;lt;br/&amp;gt;                                           |    or    rax, rdx&amp;lt;br/&amp;gt;  shr   rdx, 8                             |&amp;lt;br/&amp;gt;  and   rdx, rcx                           |    shr   rax, 8&amp;lt;br/&amp;gt;  or    rax, rdx                           |&amp;lt;br/&amp;gt;                                           |&amp;lt;br/&amp;gt;  shr   rax, 8                             |&amp;lt;br/&amp;gt;                                           |&amp;lt;br/&amp;gt;   1 move                                  |     5 moves&amp;lt;br/&amp;gt;  19 operations                            |    14 operations&amp;lt;br/&amp;gt;  20 instructions                          |    19 instructions&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;dumb7fill                                  &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; Kogge&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;Stone Algorithm
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
U64 soutAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;    &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; U64 soutAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;                      &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    rooks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    empty  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;empty &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    rooks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    empty  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;empty &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    rooks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;            rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;         &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;            flood &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;                                          &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
in x86&lt;span class=&quot;sy2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;64&lt;/span&gt; assembly                         &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; in x86&lt;span class=&quot;sy2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;64&lt;/span&gt; assembly
&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; dumb7fill                                &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; koggeStone
&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; rooks rdx                                &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; rooks rdx
&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; empty rcx                                &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; empty rcx
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
  mov   rax, rdx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    mov   rax, rdx
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    shr   rax, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;
  shr   rdx, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;                             &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    and   rax, rcx
  and   rdx, rcx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    or    rdx, rax
  or    rax, rdx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    mov   rax, rcx
  shr   rdx, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;                             &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    shr   rax, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;
  and   rdx, rcx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    and   rcx, rax
  or    rax, rdx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    mov   rax, rdx
  shr   rdx, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;                             &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    shr   rax, &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;
  and   rdx, rcx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    and   rax, rcx
  or    rax, rdx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    or    rdx, rax
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
  shr   rdx, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;                             &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    mov   rax, rcx
  and   rdx, rcx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    shr   rax, &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;
  or    rax, rdx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    and   rcx, rax
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
  shr   rdx, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;                             &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    mov   rax, rdx
  and   rdx, rcx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    shr   rax, &lt;span class=&quot;nu0&quot;&gt;32&lt;/span&gt;
  or    rax, rdx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    and   rax, rcx
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    or    rax, rdx
  shr   rdx, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;                             &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
  and   rdx, rcx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    shr   rax, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;
  or    rax, rdx                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
  shr   rax, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;                             &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
                                           &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;
   &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; move                                  &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;     &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt; moves
  &lt;span class=&quot;nu0&quot;&gt;19&lt;/span&gt; operations                            &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt; operations
  &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; instructions                          &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;nu0&quot;&gt;19&lt;/span&gt; instructions&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:6 --&gt;Thus, dumb7fill is not that bad, specially if processing several directions in parallel, like south and north, all east and all west attacks.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:27:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc6&quot;&gt;&lt;a name=&quot;Attack Fill-All Directions&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:27 --&gt;All Directions&lt;/h2&gt;
 &lt;!-- ws:start:WikiTextCodeRule:7:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 soutAttacks(U64 rooks, U64 empty) {&amp;lt;br/&amp;gt;   U64 flood = rooks;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |=         (rooks &amp;amp;gt;&amp;amp;gt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   return            flood &amp;amp;gt;&amp;amp;gt; 8;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 nortAttacks(U64 rooks, U64 empty) {&amp;lt;br/&amp;gt;   U64 flood = rooks;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |=         (rooks &amp;amp;lt;&amp;amp;lt; 8) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   return            flood &amp;amp;lt;&amp;amp;lt; 8;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 soutAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;         &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;            flood &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 nortAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;         &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;            flood &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:7 --&gt;Horizontal fills need to consider wraps from H-file to A-file and vice versa. Fortunately this can be combined by intersection of ~A-file or ~H-file with the propagator:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:8:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 eastAttacks(U64 rooks, U64 empty) {&amp;lt;br/&amp;gt;   const U64 notA = C64(0xfefefefefefefefe);&amp;lt;br/&amp;gt;   U64 flood = rooks;&amp;lt;br/&amp;gt;   empty &amp;amp;amp;= notA;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;lt;&amp;amp;lt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |=         (rooks &amp;amp;lt;&amp;amp;lt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   return           (flood &amp;amp;lt;&amp;amp;lt; 1) &amp;amp;amp; notA ;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 noEaAttacks(U64 bishops, U64 empty) {&amp;lt;br/&amp;gt;   const U64 notA = C64(0xfefefefefefefefe);&amp;lt;br/&amp;gt;   U64 flood = bishops;&amp;lt;br/&amp;gt;   empty &amp;amp;amp;= notA;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |=           (bishops &amp;amp;lt;&amp;amp;lt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   return               (flood &amp;amp;lt;&amp;amp;lt; 9) &amp;amp;amp; notA ;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 soEaAttacks(U64 bishops, U64 empty) {&amp;lt;br/&amp;gt;   const U64 notA = C64(0xfefefefefefefefe);&amp;lt;br/&amp;gt;   U64 flood = bishops;&amp;lt;br/&amp;gt;   empty &amp;amp;amp;= notA;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |=           (bishops &amp;amp;gt;&amp;amp;gt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   return               (flood &amp;amp;gt;&amp;amp;gt; 7) &amp;amp;amp; notA ;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 westAttacks(U64 rooks, U64 empty) {&amp;lt;br/&amp;gt;   const U64 notH = C64(0x7f7f7f7f7f7f7f7f);&amp;lt;br/&amp;gt;   U64 flood = rooks;&amp;lt;br/&amp;gt;   empty &amp;amp;amp;= notH;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= rooks = (rooks &amp;amp;gt;&amp;amp;gt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |=         (rooks &amp;amp;gt;&amp;amp;gt; 1) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   return           (flood &amp;amp;gt;&amp;amp;gt; 1) &amp;amp;amp; notH ;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 soWeAttacks(U64 bishops, U64 empty) {&amp;lt;br/&amp;gt;   const U64 notH = C64(0x7f7f7f7f7f7f7f7f);&amp;lt;br/&amp;gt;   U64 flood = bishops;&amp;lt;br/&amp;gt;   empty &amp;amp;amp;= notH;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;gt;&amp;amp;gt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |=           (bishops &amp;amp;gt;&amp;amp;gt; 9) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   return               (flood &amp;amp;gt;&amp;amp;gt; 9) &amp;amp;amp; notH ;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 noWeAttacks(U64 bishops, U64 empty) {&amp;lt;br/&amp;gt;   const U64 notH = C64(0x7f7f7f7f7f7f7f7f);&amp;lt;br/&amp;gt;   U64 flood = bishops;&amp;lt;br/&amp;gt;   empty &amp;amp;amp;= notH;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= bishops = (bishops &amp;amp;lt;&amp;amp;lt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |=           (bishops &amp;amp;lt;&amp;amp;lt; 7) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   return               (flood &amp;amp;lt;&amp;amp;lt; 7) &amp;amp;amp; notH ;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 eastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 notA &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0xfefefefefefefefe&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notA&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;         &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;           &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;flood &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notA &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 noEaAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bishops, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 notA &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0xfefefefefefefefe&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notA&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;           &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;               &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;flood &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notA &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 soEaAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bishops, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 notA &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0xfefefefefefefefe&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notA&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;           &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;               &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;flood &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notA &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 westAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 notH &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x7f7f7f7f7f7f7f7f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notH&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rooks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;         &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;           &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;flood &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notH &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 soWeAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bishops, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 notH &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x7f7f7f7f7f7f7f7f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notH&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;           &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;               &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;flood &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notH &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 noWeAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bishops, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 notH &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x7f7f7f7f7f7f7f7f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notH&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bishops &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;           &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;               &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;flood &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notH &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:8 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:57:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@GeneralizedRays&amp;quot; title=&amp;quot;Anchor: GeneralizedRays&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;GeneralizedRays&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:57 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:29:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc7&quot;&gt;&lt;a name=&quot;Generalized Rays&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:29 --&gt;Generalized Rays&lt;/h1&gt;
 &lt;br /&gt;
Since &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#Rotate&quot;&gt;rotate&lt;/a&gt; works like a &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#GeneralizedShift&quot;&gt;generalized shift&lt;/a&gt; with positive or negative shift amount - since it internally applies a modulo 64 and makes -i = 64-i. We need to clear either the lower or upper bits by intersection with a mask, which might be combined with the wrap-ands for &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;one step&lt;/a&gt;. It might be applied to get attacks for both sides with a direction parameter and small lookups for shift amount and wrap-ands - instead of multiple code for eight directions. Of course generalized shift will be a bit slower due to lookups and using cl as the shift amount register.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:31:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc8&quot;&gt;&lt;a name=&quot;Generalized Rays-Loop Version&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:31 --&gt;Loop Version&lt;/h2&gt;
 This is the loop-version:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:9:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 occludedFill (U64 gen, U64 pro, int dir8) {&amp;lt;br/&amp;gt;   U64 flood = 0;&amp;lt;br/&amp;gt;   if (gen) {&amp;lt;br/&amp;gt;      int r = shift[dir8]; // {+-1,7,8,9}&amp;lt;br/&amp;gt;      pro  &amp;amp;amp;= avoidWrap[dir8];&amp;lt;br/&amp;gt;      do {&amp;lt;br/&amp;gt;         flood |= gen;&amp;lt;br/&amp;gt;         gen = rotateLeft(gen, r) &amp;amp;amp; pro;&amp;lt;br/&amp;gt;      } while (gen);&amp;lt;br/&amp;gt;   }&amp;lt;br/&amp;gt;   return flood;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 shiftOne (U64 b, int dir8) {&amp;lt;br/&amp;gt;   int r = shift[dir8]; // {+-1,7,8,9}&amp;lt;br/&amp;gt;   return rotateLeft(b, r) &amp;amp;amp; avoidWrap[dir8];&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 slidingAttacks (U64 sliders, U64 empty, int dir8) {&amp;lt;br/&amp;gt;   U64 fill = occludedFill(slider, empty, dir8)&amp;lt;br/&amp;gt;   return shiftOne(fill, dir8);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;// positve left, negative right shifts&amp;lt;br/&amp;gt;int shift[8] = {9, 1,-7,-8,-9,-1, 7, 8};&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 avoidWrap[8] =&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;   0xfefefefefefefe00,&amp;lt;br/&amp;gt;   0xfefefefefefefefe,&amp;lt;br/&amp;gt;   0x00fefefefefefefe,&amp;lt;br/&amp;gt;   0x00ffffffffffffff,&amp;lt;br/&amp;gt;   0x007f7f7f7f7f7f7f,&amp;lt;br/&amp;gt;   0x7f7f7f7f7f7f7f7f,&amp;lt;br/&amp;gt;   0x7f7f7f7f7f7f7f00,&amp;lt;br/&amp;gt;   0xffffffffffffff00,&amp;lt;br/&amp;gt;};&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 occludedFill &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
      &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; r &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; shift&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// {+-1,7,8,9}&lt;/span&gt;
      pro  &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; avoidWrap&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
         flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
         gen &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen, r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pro&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; flood&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 shiftOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; r &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; shift&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// {+-1,7,8,9}&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b, r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; avoidWrap&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 slidingAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 sliders, U64 empty, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 fill &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; occludedFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;slider, empty, dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; shiftOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;fill, dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// positve left, negative right shifts&lt;/span&gt;
&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; shift&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;,&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;,&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;,&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
U64 avoidWrap&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;nu12&quot;&gt;0xfefefefefefefe00&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0xfefefefefefefefe&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x00fefefefefefefe&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x00ffffffffffffff&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x007f7f7f7f7f7f7f&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x7f7f7f7f7f7f7f7f&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x7f7f7f7f7f7f7f00&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0xffffffffffffff00&lt;/span&gt;,
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:9 --&gt;The avoidWrap masks by some arbitrary dir8 enumeration and shift amount:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:10:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;6 == noWe -&amp;amp;gt; +7     7 == nort -&amp;amp;gt; +8     0 == noEa -&amp;amp;gt; +9&amp;lt;br/&amp;gt;0x7F7F7F7F7F7F7F00  0xFFFFFFFFFFFFFF00  0xFEFEFEFEFEFEFE00&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;5 == west -&amp;amp;gt; -1                         1 == east -&amp;amp;gt; +1&amp;lt;br/&amp;gt;0x7F7F7F7F7F7F7F7F                      0xFEFEFEFEFEFEFEFE&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;4 == soWe -&amp;amp;gt; -9     3 == sout -&amp;amp;gt; -8     2 == soEa -&amp;amp;gt; -7&amp;lt;br/&amp;gt;0x007F7F7F7F7F7F7F  0x00FFFFFFFFFFFFFF  0x00FEFEFEFEFEFEFE&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;6 == noWe -&amp;gt; +7     7 == nort -&amp;gt; +8     0 == noEa -&amp;gt; +9
0x7F7F7F7F7F7F7F00  0xFFFFFFFFFFFFFF00  0xFEFEFEFEFEFEFE00
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
. . . . . . . .     . . . . . . . .     . . . . . . . .
&amp;nbsp;
5 == west -&amp;gt; -1                         1 == east -&amp;gt; +1
0x7F7F7F7F7F7F7F7F                      0xFEFEFEFEFEFEFEFE
1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .                         . 1 1 1 1 1 1 1
&amp;nbsp;
4 == soWe -&amp;gt; -9     3 == sout -&amp;gt; -8     2 == soEa -&amp;gt; -7
0x007F7F7F7F7F7F7F  0x00FFFFFFFFFFFFFF  0x00FEFEFEFEFEFEFE
. . . . . . . .     . . . . . . . .     . . . . . . . .
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1
1 1 1 1 1 1 1 .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:10 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:33:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc9&quot;&gt;&lt;a name=&quot;Generalized Rays-Unrolled Attacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:33 --&gt;Unrolled Attacks&lt;/h2&gt;
 The generalized unrolled sliding attack getter:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:11:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 slidingAttacks (U64 sliders, U64 empty, int dir8) {&amp;lt;br/&amp;gt;   U64 flood = sliders;&amp;lt;br/&amp;gt;   int r = shift[dir8]; // {+-1,7,8,9}&amp;lt;br/&amp;gt;   empty &amp;amp;amp;= avoidWrap[dir8];&amp;lt;br/&amp;gt;   flood |= sliders = rotateLeft(sliders , r) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= sliders = rotateLeft(sliders , r) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= sliders = rotateLeft(sliders , r) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= sliders = rotateLeft(sliders , r) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |= sliders = rotateLeft(sliders , r) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   flood |=         = rotateLeft(sliders , r) &amp;amp;amp; empty;&amp;lt;br/&amp;gt;   return   rotateLeft(flood, r)  &amp;amp;amp;   avoidWrap[dir8];&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 slidingAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 sliders, U64 empty, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 flood &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; sliders&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; r &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; shift&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// {+-1,7,8,9}&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; avoidWrap&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; sliders &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sliders , r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; sliders &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sliders , r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; sliders &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sliders , r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; sliders &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sliders , r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; sliders &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sliders , r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   flood &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;         &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sliders , r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; empty&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;   rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;flood, r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;   avoidWrap&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:11 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:35:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc10&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:35 --&gt;See also&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/AVX2#Dumb7Fill&quot;&gt;AVX2 Dumb7Fill&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20Algorithms&quot;&gt;Fill Algorithms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pieces%20versus%20Directions&quot;&gt;Pieces versus Directions&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:37:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc11&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:37 --&gt;External Links&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://radagast.se/othello/bitmob.c&quot; rel=&quot;nofollow&quot;&gt;bitboard mobility&lt;/a&gt; Copyright (c) 2003, &lt;a class=&quot;wiki_link&quot; href=&quot;/Gunnar%20Andersson&quot;&gt;Gunnar Andersson&lt;/a&gt; » &lt;a class=&quot;wiki_link&quot; href=&quot;/Othello&quot;&gt;Othello&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Mobility&quot;&gt;Mobility&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#WeatherReport&quot;&gt;Weather Report&lt;/a&gt; -  &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.weatherreportdiscography.org/weather-report-1971/&quot; rel=&quot;nofollow&quot;&gt;Seventh Arrow / Umbrellas, 1971&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/YouTube&quot; rel=&quot;nofollow&quot;&gt;YouTube&lt;/a&gt; Video&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#JoeZawinul&quot;&gt;Joe Zawinul&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#WayneShorter&quot;&gt;Wayne Shorter&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#MiroslavVitous&quot;&gt;Miroslav Vitouš&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#AlphonseMouzon&quot;&gt;Alphonse Mouzon&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#DomUmRomao&quot;&gt;Dom Um Romão&lt;/a&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMediaRule:12:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/custom/26371110?h=0&amp;amp;w=0&amp;quot; class=&amp;quot;WikiMedia WikiMediaCustom&amp;quot; id=&amp;quot;wikitext@@media@@type=&amp;amp;quot;custom&amp;amp;quot; key=&amp;amp;quot;26371110&amp;amp;quot;&amp;quot; title=&amp;quot;Custom Media&amp;quot;/&amp;gt; --&gt;&lt;iframe width=&quot;480&quot; height=&quot;360&quot; src=&quot;//www.youtube.com/embed/iigJbeTzFHs?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;!-- ws:end:WikiTextMediaRule:12 --&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:39:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc12&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:39 --&gt;What links here?&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextIncludeRule:013:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Dumb7Fill&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Dumb7Fill&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Dumb7Fill includeBody-Dumb7Fill includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tfoot class=&quot;includeBacklinksFooter&quot;&gt;
    &lt;tr&gt;
      &lt;td colspan=&quot;5&quot;&gt;&lt;a href=&quot;https://chessprogramming.wikispaces.com/page/links/Dumb7Fill&quot;&gt;More Links&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tfoot&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/AVX2&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;AVX2&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 8, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/DirGolem&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;DirGolem&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Dumb7Fill&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Dumb7Fill&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 27, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Efficient+Generation+of+Sliding+Piece+Attacks&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Efficient Generation of Sliding Piece Attacks&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 6, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Gaviota&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Gaviota&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 21, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/General+Setwise+Operations&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;General Setwise Operations&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 25, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Gunnar+Andersson&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Gunnar Andersson&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 23, 2011&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Influence+Quantity+of+Pieces&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Influence Quantity of Pieces&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 21, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/John+L.+Jerz&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;John L. Jerz&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 15, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Kogge-Stone+Algorithm&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 17, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Lachex&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Lachex&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 7, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Little+Wing&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Little Wing&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 26, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Mobility&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Mobility&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Othello&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Othello&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 4, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pieces+versus+Directions&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pieces versus Directions&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 6, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Sequential+Logic&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Sequential Logic&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 10, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Shifted+Bitboards&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Shifted Bitboards&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 9, 2011&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/SIMD+and+SWAR+Techniques&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;SIMD and SWAR Techniques&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 27, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Sliding+Piece+Attacks&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Sliding Piece Attacks&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 27, 2016&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:013 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Piece%20Attacks&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Duo Trio Quart (Bitboards)</title>
      <link>https://chessprogramming.wikispaces.com/Duo+Trio+Quart+%28Bitboards%29</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Duo+Trio+Quart+%28Bitboards%29</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Duo+Trio+Quart+%28Bitboards%29</comments>
      <pubDate>Fri, 18 Aug 2017 17:28:27 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextTocRule:24:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:24 --&gt;&lt;!-- ws:start:WikiTextTocRule:25: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Neighbors&quot;&gt;Neighbors&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:25 --&gt;&lt;!-- ws:start:WikiTextTocRule:26: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Neighbor Algebra&quot;&gt;Neighbor Algebra&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:26 --&gt;&lt;!-- ws:start:WikiTextTocRule:27: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:27 --&gt;&lt;!-- ws:start:WikiTextTocRule:28: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Forum Posts&quot;&gt;Forum Posts&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:28 --&gt;&lt;!-- ws:start:WikiTextTocRule:29: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:29 --&gt;&lt;!-- ws:start:WikiTextTocRule:30: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#References&quot;&gt;References&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:30 --&gt;&lt;!-- ws:start:WikiTextTocRule:31: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:31 --&gt;&lt;!-- ws:start:WikiTextTocRule:32: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:32 --&gt;&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Duo Trio Quart&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Pawn-Duo&lt;/strong&gt;, (Phalanx) &lt;!-- ws:start:WikiTextRefRule:6:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.chess-game-strategies.com/pawn-structure_general_page-5_phalanx-formation.html&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Pawn Structure (General) | Page 5 of 5 | Phalanx Formation&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:6 --&gt; &lt;br /&gt;
two adjacent &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn&quot;&gt;pawns&lt;/a&gt; of the same &lt;a class=&quot;wiki_link&quot; href=&quot;/Color&quot;&gt;color&lt;/a&gt; on the same &lt;a class=&quot;wiki_link&quot; href=&quot;/Ranks&quot;&gt;rank&lt;/a&gt; that mutually cover the other&#039;s &lt;a class=&quot;wiki_link&quot; href=&quot;/Stop%20Square&quot;&gt;stop square&lt;/a&gt;. A &lt;strong&gt;Trio&lt;/strong&gt; are three horizontal friendly pawns, a &lt;strong&gt;Quart&lt;/strong&gt; four horizontal friendly pawns.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Working in the &lt;strong&gt;bitboard centric&lt;/strong&gt; world to determine pawn related pattern set-wise&lt;/em&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;The code snippets rely on &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#ShiftingBitboards&quot;&gt;shifting bitboards&lt;/a&gt;, specially by &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;one step only&lt;/a&gt;.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:10:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Neighbors&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:10 --&gt;Neighbors&lt;/h1&gt;
To get pawns with east or west neighbors is simple:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 pawnsWithEastNeighbors(U64 pawns) {&amp;lt;br/&amp;gt;   return pawns &amp;amp;amp; westOne (pawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 pawnsWithWestNeighbors(U64 pawns) {&amp;lt;br/&amp;gt;   return pawnsWithEastNeighbors(pawns) &amp;amp;lt;&amp;amp;lt; 1; // * 2&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 pawnsWithEastNeighbors&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; pawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; westOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 pawnsWithWestNeighbors&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; pawnsWithEastNeighbors&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// * 2&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;or&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 pawnsWithWestNeighbors(U64 pawns) {&amp;lt;br/&amp;gt;   return pawns &amp;amp;amp; eastOne (pawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 pawnsWithEastNeighbors(U64 pawns) {&amp;lt;br/&amp;gt;   return pawnsWithWestNeighbors(pawns) &amp;amp;gt;&amp;amp;gt; 1;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 pawnsWithWestNeighbors&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; pawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; eastOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 pawnsWithEastNeighbors&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; pawnsWithWestNeighbors&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;pawns               pawns with east     pawns with west     pawns with east&amp;lt;br/&amp;gt;                    neighbors           neighbors           and west neighbors&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;1 1 1 . . . . .     1 1 . . . . . .     . 1 1 . . . . .     . 1 . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . 1 1 .     . . . . . 1 . .     . . . . . . 1 .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;pawns               pawns with east     pawns with west     pawns with east
                    neighbors           neighbors           and west neighbors
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
1 1 1 . . . . .     1 1 . . . . . .     . 1 1 . . . . .     . 1 . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . 1 1 .     . . . . . 1 . .     . . . . . . 1 .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:12:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Neighbor Algebra&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:12 --&gt;Neighbor Algebra&lt;/h1&gt;
Pawns with east or west neighbors are at least member of a duo. Pawns with east and west neighbors at least member of a trio. If two neighbors have both east and west neighbors, it is at least a quart.&lt;br /&gt;
&lt;br /&gt;
An exclusive pawn duo is therefor a pawn with one neighbor, while this neighbor has no other neighbor as well.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 duo (U64 pawns) {&amp;lt;br/&amp;gt;   U64 withWestNeighbors = pawnsWithWestNeighbors(pawns);&amp;lt;br/&amp;gt;   U64 withEastNeighbors = withWestNeighbors &amp;amp;gt;&amp;amp;gt; 1;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;   U64 withOneExclusiveNeighbor  = withWestNeighbors ^ withEastNeighbors;&amp;lt;br/&amp;gt;   U64 withExclusiveWestNeighbor = withWestNeighbors &amp;amp;amp; withOneExclusiveNeighbor;&amp;lt;br/&amp;gt;   U64 withExclusiveEastNeighbor = withEastNeighbors &amp;amp;amp; withOneExclusiveNeighbor;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;   U64 duoWestOne = withEclusiveEastNeighbor &amp;amp;amp; (withEclusiveWestNeighbor &amp;amp;gt;&amp;amp;gt; 1);&amp;lt;br/&amp;gt;   U64 duoEastOne = duoWestOne &amp;amp;lt;&amp;amp;lt; 1;&amp;lt;br/&amp;gt;   return duoWestOne | duoEastOne;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 duo &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 withWestNeighbors &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pawnsWithWestNeighbors&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 withEastNeighbors &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; withWestNeighbors &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   U64 withOneExclusiveNeighbor  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; withWestNeighbors &lt;span class=&quot;sy3&quot;&gt;^&lt;/span&gt; withEastNeighbors&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 withExclusiveWestNeighbor &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; withWestNeighbors &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; withOneExclusiveNeighbor&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 withExclusiveEastNeighbor &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; withEastNeighbors &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; withOneExclusiveNeighbor&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   U64 duoWestOne &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; withEclusiveEastNeighbor &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;withEclusiveWestNeighbor &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 duoEastOne &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; duoWestOne &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; duoWestOne &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; duoEastOne&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;pawns               pawns with excl.    pawns with excl.    duo&amp;lt;br/&amp;gt;                    east neighbor       west neighbor&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;1 1 1 . . . . .     1 . . . . . . .     . . 1 . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . 1 1 .     . . . . . 1 . .     . . . . . . 1 .     . . . . . 1 1 .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;pawns               pawns with excl.    pawns with excl.    duo
                    east neighbor       west neighbor
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
1 1 1 . . . . .     1 . . . . . . .     . . 1 . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . 1 1 .     . . . . . 1 . .     . . . . . . 1 .     . . . . . 1 1 .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:14:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:14 --&gt;See also&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Stop%20Square&quot;&gt;Stop Square&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Hanging%20Pawns&quot;&gt;Hanging Pawns&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Islands%20%28Bitboards%29&quot;&gt;Pawn Islands (Bitboards)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Phalanx&quot;&gt;Phalanx&lt;/a&gt; (Engine)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:16:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;Forum Posts&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:16 --&gt;Forum Posts&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=52382&quot; rel=&quot;nofollow&quot;&gt;The phalanx concept&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Lyudmil%20Tsvetkov&quot;&gt;Lyudmil Tsvetkov&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;,  May 21, 2014&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:18:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc4&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:18 --&gt;External Links&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.chess-game-strategies.com/pawn-structure_general_page-5_phalanx-formation.html&quot; rel=&quot;nofollow&quot;&gt;Pawn Structure (General) | Page 5 of 5 | Phalanx Formation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Duet&quot; rel=&quot;nofollow&quot;&gt;Duet from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Phalanx&quot; rel=&quot;nofollow&quot;&gt;Phalanx from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Trio&quot; rel=&quot;nofollow&quot;&gt;Trio from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://kingaglyk.pl&quot; rel=&quot;nofollow&quot;&gt;Kinga Głyk Trio&lt;/a&gt; - Walking Baby, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.visioninmusica.com/&quot; rel=&quot;nofollow&quot;&gt;VisionInMusica&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Terni&quot; rel=&quot;nofollow&quot;&gt;Terni&lt;/a&gt;, March 10, 2017, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/YouTube&quot; rel=&quot;nofollow&quot;&gt;YouTube&lt;/a&gt; Video&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#KingaGlyk&quot;&gt;Kinga Głyk&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://glyk.pl/&quot; rel=&quot;nofollow&quot;&gt;Irek Głyk&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.visioninmusica.com/kinga-glyk-happy-birthday/&quot; rel=&quot;nofollow&quot;&gt;Rafal Stepien&lt;/a&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMediaRule:7:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/youtube/Xmq52kc_HM0?h=315&amp;amp;w=560&amp;quot; class=&amp;quot;WikiMedia WikiMediaYoutube&amp;quot; id=&amp;quot;wikitext@@media@@type=&amp;amp;quot;youtube&amp;amp;quot; key=&amp;amp;quot;Xmq52kc_HM0&amp;amp;quot;&amp;quot; title=&amp;quot;YouTube Video&amp;quot;height=&amp;quot;315&amp;quot; width=&amp;quot;560&amp;quot;/&amp;gt; --&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/Xmq52kc_HM0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;!-- ws:end:WikiTextMediaRule:7 --&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Quart_%28disambiguation%29&quot; rel=&quot;nofollow&quot;&gt;Quart (disambiguation) from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#PantaRhei&quot;&gt;Panta Rhei&lt;/a&gt; plays &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/B%C3%A9la_Bart%C3%B3k&quot; rel=&quot;nofollow&quot;&gt;Bartók&#039;s&lt;/a&gt; Quarts, 1977, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/YouTube&quot; rel=&quot;nofollow&quot;&gt;YouTube&lt;/a&gt; Video&lt;br /&gt;
&lt;!-- ws:start:WikiTextMediaRule:8:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/youtube/xDiKq9Wf0UQ?h=315&amp;amp;w=560&amp;quot; class=&amp;quot;WikiMedia WikiMediaYoutube&amp;quot; id=&amp;quot;wikitext@@media@@type=&amp;amp;quot;youtube&amp;amp;quot; key=&amp;amp;quot;xDiKq9Wf0UQ&amp;amp;quot;&amp;quot; title=&amp;quot;YouTube Video&amp;quot;height=&amp;quot;315&amp;quot; width=&amp;quot;560&amp;quot;/&amp;gt; --&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/xDiKq9Wf0UQ&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;!-- ws:end:WikiTextMediaRule:8 --&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:20:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc5&quot;&gt;&lt;a name=&quot;References&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:20 --&gt;References&lt;/h1&gt;
&lt;!-- ws:start:WikiTextReferencesRule:136:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.chess-game-strategies.com/pawn-structure_general_page-5_phalanx-formation.html&quot; rel=&quot;nofollow&quot;&gt;Pawn Structure (General) | Page 5 of 5 | Phalanx Formation&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:136 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:22:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc6&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:22 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:05:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Duo Trio Quart (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Duo Trio Quart (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Duo_Trio_Quart_(Bitboards) includeBody-Duo%20Trio%20Quart%20%28Bitboards%29 includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Backward+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Backward Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 5, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/ChessBrainVB&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;ChessBrainVB&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 24, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Connected+Passed+Pawns&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Connected Passed Pawns&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 27, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Dartmouth+CP&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Dartmouth CP&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 19, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Demolito&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Demolito&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 1, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Design+Principles&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Design Principles&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Duo+Trio+Quart+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Duo Trio Quart (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 18, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/En+prise&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;En prise&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/GopherCheck&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;GopherCheck&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 3, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hanging+pawns&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hanging pawns&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 5, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hanging+Piece&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hanging Piece&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hans+Kmoch&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hans Kmoch&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Isolated+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Isolated Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 18, 2012&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Kaissa&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Kaissa&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Apr 9, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Lyudmil+Tsvetkov&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Lyudmil Tsvetkov&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 28, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Structure&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Structure&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 2, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawns+Breakthrough&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawns Breakthrough&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 4, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Protected+Passed+Pawn&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Protected Passed Pawn&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 7, 2012&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Stockfish&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Stockfish&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Apr 7, 2018&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:05 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Fill by Subtraction</title>
      <link>https://chessprogramming.wikispaces.com/Fill+by+Subtraction</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Fill+by+Subtraction</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Fill+by+Subtraction</comments>
      <pubDate>Fri, 05 Mar 2010 18:22:13 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextTocRule:12:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:12 --&gt;&lt;!-- ws:start:WikiTextTocRule:13: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Source Code&quot;&gt;Source Code&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:13 --&gt;&lt;!-- ws:start:WikiTextTocRule:14: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Comparison with Kogge-Stone&quot;&gt;Comparison with Kogge-Stone&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:14 --&gt;&lt;!-- ws:start:WikiTextTocRule:15: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:15 --&gt;&lt;!-- ws:start:WikiTextTocRule:16: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:16 --&gt;&lt;!-- ws:start:WikiTextTocRule:17: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:17 --&gt;&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Piece%20Attacks&quot;&gt;Sliding Piece Attacks&lt;/a&gt; * Fill by Subtraction&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Performing the &lt;a class=&quot;wiki_link&quot; href=&quot;/Subtracting%20a%20Rook%20from%20a%20blocking%20Piece&quot;&gt;o^(o-2r) - trick &lt;/a&gt; in a &lt;a class=&quot;wiki_link&quot; href=&quot;/SIMD%20and%20SWAR%20Techniques&quot;&gt;SWAR-wise&lt;/a&gt; fashion with bytes (ranks), saves some instructions compared to &lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;Kogge-Stone&lt;/a&gt;.&lt;br /&gt;
&lt;!-- ws:start:WikiTextIncludeRule:02:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/page?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;MappingHint&amp;amp;quot;&amp;quot; title=&amp;quot;Include page: page=&amp;amp;quot;MappingHint&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;

&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;/Square%20Mapping%20Considerations&quot;&gt;&lt;img src=&quot;/file/view/mapping.JPG/93134172/mapping.JPG&quot; alt=&quot;mapping.JPG&quot; title=&quot;mapping.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;td&gt;&lt;em&gt;Code samples and bitboard diagrams rely on &lt;a class=&quot;wiki_link&quot; href=&quot;/Square%20Mapping%20Considerations#LittleEndianRankFileMapping&quot;&gt;Little endian file and rank mapping&lt;/a&gt;&lt;/em&gt;.&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:end:WikiTextIncludeRule:02 --&gt;&lt;br /&gt;
Unfortunately it only works in positive horizontal direction, so the possible savings are marginal, despite even less generalization of handling one out of eight cases with a different code pattern.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:4:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Source Code&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:4 --&gt;Source Code&lt;/h1&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 eastAttacks(U64 rooks, U64 empty) {&amp;lt;br/&amp;gt;   const U64 H     =  0x8080808080808080;&amp;lt;br/&amp;gt;   U64 occInclRook =  rooks | ~empty | H;&amp;lt;br/&amp;gt;   U64 occExclRook = (rooks   &amp;amp;amp;=      ~H)  ^ occInclRook;&amp;lt;br/&amp;gt;   U64 rookAttacks = (occExclRook - rooks) ^ occInclRook;&amp;lt;br/&amp;gt;   return rookAttacks;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 eastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 H     &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;nu12&quot;&gt;0x8080808080808080&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 occInclRook &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  rooks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; ~empty &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; H&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 occExclRook &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks   &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;      ~H&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;sy3&quot;&gt;^&lt;/span&gt; occInclRook&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 rookAttacks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;occExclRook &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt; rooks&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;^&lt;/span&gt; occInclRook&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; rookAttacks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;Even more with vectors of two bitboards and &lt;a class=&quot;wiki_link&quot; href=&quot;/SSE2#EastAttacks&quot;&gt;SSE2-instructions&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:6:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Comparison with Kogge-Stone&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:6 --&gt;Comparison with Kogge-Stone&lt;/h1&gt;
For comparison the &lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;Kogge-Stone&lt;/a&gt; attack-getter. It gives an idea how to implement a &lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms#KoggeStoneAdder&quot;&gt;Kogge-Stone Adder&lt;/a&gt; with bitwise operations only.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 eastAttacks(U64 rooks, U64 empty) {&amp;lt;br/&amp;gt;   empty &amp;amp;amp;= notAFile;&amp;lt;br/&amp;gt;   rooks |= empty &amp;amp;amp; (rooks &amp;amp;lt;&amp;amp;lt; 1);&amp;lt;br/&amp;gt;   empty &amp;amp;amp;=         (empty &amp;amp;lt;&amp;amp;lt; 1);&amp;lt;br/&amp;gt;   rooks |= empty &amp;amp;amp; (rooks &amp;amp;lt;&amp;amp;lt; 2);&amp;lt;br/&amp;gt;   empty &amp;amp;amp;=         (empty &amp;amp;lt;&amp;amp;lt; 2);&amp;lt;br/&amp;gt;   rooks |= empty &amp;amp;amp; (rooks &amp;amp;lt;&amp;amp;lt; 4);&amp;lt;br/&amp;gt;   return notAFile&amp;amp;amp; (rooks &amp;amp;lt;&amp;amp;lt; 1);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 eastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notAFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   rooks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;         &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;empty &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   rooks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;         &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;empty &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   rooks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; empty &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; notAFile&lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:8:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:8 --&gt;See also&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms#KoggeStoneAdder&quot;&gt;Add/Sub versus Attacks&lt;/a&gt; from &lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms&quot;&gt;Parallel Prefix Algorithms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20Algorithms&quot;&gt;Fill Algorithms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/SSE2#EastAttacks&quot;&gt;Fill by Subtraction&lt;/a&gt; with &lt;a class=&quot;wiki_link&quot; href=&quot;/SSE2&quot;&gt;SSE2-instructions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pieces%20versus%20Directions&quot;&gt;Pieces versus Directions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/SIMD%20and%20SWAR%20Techniques&quot;&gt;SIMD and SWAR Techniques&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Subtracting%20a%20Rook%20from%20a%20blocking%20Piece&quot;&gt;Subtracting a Rook from a blocking Piece&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:10:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:10 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:03:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Fill by Subtraction&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Fill by Subtraction&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Fill_by_Subtraction includeBody-Fill%20by%20Subtraction includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/DirGolem&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;DirGolem&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 6, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+by+Subtraction&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill by Subtraction&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 5, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Kogge-Stone+Algorithm&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 17, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/MMX&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;MMX&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Parallel+Prefix+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Parallel Prefix Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 22, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pieces+versus+Directions&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pieces versus Directions&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 6, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Sliding+Piece+Attacks&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Sliding Piece Attacks&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 27, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/SSE2&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;SSE2&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 27, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Subtracting+a+Rook+from+a+Blocking+Piece&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Subtracting a Rook from a Blocking Piece&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Dec 2, 2016&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:03 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Piece%20Attacks&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Isolated Pawns (Bitboards)</title>
      <link>https://chessprogramming.wikispaces.com/Isolated+Pawns+%28Bitboards%29</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Isolated+Pawns+%28Bitboards%29</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Isolated+Pawns+%28Bitboards%29</comments>
      <pubDate>Sun, 18 Nov 2012 09:53:37 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextTocRule:14:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:14 --&gt;&lt;!-- ws:start:WikiTextTocRule:15: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Isolani by Square&quot;&gt;Isolani by Square&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:15 --&gt;&lt;!-- ws:start:WikiTextTocRule:16: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Isolanis and Half-isolanis set-wise&quot;&gt;Isolanis and Half-isolanis set-wise&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:16 --&gt;&lt;!-- ws:start:WikiTextTocRule:17: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Hanging pawns&quot;&gt;Hanging pawns&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:17 --&gt;&lt;!-- ws:start:WikiTextTocRule:18: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:18 --&gt;&lt;!-- ws:start:WikiTextTocRule:19: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:19 --&gt;&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Isolated Pawns&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
An &lt;a class=&quot;wiki_link&quot; href=&quot;/Isolated%20Pawn&quot;&gt;Isolated Pawn&lt;/a&gt; or &lt;strong&gt;Isolani&lt;/strong&gt; has no friendly pawns on adjacent &lt;a class=&quot;wiki_link&quot; href=&quot;/Files&quot;&gt;files&lt;/a&gt; .&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:20:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@IsolaniBySquare&amp;quot; title=&amp;quot;Anchor: IsolaniBySquare&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;IsolaniBySquare&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:20 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:6:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Isolani by Square&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:6 --&gt;Isolani by Square&lt;/h1&gt;
 To determine whether a pawn is isolated, we simply lookup an &lt;a class=&quot;wiki_link&quot; href=&quot;/Array&quot;&gt;array&lt;/a&gt; with neighboring file-masks. If the &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#Intersection&quot;&gt;intersection&lt;/a&gt; of neighbored files with own pawns is empty, the pawn is isolated. This symmetrical property appears to be equal for white and black pawns.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;if ( (arrNeighborFiles[sqOfWhitePawn] &amp;amp;amp; pawnBB[white]) == 0 ) -&amp;amp;gt; pawn is isolated&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;arrNeighborFiles&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sqOfWhitePawn&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pawnBB&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;white&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; pawn is isolated&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;arrNeighborFiles[d*]&amp;lt;br/&amp;gt;. . 1 . 1 . . .&amp;lt;br/&amp;gt;. . 1 . 1 . . .&amp;lt;br/&amp;gt;. . 1 . 1 . . .&amp;lt;br/&amp;gt;. . 1 . 1 . . .&amp;lt;br/&amp;gt;. . 1 . 1 . . .&amp;lt;br/&amp;gt;. . 1 . 1 . . .&amp;lt;br/&amp;gt;. . 1 . 1 . . .&amp;lt;br/&amp;gt;. . 1 . 1 . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;arrNeighborFiles[d*]
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;The arrNeighborFiles might be condensed to eight bitboards only, instead of 64 - if we index by&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;file(sq) == sq &amp;amp;amp; 7&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;file&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; sq &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;instead of square.&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:21:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@IsolanisSetWise&amp;quot; title=&amp;quot;Anchor: IsolanisSetWise&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;IsolanisSetWise&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:21 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:8:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Isolanis and Half-isolanis set-wise&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:8 --&gt;Isolanis and Half-isolanis set-wise&lt;/h1&gt;
 Isolated pawns are the &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#RelativeComplement&quot;&gt;relative complement&lt;/a&gt; of pawns with the union of their own &lt;a class=&quot;wiki_link&quot; href=&quot;/Attack%20Spans&quot;&gt;attack fills&lt;/a&gt; over the whole file. To keep disjoint pawns with no neighbor on either east or west adjacent files has the advantage of greater versatility. Isolanis are the intersection of them, half-isolanis the exclusive or:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 noNeighborOnEastFile (U64 pawns) {&amp;lt;br/&amp;gt;    return pawns &amp;amp;amp; ~westAttackFileFill(pawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 noNeighborOnWestFile (U64 pawns) {&amp;lt;br/&amp;gt;    return pawns &amp;amp;amp; ~eastAttackFileFill(pawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 isolanis(U64 pawns) {&amp;lt;br/&amp;gt;   return  noNeighborOnEastFile(pawns)&amp;lt;br/&amp;gt;         &amp;amp;amp; noNeighborOnWestFile(pawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 halfIsolanis(U64 pawns) {&amp;lt;br/&amp;gt;   return  noNeighborOnEastFile(pawns)&amp;lt;br/&amp;gt;         ^ noNeighborOnWestFile(pawns);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 noNeighborOnEastFile &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; pawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; ~westAttackFileFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 noNeighborOnWestFile &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; pawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; ~eastAttackFileFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 isolanis&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;  noNeighborOnEastFile&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
         &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; noNeighborOnWestFile&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 halfIsolanis&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;  noNeighborOnEastFile&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
         &lt;span class=&quot;sy3&quot;&gt;^&lt;/span&gt; noNeighborOnWestFile&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:22:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@HangingPawns&amp;quot; title=&amp;quot;Anchor: HangingPawns&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;HangingPawns&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:22 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:10:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Hanging pawns&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:10 --&gt;Hanging pawns&lt;/h1&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/Hanging%20pawns&quot;&gt;Hanging pawns&lt;/a&gt; are a &lt;a class=&quot;wiki_link&quot; href=&quot;/Duo%20Trio%20Quart%20%28Bitboards%29&quot;&gt;duo&lt;/a&gt; of &lt;a class=&quot;wiki_link&quot; href=&quot;/Open%20Pawns%20%28Bitboards%29&quot;&gt;open&lt;/a&gt; and half-isolated pawns.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wHangingPawns(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   return wOpenPawns(wpawns, bpawns)&amp;lt;br/&amp;gt;        &amp;amp;amp; halfIsolanis(wpawns) &amp;amp;amp; duo(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wHangingPawns&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wOpenPawns&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns, bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; halfIsolanis&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; duo&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:12:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:12 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:05:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Isolated Pawns (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Isolated Pawns (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Isolated_Pawns_(Bitboards) includeBody-Isolated%20Pawns%20%28Bitboards%29 includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Attack+Spans&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Attack Spans&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 4, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Backward+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Backward Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 5, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Dispersion+and+Distortion&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Dispersion and Distortion&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/En+prise&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;En prise&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hanging+pawns&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hanging pawns&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 5, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hanging+Piece&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hanging Piece&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hans+Kmoch&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hans Kmoch&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Isolated+Pawn&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Isolated Pawn&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 18, 2012&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Isolated+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Isolated Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 18, 2012&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Murka&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Murka&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Islands+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Islands (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 4, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Spans&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Spans&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 22, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Robocide&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Robocide&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 11, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Weak+Pawns&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Weak Pawns&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Dec 19, 2013&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:05 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>King Pattern</title>
      <link>https://chessprogramming.wikispaces.com/King+Pattern</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/King+Pattern</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/King+Pattern</comments>
      <pubDate>Fri, 15 Nov 2013 17:23:35 GMT</pubDate>
      <description>&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * King Pattern&lt;/strong&gt;&lt;br /&gt;


&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;!-- ws:start:WikiTextLocalImageRule:120:&amp;lt;a href=&amp;quot;http://en.wikipedia.org/wiki/File:Moore_d.gif&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;/file/view/Moore_d.gif/437736052/Moore_d.gif&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt; --&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/File:Moore_d.gif&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;/file/view/Moore_d.gif/437736052/Moore_d.gif&quot; alt=&quot;Moore_d.gif&quot; title=&quot;Moore_d.gif&quot; /&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextLocalImageRule:120 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
        &lt;td rowspan=&quot;2&quot;&gt;&lt;strong&gt;King pattern&lt;/strong&gt; are about &lt;strong&gt;king attacks&lt;/strong&gt;, some &lt;a class=&quot;wiki_link&quot; href=&quot;/King%20Safety&quot;&gt;king safety&lt;/a&gt; issues and &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Endgame&quot;&gt;pawn endgame&lt;/a&gt; related stuff. There is exactly one king per side - the whole game. Not a big issue, but even if white and black kings are member of the &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Board-Definition&quot;&gt;standard bitboard definition&lt;/a&gt; one may avoid &lt;a class=&quot;wiki_link&quot; href=&quot;/BitScan&quot;&gt;bitscanning&lt;/a&gt; whole the time. Even without explicit &lt;a class=&quot;wiki_link&quot; href=&quot;/Piece-Lists&quot;&gt;piece-lists&lt;/a&gt; , one may consider to keep the redundant king-squares &lt;a class=&quot;wiki_link&quot; href=&quot;/Incremental%20Updates&quot;&gt;incrementally updated&lt;/a&gt; during &lt;a class=&quot;wiki_link&quot; href=&quot;/Make%20Move&quot;&gt;make&lt;/a&gt;/&lt;a class=&quot;wiki_link&quot; href=&quot;/Unmake%20Move&quot;&gt;unmake&lt;/a&gt;.&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Moore neighborhood  &lt;!-- ws:start:WikiTextRefRule:19:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Moore_neighborhood&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Moore neighborhood from Wikipedia&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:19 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:start:WikiTextTocRule:61:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:61 --&gt;&lt;!-- ws:start:WikiTextTocRule:62: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#King Attacks&quot;&gt;King Attacks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:62 --&gt;&lt;!-- ws:start:WikiTextTocRule:63: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#King Attacks-by Lookup&quot;&gt;by Lookup&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:63 --&gt;&lt;!-- ws:start:WikiTextTocRule:64: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#King Attacks-by Calculation&quot;&gt;by Calculation&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:64 --&gt;&lt;!-- ws:start:WikiTextTocRule:65: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#King Safety&quot;&gt;King Safety&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:65 --&gt;&lt;!-- ws:start:WikiTextTocRule:66: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#King Safety-Pawn-Shield Pattern&quot;&gt;Pawn-Shield Pattern&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:66 --&gt;&lt;!-- ws:start:WikiTextTocRule:67: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#King Safety-Vulnerable on distant Checks&quot;&gt;Vulnerable on distant Checks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:67 --&gt;&lt;!-- ws:start:WikiTextTocRule:68: --&gt;&lt;div style=&quot;margin-left: 3em;&quot;&gt;&lt;a href=&quot;#King Safety-Vulnerable on distant Checks-Branchless&quot;&gt;Branchless&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:68 --&gt;&lt;!-- ws:start:WikiTextTocRule:69: --&gt;&lt;div style=&quot;margin-left: 3em;&quot;&gt;&lt;a href=&quot;#King Safety-Vulnerable on distant Checks-SSE4&quot;&gt;SSE4&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:69 --&gt;&lt;!-- ws:start:WikiTextTocRule:70: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#King and Pawns&quot;&gt;King and Pawns&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:70 --&gt;&lt;!-- ws:start:WikiTextTocRule:71: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#King and Pawns-Set-wise Rule of the Square&quot;&gt;Set-wise Rule of the Square&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:71 --&gt;&lt;!-- ws:start:WikiTextTocRule:72: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#King and Pawns-Flood Fill Algorithms&quot;&gt;Flood Fill Algorithms&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:72 --&gt;&lt;!-- ws:start:WikiTextTocRule:73: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:73 --&gt;&lt;!-- ws:start:WikiTextTocRule:74: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:74 --&gt;&lt;!-- ws:start:WikiTextTocRule:75: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#References&quot;&gt;References&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:75 --&gt;&lt;!-- ws:start:WikiTextTocRule:76: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:76 --&gt;&lt;!-- ws:start:WikiTextTocRule:77: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:77 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:78:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@KingAttacks&amp;quot; title=&amp;quot;Anchor: KingAttacks&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;KingAttacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:78 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:31:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;King Attacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:31 --&gt;King Attacks&lt;/h1&gt;
 The King attacks all squares in &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Moore_neighborhood&quot; rel=&quot;nofollow&quot;&gt;Moore neighborhood&lt;/a&gt;, that is squares with a &lt;a class=&quot;wiki_link&quot; href=&quot;/Distance&quot;&gt;Chebyshev distance&lt;/a&gt; of one.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:33:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc1&quot;&gt;&lt;a name=&quot;King Attacks-by Lookup&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:33 --&gt;by Lookup&lt;/h2&gt;
 Likely we have a the square-index handy, to access a table of precalculated king-attacks.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;U64 arrKingAttacks[64];&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 kingAttacks(enumSquare sq) {return arrKingAttacks[sq];}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;U64 arrKingAttacks[64];
&amp;nbsp;
U64 kingAttacks(enumSquare sq) {return arrKingAttacks[sq];}&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;For instance a king on g2:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . 1 1 1&amp;lt;br/&amp;gt;. . . . . 1 . 1&amp;lt;br/&amp;gt;. . . . . 1 1 1&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . 1 1 1
. . . . . 1 . 1
. . . . . 1 1 1&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:79:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@byCalculation&amp;quot; title=&amp;quot;Anchor: byCalculation&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;byCalculation&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:79 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:35:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc2&quot;&gt;&lt;a name=&quot;King Attacks-by Calculation&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:35 --&gt;by Calculation&lt;/h2&gt;
 To calculate all eight &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;directions&lt;/a&gt;, one can actually do some simple &lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms&quot;&gt;parallel prefix stuff&lt;/a&gt;. Rather than to do a union of all eight &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;direction-steps&lt;/a&gt;, one first applies the &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;horizontal attacks&lt;/a&gt; considering file-wraps. Those up to two bits are then shifted up and down, together with the king-bitboard itself, to get all the other direction bits:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 kingAttacks(U64 kingSet) {&amp;lt;br/&amp;gt;   U64 attacks = eastOne(kingSet) | westOne(kingSet);&amp;lt;br/&amp;gt;   kingSet    |= attacks;&amp;lt;br/&amp;gt;   attacks    |= nortOne(kingSet) | soutOne(kingSet);&amp;lt;br/&amp;gt;   return attacks;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 kingAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 kingSet&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 attacks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; eastOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;kingSet&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; westOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;kingSet&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   kingSet    &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; attacks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attacks    &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; nortOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;kingSet&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; soutOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;kingSet&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; attacks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;The routine is handy to initialize the kingAttacks &lt;a class=&quot;wiki_link&quot; href=&quot;/Array&quot;&gt;arrays&lt;/a&gt;:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 sqBB = 1;&amp;lt;br/&amp;gt;for (int sq = 0; sq &amp;amp;lt; 64; sq++, sqBB &amp;amp;lt;&amp;amp;lt;= 1)&amp;lt;br/&amp;gt;   arrKingAttacks[sq] = kingAttacks(sqBB);&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 sqBB &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; sq &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; sq &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; sq&lt;span class=&quot;sy2&quot;&gt;++&lt;/span&gt;, sqBB &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
   arrKingAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; kingAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sqBB&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;It must not necessarily called with single-populated bitboards, and is base of &lt;a class=&quot;wiki_link&quot; href=&quot;/King%20Pattern#FloodFillAlgorithms&quot;&gt;king path fill algorithms&lt;/a&gt;.&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:80:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@KingSafety&amp;quot; title=&amp;quot;Anchor: KingSafety&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;KingSafety&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:80 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:37:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;King Safety&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:37 --&gt;King Safety&lt;/h1&gt;
 &lt;a class=&quot;wiki_link&quot; href=&quot;/King%20Safety&quot;&gt;King Safety&lt;/a&gt; is an important evaluation topic. Some bitboard pattern are about to recognize king safety related features. To evaluate those features is a complete other story.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:39:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc4&quot;&gt;&lt;a name=&quot;King Safety-Pawn-Shield Pattern&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:39 --&gt;Pawn-Shield Pattern&lt;/h2&gt;
 During the &lt;a class=&quot;wiki_link&quot; href=&quot;/Middlegame&quot;&gt;middlegame&lt;/a&gt;, the king is encouraged to hide behind own pawn shields. Beside Considering open and half-open files on king&#039;s and adjacent files, one idea is to mask potential pawn shield pattern per wing of the king file - and to hash it to an appropriate index range to access tables with precalculated stuff. This mask might be used for kings on f1-h1 or f1-h2:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . 1 1 1&amp;lt;br/&amp;gt;. . . . . 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . 1 1 1
. . . . . 1 1 1
. . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:81:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@VulnerableOnDistantChecks&amp;quot; title=&amp;quot;Anchor: VulnerableOnDistantChecks&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;VulnerableOnDistantChecks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:81 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:41:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc5&quot;&gt;&lt;a name=&quot;King Safety-Vulnerable on distant Checks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:41 --&gt;Vulnerable on distant Checks&lt;/h2&gt;
 Assuming we are aware of all taboo squares of the king. That is the union of own pieces with all opposite attacks, then we can simply calculate a move target set by relative complement of the king attacks.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:5:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;moveTargets = arrKingAttacks[sq] &amp;amp;amp; ~taboo;&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;moveTargets = arrKingAttacks[sq] &amp;amp; ~taboo;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:5 --&gt;If moveTargets is empty - the king has no move. The king might be vulnerable on distant checks from any &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Pieces&quot;&gt;sliding piece&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;direction&lt;/a&gt;, due to lack of any escape. Otherwise, the king might be vulnerable on distant checks, if escape squares are on one line only - either rank, file, diagonal or anti-diagonal:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:6:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;if ( moveTargets == 0 )&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;   dirSet = 15; // vulnerable on all lines&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;else&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;   dirSet = 0;&amp;lt;br/&amp;gt;   pattern = moveTargets | sqBBofKing;&amp;lt;br/&amp;gt;   if ( pattern &amp;amp;amp; rankBits[sq] == pattern )&amp;lt;br/&amp;gt;      dirSet =  1; // vulnerable on rank, e.g. base rank&amp;lt;br/&amp;gt;   else if ( pattern &amp;amp;amp; fileBits[sq] == pattern )&amp;lt;br/&amp;gt;      dirSet =  2; // vulnerable on file&amp;lt;br/&amp;gt;   else if ( pattern &amp;amp;amp; diagBits[sq] == pattern )&amp;lt;br/&amp;gt;      dirSet =  4; // vulnerable on diagonal&amp;lt;br/&amp;gt;   else if ( pattern &amp;amp;amp; antiBits[sq] == pattern )&amp;lt;br/&amp;gt;      dirSet =  8; // vulnerable on antidiagonal&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; moveTargets &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   dirSet &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// vulnerable on all lines&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   dirSet &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pattern &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; moveTargets &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; sqBBofKing&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; pattern &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; rankBits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; pattern &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      dirSet &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// vulnerable on rank, e.g. base rank&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; pattern &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; fileBits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; pattern &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      dirSet &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// vulnerable on file&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; pattern &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; diagBits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; pattern &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      dirSet &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// vulnerable on diagonal&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; pattern &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; antiBits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; pattern &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      dirSet &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// vulnerable on antidiagonal&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:6 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:43:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id=&quot;toc6&quot;&gt;&lt;a name=&quot;King Safety-Vulnerable on distant Checks-Branchless&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:43 --&gt;Branchless&lt;/h3&gt;
Branchless in C - since boolean compare result is treated 0 or 1 arithmetically:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:7:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;pattern = moveTargets | sqBBofKing;&amp;lt;br/&amp;gt;dirSet  = ( pattern &amp;amp;amp; rankBits[sq] == pattern ) * 1;&amp;lt;br/&amp;gt;dirSet += ( pattern &amp;amp;amp; fileBits[sq] == pattern ) * 2;&amp;lt;br/&amp;gt;dirSet += ( pattern &amp;amp;amp; diagBits[sq] == pattern ) * 4;&amp;lt;br/&amp;gt;dirSet += ( pattern &amp;amp;amp; antiBits[sq] == pattern ) * 8;&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;pattern &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; moveTargets &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; sqBBofKing&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
dirSet  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; pattern &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; rankBits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; pattern &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
dirSet &lt;span class=&quot;sy2&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; pattern &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; fileBits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; pattern &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
dirSet &lt;span class=&quot;sy2&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; pattern &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; diagBits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; pattern &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
dirSet &lt;span class=&quot;sy2&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; pattern &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; antiBits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; pattern &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:7 --&gt;to possibly test later&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:8:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;if ( dirSet ) evaluate and look for possible distant mates&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;if ( dirSet ) evaluate and look for possible distant mates&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:8 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:82:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@SSE4&amp;quot; title=&amp;quot;Anchor: SSE4&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;SSE4&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:82 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:45:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id=&quot;toc7&quot;&gt;&lt;a name=&quot;King Safety-Vulnerable on distant Checks-SSE4&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:45 --&gt;SSE4&lt;/h3&gt;
Using the &lt;a class=&quot;wiki_link&quot; href=&quot;/SSE4#SSE4.1&quot;&gt;SSE4.1&lt;/a&gt; PCMPEQQ &lt;a class=&quot;wiki_link&quot; href=&quot;/Quad%20Word&quot;&gt;Quadword&lt;/a&gt; compare for equality instruction via &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://msdn.microsoft.com/en-us/library/bb513998.aspx&quot; rel=&quot;nofollow&quot;&gt;_mm_cmpeq_epi64&lt;/a&gt; intrinsic, following otherwise &lt;a class=&quot;wiki_link&quot; href=&quot;/SSE2&quot;&gt;SSE2&lt;/a&gt; approach might be applied:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:9:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;struct SKingBits {&amp;lt;br/&amp;gt;    U64 rankBits;&amp;lt;br/&amp;gt;    U64 fileBits;&amp;lt;br/&amp;gt;    U64 diagBits;&amp;lt;br/&amp;gt;    U64 antiBits;&amp;lt;br/&amp;gt;} XMM_ALIGN kingBits[64];&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;int dirSet(U64 pattern, int sq)&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;   static const U64 XMM_ALIGN weights[4] = {&amp;lt;br/&amp;gt;     C64(0x0000000000000001),&amp;lt;br/&amp;gt;     C64(0x0000000000000002),&amp;lt;br/&amp;gt;     C64(0x0000000000000004),&amp;lt;br/&amp;gt;     C64(0x0000000000000008)&amp;lt;br/&amp;gt;   };&amp;lt;br/&amp;gt;   __m128i x0, x1, x2;&amp;lt;br/&amp;gt;   const __m128i* pKB = (__m128i*)(kingBits + sq);&amp;lt;br/&amp;gt;   const __m128i* pW  = (__m128i*) weights;&amp;lt;br/&amp;gt;   x2 = _mm_cvtsi64x_si128 (pattern);&amp;lt;br/&amp;gt;   x2 = _mm_unpacklo_epi64 (x2, x2);&amp;lt;br/&amp;gt;   x0 = _mm_and_si128   (x2, pKB[0]);&amp;lt;br/&amp;gt;   x1 = _mm_and_si128   (x2, pKB[1]);&amp;lt;br/&amp;gt;   x0 = _mm_cmpeq_epi64 (x0, x2);&amp;lt;br/&amp;gt;   x1 = _mm_cmpeq_epi64 (x1, x2);&amp;lt;br/&amp;gt;   x0 = _mm_and_si128   (x0, pW[0]);&amp;lt;br/&amp;gt;   x1 = _mm_and_si128   (x1, pW[1]);&amp;lt;br/&amp;gt;   x0 = _mm_or_si128    (x0, x1);&amp;lt;br/&amp;gt;   x1 = _mm_unpackhi_epi64 (x0, x0);&amp;lt;br/&amp;gt;   x0 = _mm_or_si128    (x0, x1);&amp;lt;br/&amp;gt;   return _mm_cvtsi128_si32(x0);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;struct&lt;/span&gt; SKingBits &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    U64 rankBits&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
    U64 fileBits&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
    U64 diagBits&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
    U64 antiBits&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; XMM_ALIGN kingBits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; dirSet&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 pattern, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; sq&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 XMM_ALIGN weights&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
     C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x0000000000000001&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
     C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x0000000000000002&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
     C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x0000000000000004&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
     C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x0000000000000008&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
   &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   __m128i x0, x1, x2&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; __m128i&lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt; pKB &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;__m128i&lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;kingBits &lt;span class=&quot;sy2&quot;&gt;+&lt;/span&gt; sq&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; __m128i&lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt; pW  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;__m128i&lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; weights&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_cvtsi64x_si128 &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pattern&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_unpacklo_epi64 &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x2, x2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_and_si128   &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x2, pKB&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_and_si128   &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x2, pKB&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_cmpeq_epi64 &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x0, x2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_cmpeq_epi64 &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x1, x2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_and_si128   &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x0, pW&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_and_si128   &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x1, pW&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_or_si128    &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x0, x1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_unpackhi_epi64 &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x0, x0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   x0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; _mm_or_si128    &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x0, x1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; _mm_cvtsi128_si32&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:9 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:83:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@KingAndPawns&amp;quot; title=&amp;quot;Anchor: KingAndPawns&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;KingAndPawns&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:83 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:47:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc8&quot;&gt;&lt;a name=&quot;King and Pawns&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:47 --&gt;King and Pawns&lt;/h1&gt;
 Some &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Endgame&quot;&gt;pawn endgame&lt;/a&gt; issues. A set-wise &lt;a class=&quot;wiki_link&quot; href=&quot;/Rule%20of%20the%20Square&quot;&gt;rule of the square&lt;/a&gt; from king&#039;s point of view. Or does a king have a connected path along safe and empty squares to a certain square?&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:84:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@SetwiseRuleoftheSquare&amp;quot; title=&amp;quot;Anchor: SetwiseRuleoftheSquare&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;SetwiseRuleoftheSquare&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:84 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:49:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc9&quot;&gt;&lt;a name=&quot;King and Pawns-Set-wise Rule of the Square&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:49 --&gt;Set-wise Rule of the Square&lt;/h2&gt;
 Assuming a black-king on g5 - white to move. What is the set of squares, where a king can never catch a white &lt;a class=&quot;wiki_link&quot; href=&quot;/Passed%20Pawn&quot;&gt;passer&lt;/a&gt;? Or the inverse, where can passers might be caught, considering the &lt;a class=&quot;wiki_link&quot; href=&quot;/Rule%20of%20the%20Square&quot;&gt;rule of the square&lt;/a&gt;? In this inverse case, where passers may be close enough, there are other aspects to consider like two distant passers, or passer supported by own king - here it is only about &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20race&quot;&gt;races&lt;/a&gt; between passers and opponent king. It is about a set-wise view, where the distance to promotion is greater or equal than the distance of the king. We need to consider &lt;strong&gt;double pushes&lt;/strong&gt; from the initial rank though.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:10:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;black king on g5    white passers         double pawn push, need&amp;lt;br/&amp;gt;wtm                 possibly caught       to copy 3rd to 2nd rank&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . K .      . . . 1 1 1 K 1      . . . 1 1 1 K 1&amp;lt;br/&amp;gt;. . . . . . . .      . . 1 1 1 1 1 1      . . 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .      . 1 1 1 1 1 1 1      . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .      1 1 1 1 1 1 1 1      . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .      1 1 1 1 1 1 1 1      1 1 1 1 1 1 1 1&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;black king on g5    white passers         double pawn push, need
wtm                 possibly caught       to copy 3rd to 2nd rank
. . . . . . . .      . . . . . . . .      . . . . . . . .
. . . . . . . .      . . . . . . . .      . . . . . . . .
. . . . . . . .      . . . . . . . .      . . . . . . . .
. . . . . . K .      . . . 1 1 1 K 1      . . . 1 1 1 K 1
. . . . . . . .      . . 1 1 1 1 1 1      . . 1 1 1 1 1 1
. . . . . . . .      . 1 1 1 1 1 1 1      . 1 1 1 1 1 1 1
. . . . . . . .      1 1 1 1 1 1 1 1      . 1 1 1 1 1 1 1
. . . . . . . .      1 1 1 1 1 1 1 1      1 1 1 1 1 1 1 1&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:10 --&gt;&lt;em&gt;Of course we may even mask off the base ranks since pawns can not exist there - but since we intersect with passers anyway, it don&#039;t cares.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
We need to consider &lt;a class=&quot;wiki_link&quot; href=&quot;/Tempo&quot;&gt;tempo&lt;/a&gt;, if black to move, the area of caught grows accordantly:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:11:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;black king on g5    white passers&amp;lt;br/&amp;gt;btm                 possibly caught&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . K K K      . . . 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . K K K      . . 1 1 1 1 K 1&amp;lt;br/&amp;gt;. . . . . K K K      . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .      1 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .      1 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .      1 1 1 1 1 1 1 1&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;black king on g5    white passers
btm                 possibly caught
. . . . . . . .      . . . . . . . .
. . . . . . . .      . . . . . . . .
. . . . . K K K      . . . 1 1 1 1 1
. . . . . K K K      . . 1 1 1 1 K 1
. . . . . K K K      . 1 1 1 1 1 1 1
. . . . . . . .      1 1 1 1 1 1 1 1
. . . . . . . .      1 1 1 1 1 1 1 1
. . . . . . . .      1 1 1 1 1 1 1 1&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:11 --&gt;&lt;br /&gt;
We can now pre-initialize an &lt;a class=&quot;wiki_link&quot; href=&quot;/Array&quot;&gt;array&lt;/a&gt; of &lt;strong&gt;caught pawn area&lt;/strong&gt; for each king square, for both black and white king as well as &lt;a class=&quot;wiki_link&quot; href=&quot;/side%20to%20move&quot;&gt;side to move&lt;/a&gt;:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:12:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;U64 arrCaughtableArea[2][2][64];  // [color of king][side to move][square]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;unCaughtable = whitePassers &amp;amp;amp; ~arrCaughtableArea[black][white][squareOfBlackKing];&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;U64 arrCaughtableArea[2][2][64];  // [color of king][side to move][square]
&amp;nbsp;
unCaughtable = whitePassers &amp;amp; ~arrCaughtableArea[black][white][squareOfBlackKing];&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:12 --&gt;How can the array be initialized, how can we calculate it? That is already some special fill approach. For the mentioned black king, wtm case, we use the rank-distance of the black king to the 8th rank.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:13:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;distance = rank(kingSquare) ^ 7; // 7 - rank&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;. . . . 3 . . .&amp;lt;br/&amp;gt;. . . . 2 . . .&amp;lt;br/&amp;gt;. . . . 1 . . .&amp;lt;br/&amp;gt;. . . . K . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;distance = rank(kingSquare) ^ 7; // 7 - rank
&amp;nbsp;
. . . . 3 . . .
. . . . 2 . . .
. . . . 1 . . .
. . . . K . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:13 --&gt;One solution is first expand the king-set distance (3) times, in east and west direction along the rank:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:14:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;caughtable = kingBB;&amp;lt;br/&amp;gt;for (i = 0; i &amp;amp;lt; distance; i++)&amp;lt;br/&amp;gt;   caughtable |= westOne(caughtable) | eastOne(caughtable);&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . 1 1 1     . . . . 1 1 1 1      . . . 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;caughtable = kingBB;
for (i = 0; i &amp;lt; distance; i++)
   caughtable |= westOne(caughtable) | eastOne(caughtable);
&amp;nbsp;
. . . . . . . .     . . . . . . . .      . . . . . . . .
. . . . . . . .     . . . . . . . .      . . . . . . . .
. . . . . . . .     . . . . . . . .      . . . . . . . .
. . . . . 1 1 1     . . . . 1 1 1 1      . . . 1 1 1 1 1
. . . . . . . .     . . . . . . . .      . . . . . . . .
. . . . . . . .     . . . . . . . .      . . . . . . . .
. . . . . . . .     . . . . . . . .      . . . . . . . .
. . . . . . . .     . . . . . . . .      . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:14 --&gt;Now it is about filling south-west and south-east rank(kingSquare) times, which finally results in the desired set of  catchable passers. Special handling is required for the doubles pushes &lt;!-- ws:start:WikiTextRefRule:20:&amp;amp;lt;ref&amp;amp;gt;Thanks to Thomas Herges for pointing out a bug if kings are on the eighth rank&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-2&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:20 --&gt;:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:15:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;for (i = 0; i &amp;amp;lt; rank(kingSquare)-2; i++)&amp;lt;br/&amp;gt;   caughtable |= soutOne(westOne(caughtable) | caughtable | eastOne(caughtable) );&amp;lt;br/&amp;gt;caughtable |= soutOne(caughtable) | 0xff;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . . . . . . . .&amp;lt;br/&amp;gt;. . . 1 1 1 1 1     . . . 1 1 1 1 1      . . . 1 1 1 1 1&amp;lt;br/&amp;gt;. . 1 1 1 1 1 1     . . 1 1 1 1 1 1      . . 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .     . 1 1 1 1 1 1 1   |  . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .   |  . 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .   v  1 1 1 1 1 1 1 1&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;for (i = 0; i &amp;lt; rank(kingSquare)-2; i++)
   caughtable |= soutOne(westOne(caughtable) | caughtable | eastOne(caughtable) );
caughtable |= soutOne(caughtable) | 0xff;
&amp;nbsp;
. . . . . . . .     . . . . . . . .      . . . . . . . .
. . . . . . . .     . . . . . . . .      . . . . . . . .
. . . . . . . .     . . . . . . . .      . . . . . . . .
. . . 1 1 1 1 1     . . . 1 1 1 1 1      . . . 1 1 1 1 1
. . 1 1 1 1 1 1     . . 1 1 1 1 1 1      . . 1 1 1 1 1 1
. . . . . . . .     . 1 1 1 1 1 1 1   |  . 1 1 1 1 1 1 1
. . . . . . . .     . . . . . . . .   |  . 1 1 1 1 1 1 1
. . . . . . . .     . . . . . . . .   v  1 1 1 1 1 1 1 1&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:15 --&gt;&lt;br /&gt;
To initialize black to move and white king arrays should not that difficult either - and is left to the ambitious reader.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:85:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@FloodFillAlgorithms&amp;quot; title=&amp;quot;Anchor: FloodFillAlgorithms&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;FloodFillAlgorithms&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:85 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:51:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc10&quot;&gt;&lt;a name=&quot;King and Pawns-Flood Fill Algorithms&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:51 --&gt;Flood Fill Algorithms&lt;/h2&gt;
 Answering questions like can a king on a1 reach h8 along this path?&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:16:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;. . . . . . 1 T&amp;lt;br/&amp;gt;. . 1 1 1 1 . .&amp;lt;br/&amp;gt;. 1 . . . . . .&amp;lt;br/&amp;gt;. . 1 1 1 1 . .&amp;lt;br/&amp;gt;. . . . . . 1 .&amp;lt;br/&amp;gt;. . . . . . . 1&amp;lt;br/&amp;gt;. . . . . . 1 .&amp;lt;br/&amp;gt;F 1 1 1 1 1 . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;. . . . . . 1 T
. . 1 1 1 1 . .
. 1 . . . . . .
. . 1 1 1 1 . .
. . . . . . 1 .
. . . . . . . 1
. . . . . . 1 .
F 1 1 1 1 1 . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:16 --&gt;The &lt;strong&gt;squaresAreConnected&lt;/strong&gt; flood-fill &lt;!-- ws:start:WikiTextRefRule:22:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Flood_fill&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Flood Fill from Wikipedia&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-3&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-3&quot;&gt;[3]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:22 --&gt; algorithm was introduced by &lt;a class=&quot;wiki_link&quot; href=&quot;/Steffan%20Westcott&quot;&gt;Steffan Westcott&lt;/a&gt; &lt;!-- ws:start:WikiTextRefRule:26:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.stmintz.com/ccc/index.php?id=251180.&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Re: algorithm question&amp;lt;/a&amp;gt; answer by &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/Steffan%20Westcott&amp;quot;&amp;gt;Steffan Westcott&amp;lt;/a&amp;gt; in &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/CCC&amp;quot;&amp;gt;CCC&amp;lt;/a&amp;gt; September 09, 2002&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-4&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-4&quot;&gt;[4]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:26 --&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;tt&gt;A flood fill algorithm, like the one below, starting at the &amp;quot;from&amp;quot; square and stopping if the fill hits the to&amp;quot; square or the fill can&#039;t make any more progress. The fill progresses in all directions at once, so should return an answer within a few iterations. Each iteration is pretty fast too, as it just a bunch of shifting and logic operations. And no lookup tables either.&lt;/tt&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:17:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;/////////////////////////////////////////////////////////////////////////&amp;lt;br/&amp;gt;//&amp;lt;br/&amp;gt;// Returns true if a path of set bits in &#039;path&#039; exists that 8-way connect&amp;lt;br/&amp;gt;// any set bit in sq1 to any set bit of sq2&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;bool squaresAreConnected(U64 sq1, U64 sq2, U64 path)&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;   // With bitboard sq1, do an 8-way flood fill, masking off bits not in&amp;lt;br/&amp;gt;   // path at every step. Stop when fill reaches any set bit in sq2, or&amp;lt;br/&amp;gt;   // fill cannot progress any further&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;   if (!(sq1 &amp;amp;amp;= path) || !(sq2 &amp;amp;amp;= path)) return false;&amp;lt;br/&amp;gt;                      // Drop bits not in path&amp;lt;br/&amp;gt;                      // Early exit if sq1 or sq2 not on any path&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;   while(!(sq1 &amp;amp;amp; sq2))&amp;lt;br/&amp;gt;   {&amp;lt;br/&amp;gt;      U64 temp = sq1;&amp;lt;br/&amp;gt;      sq1 |= eastOne(sq1) | westOne(sq1);    // Set all 8 neighbours&amp;lt;br/&amp;gt;      sq1 |= soutOne(sq1) | nortOne(sq1);&amp;lt;br/&amp;gt;      sq1 &amp;amp;amp;= path;                           // Drop bits not in path&amp;lt;br/&amp;gt;      if (sq1 == temp) return false;         // Fill has stopped&amp;lt;br/&amp;gt;   }&amp;lt;br/&amp;gt;   return true;                              // Found a good path&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;span class=&quot;co1&quot;&gt;/////////////////////////////////////////////////////////////////////////&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;//&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// Returns true if a path of set bits in &#039;path&#039; exists that 8-way connect&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// any set bit in sq1 to any set bit of sq2&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; squaresAreConnected&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 sq1, U64 sq2, U64 path&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;co1&quot;&gt;// With bitboard sq1, do an 8-way flood fill, masking off bits not in&lt;/span&gt;
   &lt;span class=&quot;co1&quot;&gt;// path at every step. Stop when fill reaches any set bit in sq2, or&lt;/span&gt;
   &lt;span class=&quot;co1&quot;&gt;// fill cannot progress any further&lt;/span&gt;
&amp;nbsp;
   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy3&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sq1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; path&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sq2 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; path&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
                      &lt;span class=&quot;co1&quot;&gt;// Drop bits not in path&lt;/span&gt;
                      &lt;span class=&quot;co1&quot;&gt;// Early exit if sq1 or sq2 not on any path&lt;/span&gt;
&amp;nbsp;
   &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy3&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sq1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; sq2&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
   &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
      U64 temp &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; sq1&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
      sq1 &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; eastOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sq1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; westOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sq1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;    &lt;span class=&quot;co1&quot;&gt;// Set all 8 neighbours&lt;/span&gt;
      sq1 &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; soutOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sq1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; nortOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sq1&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
      sq1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; path&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;                           &lt;span class=&quot;co1&quot;&gt;// Drop bits not in path&lt;/span&gt;
      &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sq1 &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; temp&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;         &lt;span class=&quot;co1&quot;&gt;// Fill has stopped&lt;/span&gt;
   &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;                              &lt;span class=&quot;co1&quot;&gt;// Found a good path&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:17 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:53:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc11&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:53 --&gt;See also&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/All%20Shortest%20Paths&quot;&gt;All shortest Paths&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20Algorithms&quot;&gt;Fill Algorithms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Mate%20at%20a%20Glance&quot;&gt;Mate at a Glance&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:55:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc12&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:55 --&gt;External Links&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Checkmate_pattern&quot; rel=&quot;nofollow&quot;&gt;Checkmate pattern from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://store.bowerykitchens.com/noname42.html&quot; rel=&quot;nofollow&quot;&gt;King&#039;s Pattern Flatware - Spoons/Teaspoon&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#AmonDuul&quot;&gt;Amon Düül II&lt;/a&gt; - Archangel Thunderbird (1971), &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/YouTube&quot; rel=&quot;nofollow&quot;&gt;YouTube&lt;/a&gt; Video &lt;!-- ws:start:WikiTextRefRule:28:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Male_and_Female&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Male and Female -  1919 American silent adventure/drama film - Wikipedia&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-5&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-5&quot;&gt;[5]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:28 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMediaRule:29:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/custom/24429004?h=0&amp;amp;w=0&amp;quot; class=&amp;quot;WikiMedia WikiMediaCustom&amp;quot; id=&amp;quot;wikitext@@media@@type=&amp;amp;quot;custom&amp;amp;quot; key=&amp;amp;quot;24429004&amp;amp;quot;&amp;quot; title=&amp;quot;Custom Media&amp;quot;/&amp;gt; --&gt;&lt;iframe width=&quot;480&quot; height=&quot;360&quot; src=&quot;//www.youtube.com/embed/_pcla5zyZfA?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;!-- ws:end:WikiTextMediaRule:29 --&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:57:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc13&quot;&gt;&lt;a name=&quot;References&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:57 --&gt;References&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextReferencesRule:234:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Moore_neighborhood&quot; rel=&quot;nofollow&quot;&gt;Moore neighborhood from Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-2&quot;&gt;&lt;a href=&quot;#cite_ref-2&quot;&gt;^&lt;/a&gt; Thanks to Thomas Herges for pointing out a bug if kings are on the eighth rank&lt;/li&gt;
&lt;li id=&quot;cite_note-3&quot;&gt;&lt;a href=&quot;#cite_ref-3&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Flood_fill&quot; rel=&quot;nofollow&quot;&gt;Flood Fill from Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-4&quot;&gt;&lt;a href=&quot;#cite_ref-4&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=251180.&quot; rel=&quot;nofollow&quot;&gt;Re: algorithm question&lt;/a&gt; answer by &lt;a class=&quot;wiki_link&quot; href=&quot;/Steffan%20Westcott&quot;&gt;Steffan Westcott&lt;/a&gt; in &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt; September 09, 2002&lt;/li&gt;
&lt;li id=&quot;cite_note-5&quot;&gt;&lt;a href=&quot;#cite_ref-5&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Male_and_Female&quot; rel=&quot;nofollow&quot;&gt;Male and Female -  1919 American silent adventure/drama film - Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:234 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:59:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc14&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:59 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:018:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;King Pattern&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;40&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;King Pattern&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;40&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-King_Pattern includeBody-King%20Pattern includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 5, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/All+Shortest+Paths&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;All Shortest Paths&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 21, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Bitboards&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Bitboards&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Blockage+Detection&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Blockage Detection&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 19, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Blockers+and+Beyond&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Blockers and Beyond&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 21, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Chunking&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Chunking&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 12, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Daniel+Shawul&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Daniel Shawul&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 28, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Demolito&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Demolito&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 1, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/DirGolem&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;DirGolem&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Evaluation+Patterns&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Evaluation Patterns&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 24, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 6, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Helmut+Horacek&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Helmut Horacek&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 31, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hex&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hex&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Dec 29, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Iteration&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Iteration&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 5, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/King&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;King&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 26, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/King+Pattern&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;King Pattern&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 15, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/King+Safety&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;King Safety&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 14, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/KPK&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;KPK&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 12, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Mate+at+a+Glance&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Mate at a Glance&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 24, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Morph&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Morph&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Dec 7, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Nirvanachess&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Nirvanachess&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 30, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Passed+Pawn&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Passed Pawn&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Passed+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Passed Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 23, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pattern+Recognition&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pattern Recognition&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 8, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Endgame&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Endgame&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Race&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Race&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Dec 16, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/PawnKing&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;PawnKing&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 5, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pieces+versus+Directions&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pieces versus Directions&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 6, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Rule+of+the+Square&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Rule of the Square&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 6, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Searcher&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Searcher&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 26, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Sliding+Pieces&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Sliding Pieces&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 3, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Square+Attacked+By&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Square Attacked By&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 20, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Squares&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Squares&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 15, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/SSE4&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;SSE4&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Steffan+Westcott&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Steffan Westcott&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 21, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Unstoppable+Passer&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Unstoppable Passer&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 21, 2016&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:018 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Knight Pattern</title>
      <link>https://chessprogramming.wikispaces.com/Knight+Pattern</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Knight+Pattern</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Knight+Pattern</comments>
      <pubDate>Mon, 23 Feb 2015 19:45:51 GMT</pubDate>
      <description>&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * Knight Pattern&lt;/strong&gt;&lt;br /&gt;


&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;!-- ws:start:WikiTextLocalImageRule:118:&amp;lt;a href=&amp;quot;http://www.mcescher.com/Shopmain/ShopEU/facsilimeprints/prints.html&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;/file/view/Horseman.jpg/157877355/232x238/Horseman.jpg&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;height: 238px; width: 232px;&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt; --&gt;&lt;a href=&quot;http://www.mcescher.com/Shopmain/ShopEU/facsilimeprints/prints.html&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;/file/view/Horseman.jpg/157877355/232x238/Horseman.jpg&quot; alt=&quot;Horseman.jpg&quot; title=&quot;Horseman.jpg&quot; style=&quot;height: 238px; width: 232px;&quot; /&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextLocalImageRule:118 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
        &lt;td rowspan=&quot;2&quot;&gt;&lt;strong&gt;Knight Pattern&lt;/strong&gt;&lt;br /&gt;
with Bitboards covers &lt;a class=&quot;wiki_link&quot; href=&quot;/Knight&quot;&gt;knight&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Attacks&quot;&gt;attacks&lt;/a&gt; of single or multiple knights, either by indexed pre-calculated tables or direct bitboard calculation, and the set wise determination of &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Fork_%28chess%29&quot; rel=&quot;nofollow&quot;&gt;Knight fork&lt;/a&gt; target squares.&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Arts#Escher&quot;&gt;M. C. Escher&lt;/a&gt;, Horseman &lt;!-- ws:start:WikiTextRefRule:11:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.mcescher.com/Shopmain/ShopEU/facsilimeprints/prints.html&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;View facsimile print&amp;lt;/a&amp;gt; from &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.mcescher.com/Shopmain/ShopEU/facsilimeprints/&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;M.C. Escher - 16 Facsimile Prints&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:11 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:start:WikiTextTocRule:38:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:38 --&gt;&lt;!-- ws:start:WikiTextTocRule:39: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Knight Attacks&quot;&gt;Knight Attacks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:39 --&gt;&lt;!-- ws:start:WikiTextTocRule:40: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Knight Attacks-by Lookup&quot;&gt;by Lookup&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:40 --&gt;&lt;!-- ws:start:WikiTextTocRule:41: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Knight Attacks-by Calculation&quot;&gt;by Calculation&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:41 --&gt;&lt;!-- ws:start:WikiTextTocRule:42: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Multiple Knight Attacks&quot;&gt;Multiple Knight Attacks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:42 --&gt;&lt;!-- ws:start:WikiTextTocRule:43: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Knight Fill&quot;&gt;Knight Fill&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:43 --&gt;&lt;!-- ws:start:WikiTextTocRule:44: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Knight Forks&quot;&gt;Knight Forks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:44 --&gt;&lt;!-- ws:start:WikiTextTocRule:45: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:45 --&gt;&lt;!-- ws:start:WikiTextTocRule:46: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Selected Publications&quot;&gt;Selected Publications&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:46 --&gt;&lt;!-- ws:start:WikiTextTocRule:47: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Forum Posts&quot;&gt;Forum Posts&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:47 --&gt;&lt;!-- ws:start:WikiTextTocRule:48: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:48 --&gt;&lt;!-- ws:start:WikiTextTocRule:49: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#References&quot;&gt;References&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:49 --&gt;&lt;!-- ws:start:WikiTextTocRule:50: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:50 --&gt;&lt;!-- ws:start:WikiTextTocRule:51: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:51 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:52:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@KnightAttacks&amp;quot; title=&amp;quot;Anchor: KnightAttacks&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;KnightAttacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:52 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:14:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Knight Attacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:14 --&gt;Knight Attacks&lt;/h1&gt;
 The &lt;a class=&quot;wiki_link&quot; href=&quot;/Knight&quot;&gt;Knight&lt;/a&gt; attacks the &lt;a class=&quot;wiki_link&quot; href=&quot;/Target%20square&quot;&gt;target squares&lt;/a&gt; independently from other pieces around. The compass rose of all eight attacking &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;directions&lt;/a&gt; associated with the to - from square differences from an &lt;a class=&quot;wiki_link&quot; href=&quot;/8x8%20Board&quot;&gt;8x8 board&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;        noNoWe    noNoEa&amp;lt;br/&amp;gt;            +15  +17&amp;lt;br/&amp;gt;             |     |&amp;lt;br/&amp;gt;noWeWe  +6 __|     |__+10  noEaEa&amp;lt;br/&amp;gt;              \   /&amp;lt;br/&amp;gt;               &amp;amp;gt;0&amp;amp;lt;&amp;lt;br/&amp;gt;           __ /   \ __&amp;lt;br/&amp;gt;soWeWe -10   |     |   -6  soEaEa&amp;lt;br/&amp;gt;             |     |&amp;lt;br/&amp;gt;            -17  -15&amp;lt;br/&amp;gt;        soSoWe    soSoEa&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;        noNoWe    noNoEa
            +15  +17
             |     |
noWeWe  +6 __|     |__+10  noEaEa
              \   /
               &amp;gt;0&amp;lt;
           __ /   \ __
soWeWe -10   |     |   -6  soEaEa
             |     |
            -17  -15
        soSoWe    soSoEa&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:53:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@ByLookup&amp;quot; title=&amp;quot;Anchor: ByLookup&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;ByLookup&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:53 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:16:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Knight Attacks-by Lookup&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:16 --&gt;by Lookup&lt;/h2&gt;
 The knight is specified by square index, likely from a &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitscan&quot;&gt;bitscan&lt;/a&gt; of a piece-wise &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Serialization&quot;&gt;bitboard serialization&lt;/a&gt; of a knight bitboard from a &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Board-Definition&quot;&gt;standard board-definition&lt;/a&gt;, to index a table of pre-calculated knight-attacks:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 arrKnightAttacks[64];&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 knightAttacks(enumSquare sq) {return arrKnightAttacks[sq];}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 arrKnightAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
U64 knightAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;enumSquare sq&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; arrKnightAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sq&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;For instance a knight on d4&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;arrKnightAttacks[d4]&amp;lt;br/&amp;gt; . . . . . . . .&amp;lt;br/&amp;gt; . . . . . . . .&amp;lt;br/&amp;gt; . . 1 . 1 . . .&amp;lt;br/&amp;gt; . 1 . . . 1 . .&amp;lt;br/&amp;gt; . . . . . . . .&amp;lt;br/&amp;gt; . 1 . . . 1 . .&amp;lt;br/&amp;gt; . . 1 . 1 . . .&amp;lt;br/&amp;gt; . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;arrKnightAttacks[d4]
 . . . . . . . .
 . . . . . . . .
 . . 1 . 1 . . .
 . 1 . . . 1 . .
 . . . . . . . .
 . 1 . . . 1 . .
 . . 1 . 1 . . .
 . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:54:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@Calculation&amp;quot; title=&amp;quot;Anchor: Calculation&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;Calculation&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:54 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:18:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Knight Attacks-by Calculation&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:18 --&gt;by Calculation&lt;/h2&gt;
 Similar to &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;one step only&lt;/a&gt; of the four orthogonal and four diagonal directions,each of the eight knight directions is calculated by left or right shift with appropriate pre- or post shift mask, to avoid A- H-file wraps or vice versa. See also &lt;a class=&quot;wiki_link&quot; href=&quot;/AVX2#KnightAttacks&quot;&gt;AVX2 Knight Attacks&lt;/a&gt;.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 noNoEa(U64 b) {return (b &amp;amp;lt;&amp;amp;lt; 17) &amp;amp;amp; notAFile ;}&amp;lt;br/&amp;gt;U64 noEaEa(U64 b) {return (b &amp;amp;lt;&amp;amp;lt; 10) &amp;amp;amp; notABFile;}&amp;lt;br/&amp;gt;U64 soEaEa(U64 b) {return (b &amp;amp;gt;&amp;amp;gt;  6) &amp;amp;amp; notABFile;}&amp;lt;br/&amp;gt;U64 soSoEa(U64 b) {return (b &amp;amp;gt;&amp;amp;gt; 15) &amp;amp;amp; notAFile ;}&amp;lt;br/&amp;gt;U64 noNoWe(U64 b) {return (b &amp;amp;lt;&amp;amp;lt; 15) &amp;amp;amp; notHFile ;}&amp;lt;br/&amp;gt;U64 noWeWe(U64 b) {return (b &amp;amp;lt;&amp;amp;lt;  6) &amp;amp;amp; notGHFile;}&amp;lt;br/&amp;gt;U64 soWeWe(U64 b) {return (b &amp;amp;gt;&amp;amp;gt; 10) &amp;amp;amp; notGHFile;}&amp;lt;br/&amp;gt;U64 soSoWe(U64 b) {return (b &amp;amp;gt;&amp;amp;gt; 17) &amp;amp;amp; notHFile ;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 noNoEa(U64 b) {return (b &amp;amp;amp; notHFile ) &amp;amp;lt;&amp;amp;lt; 17;}&amp;lt;br/&amp;gt;U64 noEaEa(U64 b) {return (b &amp;amp;amp; notGHFile) &amp;amp;lt;&amp;amp;lt; 10;}&amp;lt;br/&amp;gt;U64 soEaEa(U64 b) {return (b &amp;amp;amp; notGHFile) &amp;amp;gt;&amp;amp;gt;  6;}&amp;lt;br/&amp;gt;U64 soSoEa(U64 b) {return (b &amp;amp;amp; notHFile ) &amp;amp;gt;&amp;amp;gt; 15;}&amp;lt;br/&amp;gt;U64 noNoWe(U64 b) {return (b &amp;amp;amp; notAFile ) &amp;amp;lt;&amp;amp;lt; 15;}&amp;lt;br/&amp;gt;U64 noWeWe(U64 b) {return (b &amp;amp;amp; notABFile) &amp;amp;lt;&amp;amp;lt;  6;}&amp;lt;br/&amp;gt;U64 soWeWe(U64 b) {return (b &amp;amp;amp; notABFile) &amp;amp;gt;&amp;amp;gt; 10;}&amp;lt;br/&amp;gt;U64 soSoWe(U64 b) {return (b &amp;amp;amp; notAFile ) &amp;amp;gt;&amp;amp;gt; 17;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 noNoEa&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notAFile &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 noEaEa&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notABFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soEaEa&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notABFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soSoEa&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notAFile &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 noNoWe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notHFile &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 noWeWe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notGHFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soWeWe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notGHFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soSoWe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notHFile &lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 noNoEa&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notHFile &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 noEaEa&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notGHFile&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soEaEa&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notGHFile&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soSoEa&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notHFile &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 noNoWe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notAFile &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 noWeWe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notABFile&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soWeWe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notABFile&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soSoWe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; notAFile &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;In almost the same manner as the three pawn directions, there is a unique source-target relationship. The difference is - we have up to eight pawns, but likely not more than two knights per side. Keeping eight disjoint knight directions is consistent to direction-wise &lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20Algorithms&quot;&gt;fill approaches&lt;/a&gt; of other pieces with unique &lt;a class=&quot;wiki_link&quot; href=&quot;/Target%20Square&quot;&gt;target&lt;/a&gt;-&lt;a class=&quot;wiki_link&quot; href=&quot;/Origin%20Square&quot;&gt;source&lt;/a&gt; relationship - but disjoint direction-wise knight targets are sparse populated and usually contain only up to two bits.&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:55:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@MultipleKnightAttacks&amp;quot; title=&amp;quot;Anchor: MultipleKnightAttacks&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;MultipleKnightAttacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:55 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:20:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;Multiple Knight Attacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:20 --&gt;Multiple Knight Attacks&lt;/h1&gt;
 To initialize the KnightAttacks &lt;a class=&quot;wiki_link&quot; href=&quot;/Array&quot;&gt;array&lt;/a&gt; one may use a routine with some kind of &lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms&quot;&gt;parallel prefix&lt;/a&gt; calculations, rather than the union of all eight directions:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 knightAttacks(U64 knights) {&amp;lt;br/&amp;gt;   U64 west, east, attacks;&amp;lt;br/&amp;gt;   east     = eastOne (knights);&amp;lt;br/&amp;gt;   west     = westOne (knights);&amp;lt;br/&amp;gt;   attacks  = (east|west) &amp;amp;lt;&amp;amp;lt; 16;&amp;lt;br/&amp;gt;   attacks |= (east|west) &amp;amp;gt;&amp;amp;gt; 16;&amp;lt;br/&amp;gt;   east     = eastOne (east);&amp;lt;br/&amp;gt;   west     = westOne (west);&amp;lt;br/&amp;gt;   attacks |= (east|west) &amp;amp;lt;&amp;amp;lt;  8;&amp;lt;br/&amp;gt;   attacks |= (east|west) &amp;amp;gt;&amp;amp;gt;  8;&amp;lt;br/&amp;gt;   return attacks;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 knightAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 knights&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 west, east, attacks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   east     &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; eastOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;knights&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   west     &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; westOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;knights&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attacks  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;east&lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;west&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attacks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;east&lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;west&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   east     &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; eastOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;east&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   west     &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; westOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;west&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attacks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;east&lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;west&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attacks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;east&lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;west&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; attacks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;or to possibly gain some more parallelism:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:5:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 knightAttacks(U64 knights) {&amp;lt;br/&amp;gt;   U64 l1 = (knights &amp;amp;gt;&amp;amp;gt; 1) &amp;amp;amp; C64(0x7f7f7f7f7f7f7f7f);&amp;lt;br/&amp;gt;   U64 l2 = (knights &amp;amp;gt;&amp;amp;gt; 2) &amp;amp;amp; C64(0x3f3f3f3f3f3f3f3f);&amp;lt;br/&amp;gt;   U64 r1 = (knights &amp;amp;lt;&amp;amp;lt; 1) &amp;amp;amp; C64(0xfefefefefefefefe);&amp;lt;br/&amp;gt;   U64 r2 = (knights &amp;amp;lt;&amp;amp;lt; 2) &amp;amp;amp; C64(0xfcfcfcfcfcfcfcfc);&amp;lt;br/&amp;gt;   U64 h1 = l1 | r1;&amp;lt;br/&amp;gt;   U64 h2 = l2 | r2;&amp;lt;br/&amp;gt;   return (h1&amp;amp;lt;&amp;amp;lt;16) | (h1&amp;amp;gt;&amp;amp;gt;16) | (h2&amp;amp;lt;&amp;amp;lt;8) | (h2&amp;amp;gt;&amp;amp;gt;8);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 knightAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 knights&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 l1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;knights &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x7f7f7f7f7f7f7f7f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 l2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;knights &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x3f3f3f3f3f3f3f3f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 r1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;knights &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0xfefefefefefefefe&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 r2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;knights &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0xfcfcfcfcfcfcfcfc&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 h1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; l1 &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; r1&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 h2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; l2 &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; r2&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;h1&lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;h1&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;h2&lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;h2&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:5 --&gt;If we pass multiple knights set-wise, attacks of some squares may be caused by different knights. Feeding back (safe) target sets, the routine may used to get sets of squares, knights may reach in two or more moves. For instance in late pawn-knight endings whether a knight may catch a passer.&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:56:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@KnightFill&amp;quot; title=&amp;quot;Anchor: KnightFill&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;KnightFill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:56 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:22:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc4&quot;&gt;&lt;a name=&quot;Knight Fill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:22 --&gt;Knight Fill&lt;/h1&gt;
 A fill cycle for a &lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20Algorithms&quot;&gt;fill algorithm&lt;/a&gt; is the &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#Union&quot;&gt;union&lt;/a&gt; of the attack set with the knights itself:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:6:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 knightFill(U64 knights) {return knightAttacks(knights) | knights;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 knightFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 knights&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; knightAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;knights&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; knights&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:6 --&gt;for instance applied six times on the otherwise empty board:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:7:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;                  1. Fill            2. Fill            3. Fill&amp;lt;br/&amp;gt;. . . . . . . .   . . . . . . . .   . . . . . . . .   . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .   . . . . . . . .   . . . . . . . .   . 1 . 1 . . . .&amp;lt;br/&amp;gt;. . . . . . . .   . . . . . . . .   . . . . . . . .   1 . 1 . 1 . . .&amp;lt;br/&amp;gt;. . . . . . . .   . . . . . . . .   1 . 1 . . . . .   1 1 1 1 . 1 . .&amp;lt;br/&amp;gt;. . . . . . . .   . . . . . . . .   . 1 . 1 . . . .   1 1 1 1 1 . 1 .&amp;lt;br/&amp;gt;. . . . . . . .   . 1 . . . . . .   1 1 . . 1 . . .   1 1 . 1 1 1 . .&amp;lt;br/&amp;gt;. . . . . . . .   . . 1 . . . . .   . . 1 1 . . . .   1 . 1 1 1 . 1 .&amp;lt;br/&amp;gt;1 . . . . . . .   1 . . . . . . .   1 . 1 . 1 . . .   1 1 1 1 1 1 . .&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                  4. Fill            5. Fill            6. Fill&amp;lt;br/&amp;gt;                  . 1 . 1 . 1 . .   1 1 1 1 1 1 1 .   1 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;                  1 1 1 1 1 . 1 .   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;                  1 1 1 1 1 1 . 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;                  1 1 1 1 1 1 1 .   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;                  1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;                  1 1 1 1 1 1 1 .   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;                  1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1&amp;lt;br/&amp;gt;                  1 1 1 1 1 1 1 .   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;                  1. Fill            2. Fill            3. Fill
. . . . . . . .   . . . . . . . .   . . . . . . . .   . . . . . . . .
. . . . . . . .   . . . . . . . .   . . . . . . . .   . 1 . 1 . . . .
. . . . . . . .   . . . . . . . .   . . . . . . . .   1 . 1 . 1 . . .
. . . . . . . .   . . . . . . . .   1 . 1 . . . . .   1 1 1 1 . 1 . .
. . . . . . . .   . . . . . . . .   . 1 . 1 . . . .   1 1 1 1 1 . 1 .
. . . . . . . .   . 1 . . . . . .   1 1 . . 1 . . .   1 1 . 1 1 1 . .
. . . . . . . .   . . 1 . . . . .   . . 1 1 . . . .   1 . 1 1 1 . 1 .
1 . . . . . . .   1 . . . . . . .   1 . 1 . 1 . . .   1 1 1 1 1 1 . .
&amp;nbsp;
                  4. Fill            5. Fill            6. Fill
                  . 1 . 1 . 1 . .   1 1 1 1 1 1 1 .   1 1 1 1 1 1 1 1
                  1 1 1 1 1 . 1 .   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1
                  1 1 1 1 1 1 . 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1
                  1 1 1 1 1 1 1 .   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1
                  1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1
                  1 1 1 1 1 1 1 .   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1
                  1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1
                  1 1 1 1 1 1 1 .   1 1 1 1 1 1 1 1   1 1 1 1 1 1 1 1&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:7 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:57:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@KnightForks&amp;quot; title=&amp;quot;Anchor: KnightForks&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;KnightForks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:57 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:24:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc5&quot;&gt;&lt;a name=&quot;Knight Forks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:24 --&gt;Knight Forks&lt;/h1&gt;
 A common knight pattern is the knight fork. Targets are heavy pieces - king, queen and rooks, &lt;a class=&quot;wiki_link&quot; href=&quot;/Hanging%20Piece&quot;&gt;hanging pieces&lt;/a&gt;, or even undefended pawns. A royal knight fork or &amp;quot;family&amp;quot; check, winning the queen is most important. Otherwise one may loop over all possible pieces, to get the knight-attacks by lookup and to intersect all combinations of attack-squares. A loop- and branch-less solution to get potential fork-attack squares is to union all intersections of all direction attacks, as explained in &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#GreaterOne&quot;&gt;greater one sets&lt;/a&gt;:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:8:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 forkTargetSquare(U64 targets) {&amp;lt;br/&amp;gt;   U64 west, east, attak, forks;&amp;lt;br/&amp;gt;   east   = eastOne (targets);&amp;lt;br/&amp;gt;   west   = westOne (targets);&amp;lt;br/&amp;gt;   attak  =  east &amp;amp;lt;&amp;amp;lt; 16;&amp;lt;br/&amp;gt;   forks  = (west &amp;amp;lt;&amp;amp;lt; 16) &amp;amp;amp; attak;&amp;lt;br/&amp;gt;   attak |=  west &amp;amp;lt;&amp;amp;lt; 16;&amp;lt;br/&amp;gt;   forks |= (east &amp;amp;gt;&amp;amp;gt; 16) &amp;amp;amp; attak;&amp;lt;br/&amp;gt;   attak |=  east &amp;amp;gt;&amp;amp;gt; 16;&amp;lt;br/&amp;gt;   forks |= (west &amp;amp;gt;&amp;amp;gt; 16) &amp;amp;amp; attak;&amp;lt;br/&amp;gt;   attak |=  west &amp;amp;gt;&amp;amp;gt; 16;&amp;lt;br/&amp;gt;   east   = eastOne (east);&amp;lt;br/&amp;gt;   west   = westOne (west);&amp;lt;br/&amp;gt;   forks |= (east &amp;amp;lt;&amp;amp;lt;  8) &amp;amp;amp; attak;&amp;lt;br/&amp;gt;   attak |=  east &amp;amp;lt;&amp;amp;lt;  8;&amp;lt;br/&amp;gt;   forks |= (west &amp;amp;lt;&amp;amp;lt;  8) &amp;amp;amp; attak;&amp;lt;br/&amp;gt;   attak |=  west &amp;amp;lt;&amp;amp;lt;  8;&amp;lt;br/&amp;gt;   forks |= (east &amp;amp;gt;&amp;amp;gt;  8) &amp;amp;amp; attak;&amp;lt;br/&amp;gt;   attak |=  east &amp;amp;gt;&amp;amp;gt;  8;&amp;lt;br/&amp;gt;   forks |= (west &amp;amp;gt;&amp;amp;gt;  8) &amp;amp;amp; attak;&amp;lt;br/&amp;gt;   return forks;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 forkTargetSquare&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 targets&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 west, east, attak, forks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   east   &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; eastOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;targets&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   west   &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; westOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;targets&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attak  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  east &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   forks  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;west &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; attak&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attak &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  west &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   forks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;east &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; attak&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attak &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  east &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   forks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;west &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; attak&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attak &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  west &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   east   &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; eastOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;east&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   west   &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; westOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;west&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   forks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;east &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; attak&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attak &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  east &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   forks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;west &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; attak&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attak &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  west &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   forks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;east &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; attak&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   attak &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  east &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   forks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;west &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; attak&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; forks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:8 --&gt;The intersection of those targets with squares not occupied by own pieces or attacked by opponent pawns and knights, but attacked by own knight(s) leaves a move target set with some forced properties.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:26:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc6&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:26 --&gt;See also&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/AVX2#KnightAttacks&quot;&gt;AVX2 Knight Attacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20Algorithms&quot;&gt;Fill Algorithms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Knight-Distance&quot;&gt;Knight-Distance&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:28:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc7&quot;&gt;&lt;a name=&quot;Selected Publications&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:28 --&gt;Selected Publications&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Martin%20Gardner&quot;&gt;Martin Gardner&lt;/a&gt; (&lt;strong&gt;1967&lt;/strong&gt;). &lt;em&gt;Problems that are Built on the Knight&#039;s Tour in Chess&lt;/em&gt;. &lt;a class=&quot;wiki_link&quot; href=&quot;/Scientific%20American&quot;&gt;Scientific American&lt;/a&gt;, Vol. 130&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Noam%20Elkies&quot;&gt;Noam D. Elkies&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Mathematician#RPStanley&quot;&gt;Richard P. Stanley&lt;/a&gt; (&lt;strong&gt;2003&lt;/strong&gt;). &lt;em&gt;The Mathematical Knight&lt;/em&gt;. &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/The_Mathematical_Intelligencer&quot; rel=&quot;nofollow&quot;&gt;The Mathematical Intelligencer&lt;/a&gt;, Vol. 25, No. 1, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.math.harvard.edu/%7Eelkies/knight.pdf&quot; rel=&quot;nofollow&quot;&gt;pdf&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Ben Hill (&lt;strong&gt;2004&lt;/strong&gt;). &lt;em&gt;Knight’s Tours&lt;/em&gt;. &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://faculty.olin.edu/~sadams/DM/ktpaper.pdf&quot; rel=&quot;nofollow&quot;&gt;pdf&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://scholar.google.com/citations?user=QNcGZdQAAAAJ&amp;amp;hl=de&quot; rel=&quot;nofollow&quot;&gt;Philip Hingston&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Graham%20Kendall&quot;&gt;Graham Kendall&lt;/a&gt; (&lt;strong&gt;2005&lt;/strong&gt;). &lt;em&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.graham-kendall.com/publications/displaypub.php?key=hk2005a&amp;amp;filename=gxk.bib&quot; rel=&quot;nofollow&quot;&gt;Ant Colonies Discover Knight&#039;s Tours&lt;/a&gt;&lt;/em&gt;. AI 2004, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.springer.com/computer/ai/book/978-3-540-24059-4&quot; rel=&quot;nofollow&quot;&gt;Lecture Notes in Computer Science 3339&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://scholar.google.com/citations?user=QNcGZdQAAAAJ&amp;amp;hl=de&quot; rel=&quot;nofollow&quot;&gt;Philip Hingston&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Graham%20Kendall&quot;&gt;Graham Kendall&lt;/a&gt; (&lt;strong&gt;2005&lt;/strong&gt;). &lt;em&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.graham-kendall.com/publications/displaypub.php?key=hk2005&amp;amp;filename=gxk.bib&quot; rel=&quot;nofollow&quot;&gt;Enumerating knight&#039;s tours using an ant colony algorithm&lt;/a&gt;&lt;/em&gt;. &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.informatik.uni-trier.de/~ley/db/conf/cec/cec2005.html&quot; rel=&quot;nofollow&quot;&gt;CEC 2005&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:30:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc8&quot;&gt;&lt;a name=&quot;Forum Posts&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:30 --&gt;Forum Posts&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=354355&quot; rel=&quot;nofollow&quot;&gt;Symbolic: From bitboards to ideas&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Steven%20Edwards&quot;&gt;Steven Edwards&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, March 13, 2004 » &lt;a class=&quot;wiki_link&quot; href=&quot;/Symbolic&quot;&gt;Symbolic&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=55118&quot; rel=&quot;nofollow&quot;&gt;knight&#039;s multiple atacks&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Daniel%20Anulliero&quot;&gt;Daniel Anulliero&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, January 27, 2015&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:32:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc9&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:32 --&gt;External Links&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Knight%27s_tour&quot; rel=&quot;nofollow&quot;&gt;Knight&#039;s tour from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.mayhematics.com/t/t.htm&quot; rel=&quot;nofollow&quot;&gt;Knight&#039;s Tour Notes compiled by George Jelliss&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://mathworld.wolfram.com/KnightsTour.html&quot; rel=&quot;nofollow&quot;&gt;Knight&#039;s Tour - from Wolfram MathWorld&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Longest_uncrossed_knight%27s_path&quot; rel=&quot;nofollow&quot;&gt;Longest uncrossed knight&#039;s path from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/L%C3%A1szl%C3%B3%20Lindner&quot;&gt;László Lindner&#039;s&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://archive.is/bHju8&quot; rel=&quot;nofollow&quot;&gt;knight wheel&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Frederic%20Friedel&quot;&gt;Frederic Friedel&lt;/a&gt; from &lt;a class=&quot;wiki_link&quot; href=&quot;/ChessBase&quot;&gt;ChessBase Puzzle&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://graham-kendall.com/blog/2014/01/knights-tours/&quot; rel=&quot;nofollow&quot;&gt;Knight&#039;s Tour&lt;/a&gt; from &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://graham-kendall.com/blog/&quot; rel=&quot;nofollow&quot;&gt;Research Reflections&lt;/a&gt;  by &lt;a class=&quot;wiki_link&quot; href=&quot;/Graham%20Kendall&quot;&gt;Graham Kendall&lt;/a&gt;, January 18, 2014&lt;/li&gt;&lt;li&gt;Knight&#039;s Tour - &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.numberphile.com/&quot; rel=&quot;nofollow&quot;&gt;Numberphile&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/YouTube&quot; rel=&quot;nofollow&quot;&gt;YouTube&lt;/a&gt; Video&lt;br /&gt;
&lt;!-- ws:start:WikiTextMediaRule:12:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/custom/25086882?h=0&amp;amp;w=0&amp;quot; class=&amp;quot;WikiMedia WikiMediaCustom&amp;quot; id=&amp;quot;wikitext@@media@@type=&amp;amp;quot;custom&amp;amp;quot; key=&amp;amp;quot;25086882&amp;amp;quot;&amp;quot; title=&amp;quot;Custom Media&amp;quot;/&amp;gt; --&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/ab_dY3dZFHM?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;!-- ws:end:WikiTextMediaRule:12 --&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:34:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc10&quot;&gt;&lt;a name=&quot;References&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:34 --&gt;References&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextReferencesRule:242:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.mcescher.com/Shopmain/ShopEU/facsilimeprints/prints.html&quot; rel=&quot;nofollow&quot;&gt;View facsimile print&lt;/a&gt; from &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.mcescher.com/Shopmain/ShopEU/facsilimeprints/&quot; rel=&quot;nofollow&quot;&gt;M.C. Escher - 16 Facsimile Prints&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:242 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:36:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc11&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:36 --&gt;What links here?&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextIncludeRule:09:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Knight Pattern&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;60&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Knight Pattern&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;60&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Knight_Pattern includeBody-Knight%20Pattern includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/AVX2&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;AVX2&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 8, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Bitboards&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Bitboards&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Blockers+and+Beyond&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Blockers and Beyond&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 21, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Chunking&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Chunking&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 12, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Combination&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Combination&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 25, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Decoying&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Decoying&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 12, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/DirGolem&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;DirGolem&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Double+Attack&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Double Attack&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 22, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 6, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/General+Setwise+Operations&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;General Setwise Operations&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 25, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Graham+Kendall&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Graham Kendall&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 26, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hanging+Piece&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hanging Piece&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Jonathan+Warkentin&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Jonathan Warkentin&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 29, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Killer+%28NL%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Killer (NL)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Dec 15, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Knight+Pattern&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Knight Pattern&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 23, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Knight-Distance&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Knight-Distance&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 20, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Knowledge&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Knowledge&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 22, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Loose+Piece&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Loose Piece&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 10, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Mathematician&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Mathematician&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Apr 9, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pattern+Recognition&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pattern Recognition&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 8, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pieces+versus+Directions&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pieces versus Directions&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 6, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Square+Attacked+By&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Square Attacked By&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 20, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Symbolic&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Symbolic&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 8, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Tactics&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Tactics&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 12, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Zillions+of+Games&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Zillions of Games&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 29, 2017&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:09 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Kogge-Stone Algorithm</title>
      <link>https://chessprogramming.wikispaces.com/Kogge-Stone+Algorithm</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Kogge-Stone+Algorithm</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Kogge-Stone+Algorithm</comments>
      <pubDate>Sat, 17 Sep 2016 21:52:19 GMT</pubDate>
      <description>&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Piece%20Attacks&quot;&gt;Sliding Piece Attacks&lt;/a&gt; * Kogge-Stone Algorithm&lt;/strong&gt;&lt;br /&gt;


&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;!-- ws:start:WikiTextLocalImageRule:131:&amp;lt;a href=&amp;quot;https://en.wikipedia.org/wiki/Kogge-Stone_adder&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;/file/view/300px-4_bit_Kogge_Stone_Adder_Example_new.png/415347274/300px-4_bit_Kogge_Stone_Adder_Example_new.png&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;width: 240px;&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt; --&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Kogge-Stone_adder&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;/file/view/300px-4_bit_Kogge_Stone_Adder_Example_new.png/415347274/300px-4_bit_Kogge_Stone_Adder_Example_new.png&quot; alt=&quot;300px-4_bit_Kogge_Stone_Adder_Example_new.png&quot; title=&quot;300px-4_bit_Kogge_Stone_Adder_Example_new.png&quot; style=&quot;width: 240px;&quot; /&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextLocalImageRule:131 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
        &lt;td rowspan=&quot;2&quot;&gt;The &lt;strong&gt;Kogge-Stone Algorithm&lt;/strong&gt; for set-wise &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Pieces&quot;&gt;sliding piece&lt;/a&gt; attack generation was first introduced by &lt;a class=&quot;wiki_link&quot; href=&quot;/Steffan%20Westcott&quot;&gt;Steffan Westcott&lt;/a&gt; in &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt; &lt;!-- ws:start:WikiTextRefRule:11:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.stmintz.com/ccc/index.php?id=252289&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Re: flood fill attack bitboards&amp;lt;/a&amp;gt; by &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/Steffan%20Westcott&amp;quot;&amp;gt;Steffan Westcott&amp;lt;/a&amp;gt;, &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/CCC&amp;quot;&amp;gt;CCC&amp;lt;/a&amp;gt;, September 15, 2002&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:11 --&gt; . It is a &lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms&quot;&gt;parallel prefix&lt;/a&gt; approach of a occluded &lt;a class=&quot;wiki_link&quot; href=&quot;/Dumb7Fill&quot;&gt;dumb7&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Flood_fill&quot; rel=&quot;nofollow&quot;&gt;flood-fill&lt;/a&gt;, propagating sliding piece attacks like &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Carry_(arithmetic)&quot; rel=&quot;nofollow&quot;&gt;carries&lt;/a&gt; of a &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Kogge-Stone_adder&quot; rel=&quot;nofollow&quot;&gt;Kogge-Stone&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Combinatorial%20Logic#Adder&quot;&gt;hardware adder&lt;/a&gt; &lt;!-- ws:start:WikiTextRefRule:14:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.aoki.ecei.tohoku.ac.jp/arith/mg/algorithm.html#fsa_pfx&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Hardware algorithms for arithmetic modules&amp;lt;/a&amp;gt; from the ARITH research group, Aoki lab., &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/Tohoku_University&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Tohoku University&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-2&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:14 --&gt; in &lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms#KoggeStoneAdder&quot;&gt;software&lt;/a&gt;. One needs to pass sliding pieces as generator set &amp;quot;g&amp;quot; and the set of empty squares as propagator set &amp;quot;p&amp;quot;. For appropriate attacks we need to shift the occluded fill &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;one step&lt;/a&gt; further, considering wraps.&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;4-bit Kogge-Stone adder &lt;!-- ws:start:WikiTextRefRule:16:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/Kogge-Stone_adder&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Kogge-Stone adder from Wikipedia&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-3&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-3&quot;&gt;[3]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:16 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:start:WikiTextTocRule:54:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:54 --&gt;&lt;!-- ws:start:WikiTextTocRule:55: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Parallel Prefix&quot;&gt;Parallel Prefix&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:55 --&gt;&lt;!-- ws:start:WikiTextTocRule:56: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Direction-wise Fill&quot;&gt;Direction-wise Fill&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:56 --&gt;&lt;!-- ws:start:WikiTextTocRule:57: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Direction-wise Fill-Fill on an empty Board&quot;&gt;Fill on an empty Board&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:57 --&gt;&lt;!-- ws:start:WikiTextTocRule:58: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Direction-wise Fill-Occluded Fill&quot;&gt;Occluded Fill&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:58 --&gt;&lt;!-- ws:start:WikiTextTocRule:59: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Direction-wise Fill-Ray-wise Attacks&quot;&gt;Ray-wise Attacks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:59 --&gt;&lt;!-- ws:start:WikiTextTocRule:60: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Generalized Rays&quot;&gt;Generalized Rays&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:60 --&gt;&lt;!-- ws:start:WikiTextTocRule:61: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:61 --&gt;&lt;!-- ws:start:WikiTextTocRule:62: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Publications&quot;&gt;Publications&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:62 --&gt;&lt;!-- ws:start:WikiTextTocRule:63: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Forum Posts&quot;&gt;Forum Posts&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:63 --&gt;&lt;!-- ws:start:WikiTextTocRule:64: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:64 --&gt;&lt;!-- ws:start:WikiTextTocRule:65: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#References&quot;&gt;References&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:65 --&gt;&lt;!-- ws:start:WikiTextTocRule:66: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:66 --&gt;&lt;!-- ws:start:WikiTextTocRule:67: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:67 --&gt;&lt;!-- ws:start:WikiTextIncludeRule:08:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/page?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;MappingHint&amp;amp;quot;&amp;quot; title=&amp;quot;Include page: page=&amp;amp;quot;MappingHint&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;

&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;/Square%20Mapping%20Considerations&quot;&gt;&lt;img src=&quot;/file/view/mapping.JPG/93134172/mapping.JPG&quot; alt=&quot;mapping.JPG&quot; title=&quot;mapping.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;td&gt;&lt;em&gt;Code samples and bitboard diagrams rely on &lt;a class=&quot;wiki_link&quot; href=&quot;/Square%20Mapping%20Considerations#LittleEndianRankFileMapping&quot;&gt;Little endian file and rank mapping&lt;/a&gt;&lt;/em&gt;.&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:end:WikiTextIncludeRule:08 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:30:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Parallel Prefix&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:30 --&gt;Parallel Prefix&lt;/h1&gt;
 &lt;tt&gt;The routine fillUpOccluded() smears the set bits of bitboard g upwards, but only along set bits of p; a reset bit in p is enough to halt a smear. Other routines have a similar effect.&lt;/tt&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 fillUpOccluded(U64 g, U64 p) {&amp;lt;br/&amp;gt;   g |= p &amp;amp;amp; (g &amp;amp;lt;&amp;amp;lt;  8);&amp;lt;br/&amp;gt;   p &amp;amp;amp;=     (p &amp;amp;lt;&amp;amp;lt;  8);&amp;lt;br/&amp;gt;   g |= p &amp;amp;amp; (g &amp;amp;lt;&amp;amp;lt; 16);&amp;lt;br/&amp;gt;   p &amp;amp;amp;=     (p &amp;amp;lt;&amp;amp;lt; 16);&amp;lt;br/&amp;gt;   g |= p &amp;amp;amp; (g &amp;amp;lt;&amp;amp;lt; 32);&amp;lt;br/&amp;gt;   return g;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 fillUpOccluded&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 g, U64 p&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   g &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; p &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;g &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   p &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;     &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;p &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   g &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; p &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;g &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   p &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;     &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;p &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   g &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; p &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;g &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; g&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;tt&gt;The method chosen in FillUpOccluded() is based on a Kogge-Stone parallel prefix network, because it can be implemented very easily in software. The diagram below (trust me, it really _is_ supposed to look like that) is an illustration of how it works. The corresponding lines of program code are shown on the right. The inputs are fed into the network at the top, pass along the connecting lines, are combined by the # operator at various points, and the outputs appear at the bottom.&lt;/tt&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;x1 x2 x3 x4 x5 x6 x7 x8         Input : g, p&amp;lt;br/&amp;gt;|  |  |  |  |  |  |  |&amp;lt;br/&amp;gt;V  V  V  V  V  V  V  V&amp;lt;br/&amp;gt;|  |  |  |  |  |  |  |&amp;lt;br/&amp;gt;|  |  |  |  |  |  |  |&amp;lt;br/&amp;gt;|\ |\ |\ |\ |\ |\ |\ |&amp;lt;br/&amp;gt;| \| \| \| \| \| \| \|&amp;lt;br/&amp;gt;|  #  #  #  #  #  #  #          g |= p &amp;amp;amp; (g &amp;amp;lt;&amp;amp;lt;  8);&amp;lt;br/&amp;gt;|  |  |  |  |  |  |  |          p &amp;amp;amp;=     (p &amp;amp;lt;&amp;amp;lt;  8);&amp;lt;br/&amp;gt;|\ |\ |\ |\ |\ |\ |  |&amp;lt;br/&amp;gt;| \: \: \: \: \: \:  |&amp;lt;br/&amp;gt;|  \  \  \  \  \  \  |&amp;lt;br/&amp;gt;|  :\ :\ :\ :\ :\ :\ |&amp;lt;br/&amp;gt;|  | \| \| \| \| \| \|&amp;lt;br/&amp;gt;|  |  #  #  #  #  #  #          g |= p &amp;amp;amp; (g &amp;amp;lt;&amp;amp;lt; 16);&amp;lt;br/&amp;gt;|  |  |  |  |  |  |  |          p &amp;amp;amp;=     (p &amp;amp;lt;&amp;amp;lt; 16);&amp;lt;br/&amp;gt;|\ |\ |\ |\ |  |  |  |&amp;lt;br/&amp;gt;| \: \: \: \:  |  |  |&amp;lt;br/&amp;gt;|  \  \  \  \  |  |  |&amp;lt;br/&amp;gt;|  :\ :\ :\ :\ |  |  |&amp;lt;br/&amp;gt;|  | \: \: \: \:  |  |&amp;lt;br/&amp;gt;|  |  \  \  \  \  |  |&amp;lt;br/&amp;gt;|  |  :\ :\ :\ :\ |  |&amp;lt;br/&amp;gt;|  |  | \: \: \: \:  |&amp;lt;br/&amp;gt;|  |  |  \  \  \  \  |&amp;lt;br/&amp;gt;|  |  |  ;\ ;\ :\ :\ |&amp;lt;br/&amp;gt;|  |  |  | \| \| \| \|&amp;lt;br/&amp;gt;|  |  |  |  #  #  #  #          g |= p &amp;amp;amp; (g &amp;amp;lt;&amp;amp;lt; 32);&amp;lt;br/&amp;gt;|  |  |  |  |  |  |  |&amp;lt;br/&amp;gt;|  |  |  |  |  |  |  |&amp;lt;br/&amp;gt;V  V  V  V  V  V  V  V&amp;lt;br/&amp;gt;q1 q2 q3 q4 q5 q6 q7 q8         Output : g&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;x1 x2 x3 x4 x5 x6 x7 x8         Input : g, p
|  |  |  |  |  |  |  |
V  V  V  V  V  V  V  V
|  |  |  |  |  |  |  |
|  |  |  |  |  |  |  |
|\ |\ |\ |\ |\ |\ |\ |
| \| \| \| \| \| \| \|
|  #  #  #  #  #  #  #          g |= p &amp;amp; (g &amp;lt;&amp;lt;  8);
|  |  |  |  |  |  |  |          p &amp;amp;=     (p &amp;lt;&amp;lt;  8);
|\ |\ |\ |\ |\ |\ |  |
| \: \: \: \: \: \:  |
|  \  \  \  \  \  \  |
|  :\ :\ :\ :\ :\ :\ |
|  | \| \| \| \| \| \|
|  |  #  #  #  #  #  #          g |= p &amp;amp; (g &amp;lt;&amp;lt; 16);
|  |  |  |  |  |  |  |          p &amp;amp;=     (p &amp;lt;&amp;lt; 16);
|\ |\ |\ |\ |  |  |  |
| \: \: \: \:  |  |  |
|  \  \  \  \  |  |  |
|  :\ :\ :\ :\ |  |  |
|  | \: \: \: \:  |  |
|  |  \  \  \  \  |  |
|  |  :\ :\ :\ :\ |  |
|  |  | \: \: \: \:  |
|  |  |  \  \  \  \  |
|  |  |  ;\ ;\ :\ :\ |
|  |  |  | \| \| \| \|
|  |  |  |  #  #  #  #          g |= p &amp;amp; (g &amp;lt;&amp;lt; 32);
|  |  |  |  |  |  |  |
|  |  |  |  |  |  |  |
V  V  V  V  V  V  V  V
q1 q2 q3 q4 q5 q6 q7 q8         Output : g&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:32:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Direction-wise Fill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:32 --&gt;Direction-wise Fill&lt;/h1&gt;
 &lt;em&gt;We further rely on the &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Compass_rose&quot; rel=&quot;nofollow&quot;&gt;compass rose&lt;/a&gt; to identify &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;ray-directions&lt;/a&gt;.&lt;/em&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;  noWe         nort         noEa&amp;lt;br/&amp;gt;          +7    +8    +9&amp;lt;br/&amp;gt;              \  |  /&amp;lt;br/&amp;gt;  west    -1 &amp;amp;lt;-  0 -&amp;amp;gt; +1    east&amp;lt;br/&amp;gt;              /  |  \&amp;lt;br/&amp;gt;          -9    -8    -7&amp;lt;br/&amp;gt;  soWe         sout         soEa&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;  noWe         nort         noEa
          +7    +8    +9
              \  |  /
  west    -1 &amp;lt;-  0 -&amp;gt; +1    east
              /  |  \
          -9    -8    -7
  soWe         sout         soEa&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;Assuming &lt;a class=&quot;wiki_link&quot; href=&quot;/Square%20Mapping%20Considerations#LittleEndianRankFileMapping&quot;&gt;little-endian&lt;/a&gt; file mapping. Big-endian file mapping has to swap A and H and east and west. As a reminder - &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#ShiftingBitboards&quot;&gt;shifting bitboards&lt;/a&gt; - the base of further stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:68:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@Fillonanemptyboard&amp;quot; title=&amp;quot;Anchor: Fillonanemptyboard&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;Fillonanemptyboard&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:68 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:34:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Direction-wise Fill-Fill on an empty Board&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:34 --&gt;Fill on an empty Board&lt;/h2&gt;
 We already used the south- and north- &lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms&quot;&gt;parallel prefix&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Fills&quot;&gt;fill-routines&lt;/a&gt; while calculating &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Spans&quot;&gt;pawn spans&lt;/a&gt;. We need one additional direction step for ray-attacks on the otherwise empty board to exclude sliders. Convenient to initialize &lt;a class=&quot;wiki_link&quot; href=&quot;/On%20an%20empty%20Board#RayAttacks&quot;&gt;ray-attacks&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Array&quot;&gt;arrays&lt;/a&gt; of single sliders. We may conduct those routines from the general occluded fills by passing the universal propagator set. The vertical fills already look familiar.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 soutFill(U64 gen) {&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;gt;&amp;amp;gt;  8);&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;gt;&amp;amp;gt; 16);&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;gt;&amp;amp;gt; 32);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 nortFill(U64 gen) {&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;lt;&amp;amp;lt;  8);&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;lt;&amp;amp;lt; 16);&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;lt;&amp;amp;lt; 32);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 soutFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 nortFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;Using explicit propagators as compile time constants to manage the A-, H-file-wraps.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 eastFill(U64 gen) {&amp;lt;br/&amp;gt;   const U64 pr0 = notAFile;&amp;lt;br/&amp;gt;   const U64 pr1 = pr0 &amp;amp;amp; (pr0 &amp;amp;lt;&amp;amp;lt; 1);&amp;lt;br/&amp;gt;   const U64 pr2 = pr1 &amp;amp;amp; (pr1 &amp;amp;lt;&amp;amp;lt; 2);&amp;lt;br/&amp;gt;   gen |= pr0 &amp;amp;amp; (gen  &amp;amp;lt;&amp;amp;lt; 1);&amp;lt;br/&amp;gt;   gen |= pr1 &amp;amp;amp; (gen  &amp;amp;lt;&amp;amp;lt; 2);&amp;lt;br/&amp;gt;   gen |= pr2 &amp;amp;amp; (gen  &amp;amp;lt;&amp;amp;lt; 4);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 noEaFill(U64 gen) {&amp;lt;br/&amp;gt;   const U64 pr0 = notAFile;&amp;lt;br/&amp;gt;   const U64 pr1 = pr0 &amp;amp;amp; (pr0 &amp;amp;lt;&amp;amp;lt;  9);&amp;lt;br/&amp;gt;   const U64 pr2 = pr1 &amp;amp;amp; (pr1 &amp;amp;lt;&amp;amp;lt; 18);&amp;lt;br/&amp;gt;   gen |= pr0 &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt;  9);&amp;lt;br/&amp;gt;   gen |= pr1 &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 18);&amp;lt;br/&amp;gt;   gen |= pr2 &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 36);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 soEaFill(U64 gen) {&amp;lt;br/&amp;gt;   const U64 pr0 = notAFile;&amp;lt;br/&amp;gt;   const U64 pr1 = pr0 &amp;amp;amp; (pr0 &amp;amp;gt;&amp;amp;gt;  7);&amp;lt;br/&amp;gt;   const U64 pr2 = pr1 &amp;amp;amp; (pr1 &amp;amp;gt;&amp;amp;gt; 14);&amp;lt;br/&amp;gt;   gen |= pr0 &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt;  7);&amp;lt;br/&amp;gt;   gen |= pr1 &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 14);&amp;lt;br/&amp;gt;   gen |= pr2 &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 28);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 westFill(U64 gen) {&amp;lt;br/&amp;gt;   const U64 pr0 = notHFile;&amp;lt;br/&amp;gt;   const U64 pr1 = pr0 &amp;amp;amp; (pr0 &amp;amp;gt;&amp;amp;gt; 1);&amp;lt;br/&amp;gt;   const U64 pr2 = pr1 &amp;amp;amp; (pr1 &amp;amp;gt;&amp;amp;gt; 2);&amp;lt;br/&amp;gt;   gen |= pr0 &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 1);&amp;lt;br/&amp;gt;   gen |= pr1 &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 2);&amp;lt;br/&amp;gt;   gen |= pr2 &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 4);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 soWeFill(U64 gen) {&amp;lt;br/&amp;gt;   const U64 pr0 = notHFile;&amp;lt;br/&amp;gt;   const U64 pr1 = pr0 &amp;amp;amp; (pr0 &amp;amp;gt;&amp;amp;gt;  9);&amp;lt;br/&amp;gt;   const U64 pr2 = pr1 &amp;amp;amp; (pr1 &amp;amp;gt;&amp;amp;gt; 18);&amp;lt;br/&amp;gt;   gen |= pr0 &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt;  9);&amp;lt;br/&amp;gt;   gen |= pr1 &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 18);&amp;lt;br/&amp;gt;   gen |= pr2 &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 36);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 noWeFill(U64 gen) {&amp;lt;br/&amp;gt;   const U64 pr0 = notHFile;&amp;lt;br/&amp;gt;   const U64 pr1 = pr0 &amp;amp;amp; (pr0 &amp;amp;lt;&amp;amp;lt;  7);&amp;lt;br/&amp;gt;   const U64 pr2 = pr1 &amp;amp;amp; (pr1 &amp;amp;lt;&amp;amp;lt; 14);&amp;lt;br/&amp;gt;   gen |= pr0 &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt;  7);&amp;lt;br/&amp;gt;   gen |= pr1 &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 14);&amp;lt;br/&amp;gt;   gen |= pr2 &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 28);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 eastFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notAFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr0 &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr1 &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen  &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen  &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr2 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen  &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 noEaFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notAFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr0 &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr1 &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr2 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;36&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 soEaFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notAFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr0 &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr1 &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr2 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 westFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notHFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr0 &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr1 &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr2 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 soWeFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notHFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr0 &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr1 &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr2 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;36&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 noWeFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr0 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notHFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr1 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr0 &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 pr2 &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pr1 &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr0 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr1 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pr2 &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:69:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@OccludedFill&amp;quot; title=&amp;quot;Anchor: OccludedFill&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;OccludedFill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:69 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:36:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc3&quot;&gt;&lt;a name=&quot;Direction-wise Fill-Occluded Fill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:36 --&gt;Occluded Fill&lt;/h2&gt;
 Occluded fills include sliders, but exclude blockers &lt;!-- ws:start:WikiTextRefRule:20:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.talkchess.com/forum/viewtopic.php?t=22038&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Kogge Stone Algorithm mistake on chessprogramming Wiki&amp;lt;/a&amp;gt; by &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/Christopher%20Conkie&amp;quot;&amp;gt;Christopher Conkie&amp;lt;/a&amp;gt;, &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/CCC&amp;quot;&amp;gt;CCC&amp;lt;/a&amp;gt;, June 29, 2008&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-4&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-4&quot;&gt;[4]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:20 --&gt;.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:5:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 soutOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt;  8);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;gt;&amp;amp;gt;  8);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 16);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;gt;&amp;amp;gt; 16);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 32);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 nortOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt;  8);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;lt;&amp;amp;lt;  8);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 16);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;lt;&amp;amp;lt; 16);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 32);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 eastOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   pro &amp;amp;amp;= notAFile;&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 1);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;lt;&amp;amp;lt; 1);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 2);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;lt;&amp;amp;lt; 2);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 4);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 noEaOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   pro &amp;amp;amp;= notAFile;&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt;  9);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;lt;&amp;amp;lt;  9);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 18);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;lt;&amp;amp;lt; 18);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 36);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 soEaOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   pro &amp;amp;amp;= notAFile;&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt;  7);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;gt;&amp;amp;gt;  7);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 14);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;gt;&amp;amp;gt; 14);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 28);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 westOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   pro &amp;amp;amp;= notHFile;&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 1);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;gt;&amp;amp;gt; 1);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 2);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;gt;&amp;amp;gt; 2);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 4);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 soWeOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   pro &amp;amp;amp;= notHFile;&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt;  9);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;gt;&amp;amp;gt;  9);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 18);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;gt;&amp;amp;gt; 18);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;gt;&amp;amp;gt; 36);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 noWeOccl(U64 gen, U64 pro) {&amp;lt;br/&amp;gt;   pro &amp;amp;amp;= notHFile;&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt;  7);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;lt;&amp;amp;lt;  7);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 14);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       (pro &amp;amp;lt;&amp;amp;lt; 14);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; (gen &amp;amp;lt;&amp;amp;lt; 28);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 soutOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 nortOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 eastOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notAFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 noEaOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notAFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;36&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 soEaOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notAFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 westOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notHFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 soWeOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notHFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;36&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 noWeOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; notHFile&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:5 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:38:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc4&quot;&gt;&lt;a name=&quot;Direction-wise Fill-Ray-wise Attacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:38 --&gt;Ray-wise Attacks&lt;/h2&gt;
 Ray-wise attacks need the occluded fills &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;shift one&lt;/a&gt; further, considering wraps.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:6:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 soutAttacks (U64 rooks,   U64 empty) {return soutOne(soutOccl(rooks,   empty));}&amp;lt;br/&amp;gt;U64 nortAttacks (U64 rooks,   U64 empty) {return nortOne(nortOccl(rooks,   empty));}&amp;lt;br/&amp;gt;U64 eastAttacks (U64 rooks,   U64 empty) {return eastOne(eastOccl(rooks,   empty));}&amp;lt;br/&amp;gt;U64 noEaAttacks (U64 bishops, U64 empty) {return noEaOne(noEaOccl(bishops, empty));}&amp;lt;br/&amp;gt;U64 soEaAttacks (U64 bishops, U64 empty) {return soEaOne(soEaOccl(bishops, empty));}&amp;lt;br/&amp;gt;U64 westAttacks (U64 rooks,   U64 empty) {return westOne(westOccl(rooks,   empty));}&amp;lt;br/&amp;gt;U64 soWeAttacks (U64 bishops, U64 empty) {return soWeOne(soWeOccl(bishops, empty));}&amp;lt;br/&amp;gt;U64 noWeAttacks (U64 bishops, U64 empty) {return noWeOne(noWeOccl(bishops, empty));}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 soutAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks,   U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; soutOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;soutOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks,   empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 nortAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks,   U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; nortOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;nortOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks,   empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 eastAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks,   U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; eastOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;eastOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks,   empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 noEaAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bishops, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; noEaOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;noEaOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops, empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soEaAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bishops, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; soEaOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;soEaOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops, empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 westAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 rooks,   U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; westOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;westOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rooks,   empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 soWeAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bishops, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; soWeOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;soWeOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops, empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 noWeAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bishops, U64 empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; noWeOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;noWeOccl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bishops, empty&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:6 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:70:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@GeneralizedRays&amp;quot; title=&amp;quot;Anchor: GeneralizedRays&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;GeneralizedRays&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:70 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:40:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc5&quot;&gt;&lt;a name=&quot;Generalized Rays&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:40 --&gt;Generalized Rays&lt;/h1&gt;
 Since &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#Rotate&quot;&gt;rotate 64&lt;/a&gt; works like a &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#GeneralizedShift&quot;&gt;generalized shift&lt;/a&gt; with positive or negative shift amount, it might be applied to get pawn-attacks for both sides - or a Kogge-Stone fill with a direction parameter and small lookups for shift amount and wrap ands, instead of multiple code for eight directions. Of course generalized shift will be a bit slower due to lookups and using cl as the shift amount register.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:7:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 occludedFill (U64 gen, U64 pro, int dir8)&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;   int r = shift[dir8]; // {+-1,7,8,9}&amp;lt;br/&amp;gt;   pro &amp;amp;amp;= avoidWrap[dir8];&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; rotateLeft(gen, r);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       rotateLeft(pro, r);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; rotateLeft(gen, 2*r);&amp;lt;br/&amp;gt;   pro &amp;amp;amp;=       rotateLeft(pro, 2*r);&amp;lt;br/&amp;gt;   gen |= pro &amp;amp;amp; rotateLeft(gen, 4*r);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 shiftOne (U64 b, int dir8)&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;   int r = shift[dir8]; // {+-1,7,8,9}&amp;lt;br/&amp;gt;   return rotateLeft(b, r) &amp;amp;amp; avoidWrap[dir8];&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 slidingAttacks (U64 sliders, U64 empty, int dir8)&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;   U64 fill = occludedFill(slider, empty, dir8)&amp;lt;br/&amp;gt;   return shiftOne(fill, dir8);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;// positve left, negative right shifts&amp;lt;br/&amp;gt;int shift[8] = {9, 1,-7,-8,-9,-1, 7, 8};&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 avoidWrap[8] =&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;   0xfefefefefefefe00,&amp;lt;br/&amp;gt;   0xfefefefefefefefe,&amp;lt;br/&amp;gt;   0x00fefefefefefefe,&amp;lt;br/&amp;gt;   0x00ffffffffffffff,&amp;lt;br/&amp;gt;   0x007f7f7f7f7f7f7f,&amp;lt;br/&amp;gt;   0x7f7f7f7f7f7f7f7f,&amp;lt;br/&amp;gt;   0x7f7f7f7f7f7f7f00,&amp;lt;br/&amp;gt;   0xffffffffffffff00,&amp;lt;br/&amp;gt;};&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 occludedFill &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen, U64 pro, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; r &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; shift&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// {+-1,7,8,9}&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; avoidWrap&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen, r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro, r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen, &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt;r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;       rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pro, &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt;r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; pro &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen, &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;sy2&quot;&gt;*&lt;/span&gt;r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 shiftOne &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 b, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; r &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; shift&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// {+-1,7,8,9}&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; rotateLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b, r&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; avoidWrap&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;dir8&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 slidingAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 sliders, U64 empty, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 fill &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; occludedFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;slider, empty, dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; shiftOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;fill, dir8&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// positve left, negative right shifts&lt;/span&gt;
&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; shift&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;,&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;,&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;,&lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
U64 avoidWrap&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;nu12&quot;&gt;0xfefefefefefefe00&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0xfefefefefefefefe&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x00fefefefefefefe&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x00ffffffffffffff&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x007f7f7f7f7f7f7f&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x7f7f7f7f7f7f7f7f&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0x7f7f7f7f7f7f7f00&lt;/span&gt;,
   &lt;span class=&quot;nu12&quot;&gt;0xffffffffffffff00&lt;/span&gt;,
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:7 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:42:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc6&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:42 --&gt;See also&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Steffan%20Westcott&quot;&gt;Steffan Westcott&#039;s&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms#FurtherElaborationsOnKoggeStone&quot;&gt;Elaboration on Kogge-Stone algorithm&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms#KoggeStoneAdder&quot;&gt;Add/Sub versus Attacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Design%20Principles&quot;&gt;Design Principles&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Steffan%20Westcott&quot;&gt;Steffan Westcott&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Dumb7Fill&quot;&gt;Dumb7Fill&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20by%20Subtraction&quot;&gt;Fill by Subtraction&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20Algorithms&quot;&gt;Fill Algorithms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pieces%20versus%20Directions&quot;&gt;Pieces versus Directions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/SSE2#SSE2WrapperinCpp&quot;&gt;SSE2-Wrapper&lt;/a&gt; in &lt;a class=&quot;wiki_link&quot; href=&quot;/Cpp&quot;&gt;C++&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:44:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc7&quot;&gt;&lt;a name=&quot;Publications&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:44 --&gt;Publications&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.cse.nd.edu/%7Ekogge/&quot; rel=&quot;nofollow&quot;&gt;Peter M. Kogge&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Mathematician#HSStone&quot;&gt;Harold S. Stone&lt;/a&gt; (&lt;strong&gt;1973&lt;/strong&gt;). &lt;em&gt;A Parallel Algorithm for the Efficient Solution of a General Class of Recurrence Equations&lt;/em&gt;. IEEE Transactions on Computers, 1973, C-22, 783-791, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://bwrc.eecs.berkeley.edu/Classes/ee225c/2000%20225c/Papers/KoggeStone.pdf&quot; rel=&quot;nofollow&quot;&gt;pdf&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:46:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc8&quot;&gt;&lt;a name=&quot;Forum Posts&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:46 --&gt;Forum Posts&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=252289&quot; rel=&quot;nofollow&quot;&gt;Re: flood fill attack bitboards&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Steffan%20Westcott&quot;&gt;Steffan Westcott&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, September 15, 2002&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=22038&quot; rel=&quot;nofollow&quot;&gt;Kogge Stone Algorithm mistake on chessprogramming Wiki&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Christopher%20Conkie&quot;&gt;Christopher Conkie&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, June 29, 2008&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?start=0&amp;amp;t=25979&amp;amp;start=10&quot; rel=&quot;nofollow&quot;&gt;Re: Hyperbola Quiesscene: hardly any improvement&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Karlo%20Bala%20Jr.&quot;&gt;Karlo Bala Jr.&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, January 14, 2009 » &lt;a class=&quot;wiki_link&quot; href=&quot;/Hyperbola%20Quintessence&quot;&gt;Hyperbola Quintessence&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=46974&quot; rel=&quot;nofollow&quot;&gt;Kogge Stone, Vector Based&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Srdja%20Matovic&quot;&gt;Srdja Matovic&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, January 22, 2013 » &lt;a class=&quot;wiki_link&quot; href=&quot;/GPU&quot;&gt;GPU&lt;/a&gt; &lt;!-- ws:start:WikiTextRefRule:22:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/Parallel_Thread_Execution&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Parallel Thread Execution from Wikipedia&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-5&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-5&quot;&gt;[5]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:22 --&gt; &lt;!-- ws:start:WikiTextRefRule:24:&amp;amp;lt;ref&amp;amp;gt;NVIDIA Compute PTX: Parallel Thread Execution, ISA Version 1.4, March 31, 2009, &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.nvidia.com/content/CUDA-ptx_isa_1.4.pdf&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;pdf&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-6&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-6&quot;&gt;[6]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:24 --&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=48387&quot; rel=&quot;nofollow&quot;&gt;Fast perft on GPU (upto 20 Billion nps w/o hashing)&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Ankan%20Banerjee&quot;&gt;Ankan Banerjee&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, June 22, 2013 » &lt;a class=&quot;wiki_link&quot; href=&quot;/Perft&quot;&gt;Perft&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/GPU&quot;&gt;GPU&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:48:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc9&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:48 --&gt;External Links&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Kogge-Stone_adder&quot; rel=&quot;nofollow&quot;&gt;Kogge-Stone adder from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://terra.fendrich.se/Terra%20Help-1763.htm&quot; rel=&quot;nofollow&quot;&gt;Kogge-Stone algorithm&lt;/a&gt; from &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://terra.fendrich.se/Terra%20Help-1647.htm&quot; rel=&quot;nofollow&quot;&gt;Terra Help and Information - Theories&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Peter%20Fendrich&quot;&gt;Peter Fendrich&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#Gong&quot;&gt;Gong&lt;/a&gt; - &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Shapeshifter_%28Gong_album%29&quot; rel=&quot;nofollow&quot;&gt;Shapeshifter&lt;/a&gt; &lt;!-- ws:start:WikiTextRefRule:26:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/Shapeshifting&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Shapeshifting from Wikipedia&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-7&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-7&quot;&gt;[7]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:26 --&gt;, 1992, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/YouTube&quot; rel=&quot;nofollow&quot;&gt;YouTube&lt;/a&gt; Video&lt;br /&gt;
&lt;!-- ws:start:WikiTextMediaRule:27:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/youtube/0AZVy2coi6c?h=315&amp;amp;w=480&amp;quot; class=&amp;quot;WikiMedia WikiMediaYoutube&amp;quot; id=&amp;quot;wikitext@@media@@type=&amp;amp;quot;youtube&amp;amp;quot; key=&amp;amp;quot;0AZVy2coi6c&amp;amp;quot; width=&amp;amp;quot;480&amp;amp;quot;&amp;quot; title=&amp;quot;YouTube Video&amp;quot;height=&amp;quot;315&amp;quot; width=&amp;quot;480&amp;quot;/&amp;gt; --&gt;&lt;iframe width=&quot;480&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/0AZVy2coi6c&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;!-- ws:end:WikiTextMediaRule:27 --&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:50:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc10&quot;&gt;&lt;a name=&quot;References&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:50 --&gt;References&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextReferencesRule:247:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=252289&quot; rel=&quot;nofollow&quot;&gt;Re: flood fill attack bitboards&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Steffan%20Westcott&quot;&gt;Steffan Westcott&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, September 15, 2002&lt;/li&gt;
&lt;li id=&quot;cite_note-2&quot;&gt;&lt;a href=&quot;#cite_ref-2&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.aoki.ecei.tohoku.ac.jp/arith/mg/algorithm.html#fsa_pfx&quot; rel=&quot;nofollow&quot;&gt;Hardware algorithms for arithmetic modules&lt;/a&gt; from the ARITH research group, Aoki lab., &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Tohoku_University&quot; rel=&quot;nofollow&quot;&gt;Tohoku University&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-3&quot;&gt;&lt;a href=&quot;#cite_ref-3&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Kogge-Stone_adder&quot; rel=&quot;nofollow&quot;&gt;Kogge-Stone adder from Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-4&quot;&gt;&lt;a href=&quot;#cite_ref-4&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=22038&quot; rel=&quot;nofollow&quot;&gt;Kogge Stone Algorithm mistake on chessprogramming Wiki&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Christopher%20Conkie&quot;&gt;Christopher Conkie&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, June 29, 2008&lt;/li&gt;
&lt;li id=&quot;cite_note-5&quot;&gt;&lt;a href=&quot;#cite_ref-5&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Parallel_Thread_Execution&quot; rel=&quot;nofollow&quot;&gt;Parallel Thread Execution from Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-6&quot;&gt;&lt;a href=&quot;#cite_ref-6&quot;&gt;^&lt;/a&gt; NVIDIA Compute PTX: Parallel Thread Execution, ISA Version 1.4, March 31, 2009, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.nvidia.com/content/CUDA-ptx_isa_1.4.pdf&quot; rel=&quot;nofollow&quot;&gt;pdf&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-7&quot;&gt;&lt;a href=&quot;#cite_ref-7&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Shapeshifting&quot; rel=&quot;nofollow&quot;&gt;Shapeshifting from Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:247 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:52:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc11&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:52 --&gt;What links here?&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextIncludeRule:09:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Kogge-Stone Algorithm&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;40&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Kogge-Stone Algorithm&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;40&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Kogge-Stone_Algorithm includeBody-Kogge-Stone%20Algorithm includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 5, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Ankan+Banerjee&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Ankan Banerjee&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 26, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Anubis&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Anubis&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 29, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Attack+and+Defend+Maps&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Attack and Defend Maps&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Bit-Twiddling&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Bit-Twiddling&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 6, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Christopher+Conkie&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Christopher Conkie&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 17, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Design+Principles&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Design Principles&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/DirGolem&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;DirGolem&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Dumb7Fill&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Dumb7Fill&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 27, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Efficient+Generation+of+Sliding+Piece+Attacks&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Efficient Generation of Sliding Piece Attacks&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 6, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+by+Subtraction&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill by Subtraction&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 5, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/GPU&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;GPU&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Dec 16, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Gunnar+Andersson&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Gunnar Andersson&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 23, 2011&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/John+L.+Jerz&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;John L. Jerz&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 15, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Karlo+Bala+Jr.&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Karlo Bala Jr.&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 19, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Kogge-Stone+Algorithm&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 17, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Mathematician&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Mathematician&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Apr 9, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Mobility&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Mobility&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/On+an+empty+Board&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;On an empty Board&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 18, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Othello&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Othello&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 4, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Paladin&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Paladin&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 29, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Parallel+Prefix+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Parallel Prefix Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 22, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Fills&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Fills&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 18, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Perft&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Perft&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 26, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pieces+versus+Directions&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pieces versus Directions&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 6, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Quad-Bitboards&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Quad-Bitboards&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 30, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Rodent&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Rodent&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 11, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Russell+Reagan&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Russell Reagan&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 31, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Shifted+Bitboards&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Shifted Bitboards&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 9, 2011&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/SIMD+and+SWAR+Techniques&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;SIMD and SWAR Techniques&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 27, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Sliding+Piece+Attacks&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Sliding Piece Attacks&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 27, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Srdja+Matovic&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Srdja Matovic&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Apr 14, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/SSE2&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;SSE2&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 27, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Steffan+Westcott&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Steffan Westcott&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 21, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Tarrasch+Rule&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Tarrasch Rule&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 2, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/X-ray+Attacks+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;X-ray Attacks (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 31, 2015&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:09 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Piece%20Attacks&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Open Pawns (Bitboards)</title>
      <link>https://chessprogramming.wikispaces.com/Open+Pawns+%28Bitboards%29</link>
      <dc:creator>davidcnorris</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Open+Pawns+%28Bitboards%29</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Open+Pawns+%28Bitboards%29</comments>
      <pubDate>Thu, 24 Aug 2017 14:11:28 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextTocRule:10:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:10 --&gt;&lt;!-- ws:start:WikiTextTocRule:11: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Open Single Pawn&quot;&gt;Open Single Pawn&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:11 --&gt;&lt;!-- ws:start:WikiTextTocRule:12: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Open Pawns set-wise&quot;&gt;Open Pawns set-wise&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:12 --&gt;&lt;!-- ws:start:WikiTextTocRule:13: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:13 --&gt;&lt;!-- ws:start:WikiTextTocRule:14: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:14 --&gt;&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Open Pawns&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Open pawns have no mechanical obstruction - an opponent pawn in front. They are at least half-free or even free &lt;a class=&quot;wiki_link&quot; href=&quot;/Passed%20Pawn&quot;&gt;passers&lt;/a&gt;. Thus, open pawns are a superset of passed pawns and half-free pawns like &lt;a class=&quot;wiki_link&quot; href=&quot;/Candidate%20Passed%20Pawn&quot;&gt;candidates&lt;/a&gt; but also weak pawns like the half-free &lt;a class=&quot;wiki_link&quot; href=&quot;/Backward%20Pawns%20%28Bitboards%29#Straggler&quot;&gt;straggler&lt;/a&gt; (&lt;a class=&quot;wiki_link&quot; href=&quot;/Backward%20Pawn&quot;&gt;backward pawn&lt;/a&gt; ) or half-free &lt;a class=&quot;wiki_link&quot; href=&quot;/Isolated%20Pawn&quot;&gt;isolanis&lt;/a&gt;. Open pawns are vulnerable from opponent rook-attacks on &lt;a class=&quot;wiki_link&quot; href=&quot;/Half-open%20file&quot;&gt;half-open files&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:4:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Open Single Pawn&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:4 --&gt;Open Single Pawn&lt;/h1&gt;
 Working in the &lt;strong&gt;square centric&lt;/strong&gt; world of the board, thus using a square index of &lt;strong&gt;one&lt;/strong&gt; particular pawn, likely from &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Serialization&quot;&gt;bitboard traversal&lt;/a&gt;, to lookup pre-calculated pattern.&lt;br /&gt;
&lt;br /&gt;
For a single pawn we need to access a lookup-table to get all squares on the same file in front of the pawn. If the intersection of the fronspan with the set of opponent pawns is empty, it is a open pawn.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 arrFrontSpans[2][64];&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;if ( (arrFrontSpans[white][sqOfWhitePawn] &amp;amp;amp; pawnBB[black]) == 0 ) -&amp;amp;gt; pawn open&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 arrFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;arrFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;white&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sqOfWhitePawn&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pawnBB&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;black&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; pawn open&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;arrFrontSpan[white][d4]&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . 1 . . . .&amp;lt;br/&amp;gt;. . . p . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;arrFrontSpan[white][d4]
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .
. . . p . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:15:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@OpenPawnsSetwise&amp;quot; title=&amp;quot;Anchor: OpenPawnsSetwise&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;OpenPawnsSetwise&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:15 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:6:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Open Pawns set-wise&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:6 --&gt;Open Pawns set-wise&lt;/h1&gt;
 Working in the &lt;strong&gt;bitboard&lt;/strong&gt; &lt;strong&gt;centric&lt;/strong&gt; world to determine pawn related pattern &lt;strong&gt;set-wise&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
Open Pawns have no mechanical obstruction in front - an opponent pawn as member of the own &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Fills&quot;&gt;frontfill&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Spans&quot;&gt;frontspan&lt;/a&gt;. A relative complement with the opponents frontspans is sufficient to determine open pawns:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wOpenPawns(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; ~bFrontSpan(bpawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 bOpenPawns(U64 bpawns, U64 wpawns) {&amp;lt;br/&amp;gt;   return bpawns &amp;amp;amp; ~wFrontSpan(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wOpenPawns&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; ~bFrontSpan&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 bOpenPawns&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bpawns, U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; bpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; ~wFrontSpan&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:8:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:8 --&gt;What links here?&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextIncludeRule:03:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Open Pawns (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Open Pawns (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Open_Pawns_(Bitboards) includeBody-Open%20Pawns%20%28Bitboards%29 includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Backward+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Backward Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 5, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Blockade+of+Stop&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Blockade of Stop&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Defended+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Defended Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 27, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/En+prise&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;En prise&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hanging+pawns&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hanging pawns&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 5, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hanging+Piece&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hanging Piece&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Isolated+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Isolated Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 18, 2012&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Murka&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Murka&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Open+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Open Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 24, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+chain&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn chain&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawns+and+Files+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawns and Files (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 16, 2013&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:03 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Passed Pawns (Bitboards)</title>
      <link>https://chessprogramming.wikispaces.com/Passed+Pawns+%28Bitboards%29</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Passed+Pawns+%28Bitboards%29</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Passed+Pawns+%28Bitboards%29</comments>
      <pubDate>Mon, 23 Aug 2010 20:40:00 GMT</pubDate>
      <description>&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Passed Pawns&lt;/strong&gt;&lt;br /&gt;


&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;!-- ws:start:WikiTextLocalImageRule:65:&amp;lt;a href=&amp;quot;http://www.carinajorgensen.com/Chess/pawnsdream.php&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;/file/view/Pawn%27s_Dream.jpg/157879669/262x262/Pawn%27s_Dream.jpg&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;height: 262px; width: 262px;&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt; --&gt;&lt;a href=&quot;http://www.carinajorgensen.com/Chess/pawnsdream.php&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;/file/view/Pawn%27s_Dream.jpg/157879669/262x262/Pawn%27s_Dream.jpg&quot; alt=&quot;Pawn&#039;s_Dream.jpg&quot; title=&quot;Pawn&#039;s_Dream.jpg&quot; style=&quot;height: 262px; width: 262px;&quot; /&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextLocalImageRule:65 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
        &lt;td rowspan=&quot;2&quot;&gt;A &lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Passed%20Pawn&quot;&gt;passed pawn&lt;/a&gt;&lt;/strong&gt;, also called &lt;strong&gt;passer&lt;/strong&gt;, has no opponent pawns in front on the same or adjacent files. In Bitboards, passers may be determined square- or set-wise.&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Arts#Jørgensen&quot;&gt;Carina Jørgensen&lt;/a&gt;, Pawn&#039;s Dream &lt;!-- ws:start:WikiTextRefRule:6:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.carinajorgensen.com/Chess/pawnsdream.php&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Pawn&#039;s Dream&amp;lt;/a&amp;gt; 2009 by &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/Arts#Jørgensen&amp;quot;&amp;gt;Carina Jørgensen&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:6 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:start:WikiTextTocRule:20:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:20 --&gt;&lt;!-- ws:start:WikiTextTocRule:21: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Single Passer&quot;&gt;Single Passer&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:21 --&gt;&lt;!-- ws:start:WikiTextTocRule:22: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Passers set-wise&quot;&gt;Passers set-wise&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:22 --&gt;&lt;!-- ws:start:WikiTextTocRule:23: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:23 --&gt;&lt;!-- ws:start:WikiTextTocRule:24: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:24 --&gt;&lt;!-- ws:start:WikiTextTocRule:25: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#References&quot;&gt;References&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:25 --&gt;&lt;!-- ws:start:WikiTextTocRule:26: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:26 --&gt;&lt;!-- ws:start:WikiTextTocRule:27: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:27 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:28:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@SinglePasser&amp;quot; title=&amp;quot;Anchor: SinglePasser&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;SinglePasser&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:28 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:8:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Single Passer&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:8 --&gt;Single Passer&lt;/h1&gt;
 Working in the &lt;strong&gt;square centric&lt;/strong&gt; world of the board, thus using a square index of &lt;strong&gt;one&lt;/strong&gt; particular pawn, likely from &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Serialization&quot;&gt;bitboard traversal&lt;/a&gt;, to lookup pre-calculated pattern.&lt;br /&gt;
&lt;br /&gt;
For a single pawn we need to access a lookup-table to get all squares on the same file and adjacent file in front of the pawn. This is what we call front-span and attack spans. If the intersection of those span-union with the set of opponent pawns is empty, it is a passed pawn.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 arrFrontSpans[2][64];&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;if ( (arrFrontSpans[white][sqOfWhitePawn] &amp;amp;amp; pawnBB[black]) == 0 ) -&amp;amp;gt; pawn is a passer&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 arrFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;arrFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;white&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sqOfWhitePawn&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pawnBB&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;black&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; pawn is a passer&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;arrFrontSpans[white][d4]&amp;lt;br/&amp;gt;. . 1 1 1 . . .&amp;lt;br/&amp;gt;. . 1 1 1 . . .&amp;lt;br/&amp;gt;. . 1 1 1 . . .&amp;lt;br/&amp;gt;. . 1 1 1 . . .&amp;lt;br/&amp;gt;. . . p . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;arrFrontSpans[white][d4]
. . 1 1 1 . . .
. . 1 1 1 . . .
. . 1 1 1 . . .
. . 1 1 1 . . .
. . . p . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;Pawns ready to promote don&#039;t need above condition, the appearance on the 7th (or 2nd) rank is already sufficient to be a passer:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;if ( sqOfWhitePawn &amp;amp;gt;= a7 ) -&amp;amp;gt; white pawn may promote&amp;lt;br/&amp;gt;if ( sqOfBlackPawn &amp;amp;lt;= h2 ) -&amp;amp;gt; black pawn may promote&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sqOfWhitePawn &lt;span class=&quot;sy1&quot;&gt;&amp;gt;=&lt;/span&gt; a7 &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; white pawn may promote
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sqOfBlackPawn &lt;span class=&quot;sy1&quot;&gt;&amp;lt;=&lt;/span&gt; h2 &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; black pawn may promote&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:29:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@PassersSetwise&amp;quot; title=&amp;quot;Anchor: PassersSetwise&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;PassersSetwise&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:29 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:10:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Passers set-wise&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:10 --&gt;Passers set-wise&lt;/h1&gt;
 Working in the &lt;strong&gt;bitboard centric&lt;/strong&gt; world to determine pawn related pattern &lt;strong&gt;set-wise&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
Passers are the pawns &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#RelativeComplement&quot;&gt;outside&lt;/a&gt; the union of all opponent &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Spans&quot;&gt;frontspans&lt;/a&gt; and &lt;a class=&quot;wiki_link&quot; href=&quot;/Attack%20Spans&quot;&gt;attack-frontspans&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wPassedPawns(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   U64 allFrontSpans = bFrontSpans(bpawns);&amp;lt;br/&amp;gt;   allFrontSpans |= eastOne(allFrontSpans)&amp;lt;br/&amp;gt;                 |  westOne(allFrontSpans);&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; ~allFrontSpans;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 bPassedPawns(U64 bpawns, U64 wpawns) {&amp;lt;br/&amp;gt;   U64 allFrontSpans = wFrontSpans(wpawns);&amp;lt;br/&amp;gt;   allFrontSpans |= eastOne(allFrontSpans)&amp;lt;br/&amp;gt;                 |  westOne(allFrontSpans);&amp;lt;br/&amp;gt;   return bpawns &amp;amp;amp; ~allFrontSpans;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wPassedPawns&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 allFrontSpans &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   allFrontSpans &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; eastOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;allFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                 &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;  westOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;allFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; ~allFrontSpans&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 bPassedPawns&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bpawns, U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 allFrontSpans &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; wFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   allFrontSpans &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; eastOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;allFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                 &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;  westOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;allFrontSpans&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; bpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; ~allFrontSpans&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:12:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:12 --&gt;See also&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Candidate%20Passed%20Pawn&quot;&gt;Candidate Passed Pawn&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Candidates%20%28Bitboards%29&quot;&gt;Candidates (Bitboards)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Hidden%20Passed%20Pawn&quot;&gt;Hidden Passed Pawn&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Passed%20Pawn&quot;&gt;Passed Pawn&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Passed%20Pawn%20Extensions&quot;&gt;Passed Pawn Extensions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/King%20Pattern#SetwiseRuleoftheSquare&quot;&gt;Set-wise Rule of Squares&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:14:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:14 --&gt;External Links&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Passed_pawn&quot; rel=&quot;nofollow&quot;&gt;Passed pawn from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:16:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc4&quot;&gt;&lt;a name=&quot;References&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:16 --&gt;References&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextReferencesRule:123:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.carinajorgensen.com/Chess/pawnsdream.php&quot; rel=&quot;nofollow&quot;&gt;Pawn&#039;s Dream&lt;/a&gt; 2009 by &lt;a class=&quot;wiki_link&quot; href=&quot;/Arts#Jørgensen&quot;&gt;Carina Jørgensen&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:123 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:18:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc5&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:18 --&gt;What links here?&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextIncludeRule:04:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Passed Pawns (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Passed Pawns (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Passed_Pawns_(Bitboards) includeBody-Passed%20Pawns%20%28Bitboards%29 includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Attack+Spans&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Attack Spans&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 4, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Candidates+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Candidates (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Murka&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Murka&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Passed+Pawn&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Passed Pawn&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Passed+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Passed Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 23, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Spans&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Spans&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 22, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/PawnKing&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;PawnKing&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 5, 2014&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:04 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Pawn Attacks (Bitboards)</title>
      <link>https://chessprogramming.wikispaces.com/Pawn+Attacks+%28Bitboards%29</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Pawn+Attacks+%28Bitboards%29</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Pawn+Attacks+%28Bitboards%29</comments>
      <pubDate>Thu, 04 Mar 2010 17:41:49 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextTocRule:24:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:24 --&gt;&lt;!-- ws:start:WikiTextTocRule:25: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Of a Single Pawn&quot;&gt;Of a Single Pawn&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:25 --&gt;&lt;!-- ws:start:WikiTextTocRule:26: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Of a Single Pawn-Attacks&quot;&gt;Attacks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:26 --&gt;&lt;!-- ws:start:WikiTextTocRule:27: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Of a Single Pawn-Captures&quot;&gt;Captures&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:27 --&gt;&lt;!-- ws:start:WikiTextTocRule:28: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Pawns set-wise&quot;&gt;Pawns set-wise&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:28 --&gt;&lt;!-- ws:start:WikiTextTocRule:29: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Pawns set-wise-Attacks&quot;&gt;Attacks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:29 --&gt;&lt;!-- ws:start:WikiTextTocRule:30: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Pawns set-wise-Attack Maps&quot;&gt;Attack Maps&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:30 --&gt;&lt;!-- ws:start:WikiTextTocRule:31: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Pawns set-wise-Captures&quot;&gt;Captures&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:31 --&gt;&lt;!-- ws:start:WikiTextTocRule:32: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:32 --&gt;&lt;!-- ws:start:WikiTextTocRule:33: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:33 --&gt;&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Pawn Attacks&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:8:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Of a Single Pawn&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:8 --&gt;Of a Single Pawn&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextAnchorRule:34:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@AttacksOfaSinglePawn&amp;quot; title=&amp;quot;Anchor: AttacksOfaSinglePawn&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;AttacksOfaSinglePawn&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:34 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:10:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Of a Single Pawn-Attacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:10 --&gt;Attacks&lt;/h2&gt;
 To get attacks, we use a lookup of pre-calculated pawn-atacks, similar to knight- and king-attacks, except the need to consider color of the pawn.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;whitePawnAttacks = arrPawnAttacks[white][sqOfWhitePawn];&amp;lt;br/&amp;gt;if ( whitePawnAttacks &amp;amp;amp; pieceBB[black] ) -&amp;amp;gt; pseudo legal captures possible&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;whitePawnAttacks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; arrPawnAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;white&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sqOfWhitePawn&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; whitePawnAttacks &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; pieceBB&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;black&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; pseudo legal captures possible&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;arrPawnAttacks[white][d4]&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . 1 . 1 . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;arrPawnAttacks[white][d4]
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . 1 . 1 . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:12:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Of a Single Pawn-Captures&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:12 --&gt;Captures&lt;/h2&gt;
 Only intersection with the opponent pieces is required.&lt;br /&gt;
We may include a possible en-passant target square.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:14:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;Pawns set-wise&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:14 --&gt;Pawns set-wise&lt;/h1&gt;
 Working in the &lt;strong&gt;bitboard centric&lt;/strong&gt; world to determine attacks and properties set-wise.&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:35:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@PawnAttacks&amp;quot; title=&amp;quot;Anchor: PawnAttacks&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;PawnAttacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:35 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:16:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc4&quot;&gt;&lt;a name=&quot;Pawns set-wise-Attacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:16 --&gt;Attacks&lt;/h2&gt;
 Generate all squares that are attacked by pawns of a color. It makes sense to keep disjoint sets for both attacking directions. For move-gen disjoint east-west attacks has the advantage of unique source-target relation ship (+-7,9). After obtaining the direction-wise target-set a reverse shift is sufficient to get the source-set without further intersections and wrap issues.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;The code snippets rely on &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#ShiftingBitboards&quot;&gt;shifting bitboards&lt;/a&gt;, specially by &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;one step only&lt;/a&gt;.&lt;/em&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wPawnEastAttacks(U64 wpawns) {return noEaOne(wpawns);}&amp;lt;br/&amp;gt;U64 wPawnWestAttacks(U64 wpawns) {return noWeOne(wpawns);}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 bPawnEastAttacks(U64 bpawns) {return soEaOne(bpawns);}&amp;lt;br/&amp;gt;U64 bPawnWestAttacks(U64 bpawns) {return soWeOne(bpawns);}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wPawnEastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; noEaOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 wPawnWestAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; noWeOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 bPawnEastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; soEaOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 bPawnWestAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; soWeOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;A bit-wise boolean instruction to combine those disjoint sets:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wPawnAnyAttacks(U64 wpawns) {&amp;lt;br/&amp;gt;   return wPawnEastAttacks(wpawns) | wPawnWestAttacks(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wPawnDblAttacks(U64 wpawns) {&amp;lt;br/&amp;gt;   return wPawnEastAttacks(wpawns) &amp;amp;amp; wPawnWestAttacks(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wPawnSingleAttacks(U64 wpawns) {&amp;lt;br/&amp;gt;   return wPawnEastAttacks(wpawns) ^ wPawnWestAttacks(wpawns);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wPawnAnyAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wPawnEastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; wPawnWestAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wPawnDblAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wPawnEastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; wPawnWestAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wPawnSingleAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wPawnEastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;^&lt;/span&gt; wPawnWestAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;and similar for black.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt; white pawns       white pawns &amp;amp;lt;&amp;amp;lt; 9  &amp;amp;amp;       notAFile     ==   wPawnEastAttacks&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     h . . c . . . .      . 1 1 1 1 1 1 1      . . . c . . . . &amp;lt;br/&amp;gt;. . c . . . . .     . a b . d . f g      . 1 1 1 1 1 1 1      . a b . d . f g &amp;lt;br/&amp;gt;a b . d . f g h     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     / . . . . . . .      . 1 1 1 1 1 1 1      / . . . . . . . &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt; white pawns       white pawns &amp;amp;lt;&amp;amp;lt; 7  &amp;amp;amp;       notHFile     ==  wPawnWestAttacks&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      1 1 1 1 1 1 1 .      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      1 1 1 1 1 1 1 .      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      1 1 1 1 1 1 1 .      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .      1 1 1 1 1 1 1 .      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     . c . . . . . .      1 1 1 1 1 1 1 .      . c . . . . . . &amp;lt;br/&amp;gt;. . c . . . . .     b . d . f g h .      1 1 1 1 1 1 1 .      b . d . f g h . &amp;lt;br/&amp;gt;a b . d . f g h     . . . . . . . a      1 1 1 1 1 1 1 .      . . . . . . . . &amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . \      1 1 1 1 1 1 1 .      . . . . . . . \ &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt; white pawns                                                  wPawnAnyAttacks&amp;lt;br/&amp;gt;. . . . . . . .                                               . . . . . . . .  &amp;lt;br/&amp;gt;. . . . . . . .                                               . . . . . . . .  &amp;lt;br/&amp;gt;. . . . . . . .                                               . . . . . . . .  &amp;lt;br/&amp;gt;. . . . . . . .                                               . . . . . . . .  &amp;lt;br/&amp;gt;. . . . . . . .                                               . c . c . . . .  &amp;lt;br/&amp;gt;. . c . . . . .                                               b a 1 . 1 g 1 g  &amp;lt;br/&amp;gt;a b . d . f g h                                               . . . . . . . .  &amp;lt;br/&amp;gt;. . . . . . . .                                               . . . . . . . . &amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt; white pawns       white pawns &amp;lt;&amp;lt; 9  &amp;amp;       notAFile     ==   wPawnEastAttacks
. . . . . . . .     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . 
. . . . . . . .     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . 
. . . . . . . .     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . 
. . . . . . . .     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . 
. . . . . . . .     h . . c . . . .      . 1 1 1 1 1 1 1      . . . c . . . . 
. . c . . . . .     . a b . d . f g      . 1 1 1 1 1 1 1      . a b . d . f g 
a b . d . f g h     . . . . . . . .      . 1 1 1 1 1 1 1      . . . . . . . . 
. . . . . . . .     / . . . . . . .      . 1 1 1 1 1 1 1      / . . . . . . . 
&amp;nbsp;
 white pawns       white pawns &amp;lt;&amp;lt; 7  &amp;amp;       notHFile     ==  wPawnWestAttacks
. . . . . . . .     . . . . . . . .      1 1 1 1 1 1 1 .      . . . . . . . . 
. . . . . . . .     . . . . . . . .      1 1 1 1 1 1 1 .      . . . . . . . . 
. . . . . . . .     . . . . . . . .      1 1 1 1 1 1 1 .      . . . . . . . . 
. . . . . . . .     . . . . . . . .      1 1 1 1 1 1 1 .      . . . . . . . . 
. . . . . . . .     . c . . . . . .      1 1 1 1 1 1 1 .      . c . . . . . . 
. . c . . . . .     b . d . f g h .      1 1 1 1 1 1 1 .      b . d . f g h . 
a b . d . f g h     . . . . . . . a      1 1 1 1 1 1 1 .      . . . . . . . . 
. . . . . . . .     . . . . . . . \      1 1 1 1 1 1 1 .      . . . . . . . \ 
&amp;nbsp;
 white pawns                                                  wPawnAnyAttacks
. . . . . . . .                                               . . . . . . . .  
. . . . . . . .                                               . . . . . . . .  
. . . . . . . .                                               . . . . . . . .  
. . . . . . . .                                               . . . . . . . .  
. . . . . . . .                                               . c . c . . . .  
. . c . . . . .                                               b a 1 . 1 g 1 g  
a b . d . f g h                                               . . . . . . . .  
. . . . . . . .                                               . . . . . . . . &lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:36:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@PawnAttackMaps&amp;quot; title=&amp;quot;Anchor: PawnAttackMaps&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;PawnAttackMaps&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:36 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:18:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc5&quot;&gt;&lt;a name=&quot;Pawns set-wise-Attack Maps&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:18 --&gt;Attack Maps&lt;/h2&gt;
 One idea to combine pawn-attacks is about safe squares or push-targets for white respectively black pawns. A kind if of set-wise static exchange evaluation - only considering pawn-attacks from both sides. A square is assumed safe, if the number of own pawn defends if greater or equal than opponent pawn attacks. That is true if the own side defends a square twice, or the opposite side has no attacks at all, or own side attacks once and opponent not twice.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:5:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wSafePawnSquares(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   U64 wPawnEastAttacks =  wPawnEastAttacks (wpawns);&amp;lt;br/&amp;gt;   U64 wPawnWestAttacks =  wPawnWestAttacks (wpawns);&amp;lt;br/&amp;gt;   U64 bPawnEastAttacks =  bPawnEastAttacks (bpawns);&amp;lt;br/&amp;gt;   U64 bPawnWestAttacks =  bPawnWestAttacks (bpawns);&amp;lt;br/&amp;gt;   U64 wPawnDblAttacks  =  wPawnEastAttacks &amp;amp;amp;  wPawnWestAttacks;&amp;lt;br/&amp;gt;   U64 wPawnOddAttacks  =  wPawnEastAttacks ^  wPawnWestAttacks;&amp;lt;br/&amp;gt;   U64 bPawnDblAttacks  =  bPawnEastAttacks &amp;amp;amp;  bPawnWestAttacks;&amp;lt;br/&amp;gt;   U64 bPawnAnyAttacks  =  bPawnEastAttacks |  bPawnWestAttacks;&amp;lt;br/&amp;gt;   return wPawnDblAttacks |~bPawnAnyAttacks | (wPawnOddAttacks &amp;amp;amp;~bPawnDblAttacks);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wSafePawnSquares&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   U64 wPawnEastAttacks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  wPawnEastAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 wPawnWestAttacks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  wPawnWestAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 bPawnEastAttacks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  bPawnEastAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 bPawnWestAttacks &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  bPawnWestAttacks &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 wPawnDblAttacks  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  wPawnEastAttacks &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;  wPawnWestAttacks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 wPawnOddAttacks  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  wPawnEastAttacks &lt;span class=&quot;sy3&quot;&gt;^&lt;/span&gt;  wPawnWestAttacks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 bPawnDblAttacks  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  bPawnEastAttacks &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;  bPawnWestAttacks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   U64 bPawnAnyAttacks  &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt;  bPawnEastAttacks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;  bPawnWestAttacks&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wPawnDblAttacks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;~bPawnAnyAttacks &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wPawnOddAttacks &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt;~bPawnDblAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:5 --&gt;Those attack maps are among other things useful to decide about &lt;a class=&quot;wiki_link&quot; href=&quot;/Candidates%20%28Bitboards%29&quot;&gt;candidates&lt;/a&gt; and &lt;a class=&quot;wiki_link&quot; href=&quot;/Backward%20Pawns%20%28Bitboards%29&quot;&gt;backward pawns&lt;/a&gt; .&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:20:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc6&quot;&gt;&lt;a name=&quot;Pawns set-wise-Captures&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:20 --&gt;Captures&lt;/h2&gt;
 As usual, capture targets are the intersection of attack-sets with opponent pieces. Except &lt;a class=&quot;wiki_link&quot; href=&quot;/en-passant&quot;&gt;en-passant&lt;/a&gt; captures of course. A reverse shift of disjoint direction-wise sets obtains the pawns which may capture.&lt;br /&gt;
&lt;br /&gt;
To find the pawn set, which can actually capture, on the fly, we can start with the target squares as well:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:6:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wPawnsAble2CaptureEast(U64 wpawns, U64 bpieces) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; bPawnWestAttacks(bpieces);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wPawnsAble2CaptureWest(U64 wpawns, U64 bpieces) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; bPawnEastAttacks(bpieces);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wPawnsAble2CaptureAny(U64 wpawns, U64 bpieces) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; bPawnAnyAttacks(bpieces);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wPawnsAble2CaptureEast&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpieces&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; bPawnWestAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpieces&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wPawnsAble2CaptureWest&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpieces&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; bPawnEastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpieces&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wPawnsAble2CaptureAny&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpieces&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; bPawnAnyAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpieces&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:6 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:22:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc7&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:22 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:07:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Pawn Attacks (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Pawn Attacks (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Pawn_Attacks_(Bitboards) includeBody-Pawn%20Attacks%20%28Bitboards%29 includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tfoot class=&quot;includeBacklinksFooter&quot;&gt;
    &lt;tr&gt;
      &lt;td colspan=&quot;5&quot;&gt;&lt;a href=&quot;https://chessprogramming.wikispaces.com/page/links/Pawn+Attacks+%28Bitboards%29&quot;&gt;More Links&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tfoot&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Attack+and+Defend+Maps&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Attack and Defend Maps&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Attack+Spans&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Attack Spans&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 4, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Blockage+Detection&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Blockage Detection&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 19, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Candidates+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Candidates (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Defended+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Defended Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 27, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Design+Principles&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Design Principles&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/DirGolem&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;DirGolem&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Double+Attack&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Double Attack&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 22, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Efficient+Generation+of+Sliding+Piece+Attacks&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Efficient Generation of Sliding Piece Attacks&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 6, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/General+Setwise+Operations&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;General Setwise Operations&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 25, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Kaissa&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Kaissa&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Apr 9, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/MVV-LVA&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;MVV-LVA&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 26, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Attacks+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Attacks (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 4, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Levers+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Levers (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pieces+versus+Directions&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pieces versus Directions&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 6, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/SEE&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;SEE&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 14, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Square+Control&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Square Control&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 15, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Square+Mapping+Considerations&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Square Mapping Considerations&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 28, 2018&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:07 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Pawn Fills</title>
      <link>https://chessprogramming.wikispaces.com/Pawn+Fills</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Pawn+Fills</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Pawn+Fills</comments>
      <pubDate>Fri, 18 Jul 2014 12:54:18 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextTocRule:17:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:17 --&gt;&lt;!-- ws:start:WikiTextTocRule:18: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Front- and Rearfill&quot;&gt;Front- and Rearfill&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:18 --&gt;&lt;!-- ws:start:WikiTextTocRule:19: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Filefill&quot;&gt;Filefill&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:19 --&gt;&lt;!-- ws:start:WikiTextTocRule:20: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:20 --&gt;&lt;!-- ws:start:WikiTextTocRule:21: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:21 --&gt;&lt;!-- ws:start:WikiTextTocRule:22: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:22 --&gt;&lt;!-- ws:start:WikiTextTocRule:23: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:23 --&gt;&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Pawn Fills&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Vertical &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn&quot;&gt;pawn&lt;/a&gt; &lt;strong&gt;fills&lt;/strong&gt; are base of &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Spans&quot;&gt;spans&lt;/a&gt;. They are used to determine &lt;strong&gt;closed&lt;/strong&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Half-open%20file&quot;&gt;half-open&lt;/a&gt; and &lt;a class=&quot;wiki_link&quot; href=&quot;/Open%20file&quot;&gt;open&lt;/a&gt; files.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:24:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@FrontandRearFill&amp;quot; title=&amp;quot;Anchor: FrontandRearFill&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;FrontandRearFill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:24 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:7:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Front- and Rearfill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:7 --&gt;Front- and Rearfill&lt;/h1&gt;
 Frontfills and rearfills are the base of &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Spans#FrontAndRearspans&quot;&gt;front- and rearspans&lt;/a&gt;, which require one additional north/south shift. Of course whites front &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;direction&lt;/a&gt; is north, while blacks front direction is south - vice versa for the rear side.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;white frontfill     black rearfill&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 . 1 1 . . . 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     . . . 1 . . . .&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1  ^  . . . . . . . .&amp;lt;br/&amp;gt;. 1 1 . . . 1 1  |   . . . . . . . .&amp;lt;br/&amp;gt;. 1 1 . . . 1 1  |   . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .  |   . . . . . . . .&amp;lt;br/&amp;gt;               north&amp;lt;br/&amp;gt;white pawns         black pawns&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . 1 . . . 1 1 .&amp;lt;br/&amp;gt;. . . . . . . .     1 . 1 . . . . 1&amp;lt;br/&amp;gt;. . . . . . . .     . . . 1 . . . .&amp;lt;br/&amp;gt;1 . . . . 1 . .     . . . . . . . .&amp;lt;br/&amp;gt;. . 1 . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. 1 1 . . . 1 1     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;               south&amp;lt;br/&amp;gt;white rearfill      black frontfill&amp;lt;br/&amp;gt;. . . . . . . .  |  . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .  |  . 1 . . . 1 1 .&amp;lt;br/&amp;gt;. . . . . . . .  |  1 1 1 . . 1 1 1&amp;lt;br/&amp;gt;. . . . . . . .  v  1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 . . . . 1 . .     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 . 1 . . 1 . .     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;white frontfill     black rearfill
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 . 1 1 . . . 1
1 1 1 . . 1 1 1     . . . 1 . . . .
1 1 1 . . 1 1 1  ^  . . . . . . . .
. 1 1 . . . 1 1  |   . . . . . . . .
. 1 1 . . . 1 1  |   . . . . . . . .
. . . . . . . .  |   . . . . . . . .
               north
white pawns         black pawns
. . . . . . . .     . . . . . . . .
. . . . . . . .     . 1 . . . 1 1 .
. . . . . . . .     1 . 1 . . . . 1
. . . . . . . .     . . . 1 . . . .
1 . . . . 1 . .     . . . . . . . .
. . 1 . . . . .     . . . . . . . .
. 1 1 . . . 1 1     . . . . . . . .
. . . . . . . .     . . . . . . . .
               south
white rearfill      black frontfill
. . . . . . . .  |  . . . . . . . .
. . . . . . . .  |  . 1 . . . 1 1 .
. . . . . . . .  |  1 1 1 . . 1 1 1
. . . . . . . .  v  1 1 1 1 . 1 1 1
1 . . . . 1 . .     1 1 1 1 . 1 1 1
1 . 1 . . 1 . .     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms&quot;&gt;Parallel prefix&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;Kogge-Stone&lt;/a&gt;-routines are used to fill either north or south:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 nortFill(U64 gen) {&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;lt;&amp;amp;lt;  8);&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;lt;&amp;amp;lt; 16);&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;lt;&amp;amp;lt; 32);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 soutFill(U64 gen) {&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;gt;&amp;amp;gt;  8);&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;gt;&amp;amp;gt; 16);&amp;lt;br/&amp;gt;   gen |= (gen &amp;amp;gt;&amp;amp;gt; 32);&amp;lt;br/&amp;gt;   return gen;&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 nortFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 soutFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   gen &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; gen&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;Note that the pawns are still subset of their fill sets. The intersection of both north and south fills leaves the initial pawn set again. All pawns which are member of the opponent front fills have a &lt;strong&gt;mechanical obstruction&lt;/strong&gt; and are &lt;strong&gt;unfree&lt;/strong&gt;.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wFrontFill(U64 wpawns) {return nortFill(wpawns);}&amp;lt;br/&amp;gt;U64 wRearFill (U64 wpawns) {return soutFill(wpawns);}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 bFrontFill(U64 bpawns) {return soutFill(bpawns);}&amp;lt;br/&amp;gt;U64 bRearFill (U64 bpawns) {return nortFill(bpawns);}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wFrontFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; nortFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 wRearFill &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; soutFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 bFrontFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; soutFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 bRearFill &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; nortFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:25:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@FileFill&amp;quot; title=&amp;quot;Anchor: FileFill&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;FileFill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:25 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:9:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Filefill&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:9 --&gt;Filefill&lt;/h1&gt;
 The union of both front- and rearfills, leaves the complete file with at least one either white or black pawn on it. Since filefills have all ranks equal, they may treated as bytes, if it is about pure file sets.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 fileFill(U64 gen) {&amp;lt;br/&amp;gt;   return nortFill(gen) | soutFill(gen);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 fileFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; nortFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; soutFill&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;gen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;white pawns         black pawns&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . 1 . . . 1 1 .&amp;lt;br/&amp;gt;. . . . . . . .     1 . 1 . . . . 1&amp;lt;br/&amp;gt;. . . . . . . .     . . . 1 . . . .&amp;lt;br/&amp;gt;1 . . . . 1 . .     . . . . . . . .&amp;lt;br/&amp;gt;. . 1 . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. 1 1 . . . 1 1     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;white filefill      black filefill&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;br/&amp;gt;1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;white pawns         black pawns
. . . . . . . .     . . . . . . . .
. . . . . . . .     . 1 . . . 1 1 .
. . . . . . . .     1 . 1 . . . . 1
. . . . . . . .     . . . 1 . . . .
1 . . . . 1 . .     . . . . . . . .
. . 1 . . . . .     . . . . . . . .
. 1 1 . . . 1 1     . . . . . . . .
. . . . . . . .     . . . . . . . .
white filefill      black filefill
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;Based on pawns, files are either &lt;strong&gt;closed&lt;/strong&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Open%20File&quot;&gt;open&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/Half-open%20File&quot;&gt;halfopen&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:11:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:11 --&gt;See also&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20Algorithms&quot;&gt;Fill Algorithms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Half-open%20File&quot;&gt;Half-open File&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Open%20File&quot;&gt;Open File&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Parallel%20Prefix%20Algorithms&quot;&gt;Parallel Prefix Algorithms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Spans&quot;&gt;Pawn Spans&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawns%20and%20Files%20%28Bitboards%29&quot;&gt;Pawns and Files (Bitboards)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:13:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:13 --&gt;External Links&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#BillyCobham&quot;&gt;Billy Cobham&lt;/a&gt; - &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#GeorgeDuke&quot;&gt;George Duke&lt;/a&gt; Band - Juicy, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/YouTube&quot; rel=&quot;nofollow&quot;&gt;YouTube&lt;/a&gt; Video&lt;br /&gt;
feat. &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#JohnScofield&quot;&gt;John Scofield&lt;/a&gt; and &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#AlphonsoJohnson&quot;&gt;Alphonso Johnson&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Montreux_Jazz_Festival&quot; rel=&quot;nofollow&quot;&gt;Montreux Jazz Festival&lt;/a&gt;, July 6, 1976&lt;br /&gt;
&lt;!-- ws:start:WikiTextMediaRule:5:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/custom/26365642?h=0&amp;amp;w=0&amp;quot; class=&amp;quot;WikiMedia WikiMediaCustom&amp;quot; id=&amp;quot;wikitext@@media@@type=&amp;amp;quot;custom&amp;amp;quot; key=&amp;amp;quot;26365642&amp;amp;quot;&amp;quot; title=&amp;quot;Custom Media&amp;quot;/&amp;gt; --&gt;&lt;iframe width=&quot;480&quot; height=&quot;360&quot; src=&quot;//www.youtube.com/embed/Lg86di2p34c&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;!-- ws:end:WikiTextMediaRule:5 --&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:15:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc4&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:15 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:05:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Pawn Fills&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Pawn Fills&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Pawn_Fills includeBody-Pawn%20Fills includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Attack+Spans&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Attack Spans&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 4, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Candidates+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Candidates (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Dispersion+and+Distortion&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Dispersion and Distortion&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 6, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Kogge-Stone+Algorithm&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 17, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Open+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Open Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 24, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Parallel+Prefix+Algorithms&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Parallel Prefix Algorithms&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 22, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Passed+Pawn&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Passed Pawn&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Fills&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Fills&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 18, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Spans&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Spans&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 22, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/PawnKing&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;PawnKing&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 5, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawns+and+Files+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawns and Files (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 16, 2013&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Rule+of+the+Square&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Rule of the Square&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 6, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Unfree+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Unfree Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:05 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Pawn Levers (Bitboards)</title>
      <link>https://chessprogramming.wikispaces.com/Pawn+Levers+%28Bitboards%29</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Pawn+Levers+%28Bitboards%29</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Pawn+Levers+%28Bitboards%29</comments>
      <pubDate>Sat, 11 Nov 2017 09:47:44 GMT</pubDate>
      <description>&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Pawn Levers&lt;/strong&gt;&lt;br /&gt;


&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;!-- ws:start:WikiTextLocalImageRule:91:&amp;lt;a href=&amp;quot;http://www.chgs.umn.edu/museum/responses/bak/chess.html&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;/file/view/TotheRight.jpg/157868677/TotheRight.jpg&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;width: 180px;&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt; --&gt;&lt;a href=&quot;http://www.chgs.umn.edu/museum/responses/bak/chess.html&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;/file/view/TotheRight.jpg/157868677/TotheRight.jpg&quot; alt=&quot;TotheRight.jpg&quot; title=&quot;TotheRight.jpg&quot; style=&quot;width: 180px;&quot; /&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextLocalImageRule:91 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
        &lt;td rowspan=&quot;2&quot;&gt;&lt;strong&gt;Pawn Lever&lt;/strong&gt;,&lt;br /&gt;
opposing &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn&quot;&gt;pawns&lt;/a&gt; in contact that can &lt;a class=&quot;wiki_link&quot; href=&quot;/Captures&quot;&gt;capture&lt;/a&gt; each other. In chess the term lever is also used as &lt;strong&gt;option&lt;/strong&gt; to attack an opposing pawn by a &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Push&quot;&gt;push&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Push#DoublePush&quot;&gt;double push&lt;/a&gt;. In &lt;em&gt;Pawn Power in Chess&lt;/em&gt; &lt;!-- ws:start:WikiTextRefRule:10:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/Hans%20Kmoch&amp;quot;&amp;gt;Hans Kmoch&amp;lt;/a&amp;gt; (&amp;lt;strong&amp;gt;1959, 1990&amp;lt;/strong&amp;gt;). &amp;lt;em&amp;gt;Pawn Power in Chess&amp;lt;/em&amp;gt;. New York: Dover, 1990. Previous ed.: New York: McKay, 1959. ISBN 0-486-26486-6&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:10 --&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Hans%20Kmoch&quot;&gt;Hans Kmoch&lt;/a&gt; classified levers in the following way &lt;!-- ws:start:WikiTextRefRule:13:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://www.chess.com/forum/view/chess-equipment/pawn-power-in-chess-by-hans-kmoch-glossary-of-terms&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums&amp;lt;/a&amp;gt; - &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/Chess.com&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Chess.com&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-2&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:13 --&gt;:&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Arts#Bak&quot;&gt;Samuel Bak&lt;/a&gt; - To The Right &lt;!-- ws:start:WikiTextRefRule:17:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.chgs.umn.edu/museum/responses/bak/chess.html&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Chess in the Art of Samuel Bak&amp;lt;/a&amp;gt;, &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.chgs.umn.edu/&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Center for Holocaust &amp;amp;amp; Genocide Studies&amp;lt;/a&amp;gt;, &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/University_of_Minnesota&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;University of Minnesota&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-3&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-3&quot;&gt;[3]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:17 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:start:WikiTextTocRule:33:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:33 --&gt;&lt;!-- ws:start:WikiTextTocRule:34: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Lever Classification&quot;&gt;Lever Classification&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:34 --&gt;&lt;!-- ws:start:WikiTextTocRule:35: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Lever Classification-East and West Levers&quot;&gt;East and West Levers&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:35 --&gt;&lt;!-- ws:start:WikiTextTocRule:36: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Lever Classification-Inner, Outer and Center Levers&quot;&gt;Inner, Outer and Center Levers&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:36 --&gt;&lt;!-- ws:start:WikiTextTocRule:37: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:37 --&gt;&lt;!-- ws:start:WikiTextTocRule:38: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:38 --&gt;&lt;!-- ws:start:WikiTextTocRule:39: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#References&quot;&gt;References&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:39 --&gt;&lt;!-- ws:start:WikiTextTocRule:40: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:40 --&gt;&lt;!-- ws:start:WikiTextTocRule:41: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:41 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:19:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Lever Classification&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:19 --&gt;Lever Classification&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Center lever&lt;/strong&gt; - A lever wholly within the two center files.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Chain lever&lt;/strong&gt; - Adjacent levers in a diagonal formation, where the respective headpawns attack the base of the opposing chain, e.g., f5, g4 vs. g6, h5. Produces passed pawns.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fork lever&lt;/strong&gt; - A lever attacking two units at once (can include a piece).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Inner Lever&lt;/strong&gt; - A lever where the capture would move toward the center.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Loose lever&lt;/strong&gt; - A lever where each side has the option of capturing or bypassing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mute chain lever&lt;/strong&gt; - A chain lever in which the bases of the opposing pawn chains are not attacked, e.g., a5, b4, c3 vs. a7, b6, c5. Doesn&#039;t produce passers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Outer lever&lt;/strong&gt; - A lever where the capture would move away from the center.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Tight lever&lt;/strong&gt; - A lever including a ram, that offers only one side the option of both capture and bypass, e.g., c4, d4 vs. d5, e6.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;em&gt;Working in the bitboard centric world to determine pawn related pattern set-wise&lt;/em&gt;.&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:21:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Lever Classification-East and West Levers&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:21 --&gt;East and West Levers&lt;/h2&gt;
 We define lever direction by the two horizontal &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Attacks%20%28Bitboards%29#PawnAttacks&quot;&gt;attack&lt;/a&gt; directions of the pawn, not where it comes from if capturing. Whites east lever implies blacks west lever and vice versa:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;whites east lever   whites west lever&amp;lt;br/&amp;gt;is blacks west      is blacks east&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . b . . . .     . . . b . . . .&amp;lt;br/&amp;gt;. . w . . . . .     . . . . w . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;whites east lever   whites west lever
is blacks west      is blacks east
. . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .
. . . b . . . .     . . . b . . . .
. . w . . . . .     . . . . w . . .
. . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;Keeping disjoint west- or east levers...&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Code is based on &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Attacks%20%28Bitboards%29&quot;&gt;Pawn Attacks (Bitboards)&lt;/a&gt; and &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pushes%20%28Bitboards%29&quot;&gt;Pawn Pushes (Bitboards)&lt;/a&gt;.&lt;/em&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wEastLever(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; bPawnWestAttacks(bpawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wWestLever(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   return wpawns &amp;amp;amp; bPawnEastAttacks(bpawns);&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wAnyLever(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   return wEastLever(wpawns, bpawns)&amp;lt;br/&amp;gt;        | wWestLever(wpawns, bpawns);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wEastLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; bPawnWestAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wWestLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wpawns &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; bPawnEastAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wAnyLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; wEastLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns, bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; wWestLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns, bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;... makes it easier to decide about inner or outer levers.&lt;br /&gt;
&lt;br /&gt;
If it is about black levers, we can calculate them accordantly. On the other hand, if we already calculated white levers, we may simply shift them back since wraps are already considered:&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;bEastLever = wWestLever &amp;amp;lt;&amp;amp;lt; 7;&amp;lt;br/&amp;gt;bWestLever = wEastLever &amp;amp;lt;&amp;amp;lt; 9&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;bEastLever = wWestLever &amp;lt;&amp;lt; 7;
bWestLever = wEastLever &amp;lt;&amp;lt; 9&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:23:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Lever Classification-Inner, Outer and Center Levers&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:23 --&gt;Inner, Outer and Center Levers&lt;/h2&gt;
 Whites inner levers imply black outer levers and vice versa. Inner levers are usually more advantageous than outer levers.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;whites inner lever  whites outer lever&amp;lt;br/&amp;gt;is blacks outer     is blacks inner&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . b . . . b .     . b . . . . . b&amp;lt;br/&amp;gt;. w . . . . . w     . . w . . . w .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .     . . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;whites inner lever  whites outer lever
is blacks outer     is blacks inner
. . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .
. . b . . . b .     . b . . . . . b
. w . . . . . w     . . w . . . w .
. . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:4:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wInnerLever(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   const U64 abcFiles = C64(0x0707070707070707);&amp;lt;br/&amp;gt;   const U64 fghFiles = C64(0xE0E0E0E0E0E0E0E0);&amp;lt;br/&amp;gt;   return ( wEastLever(wpawns, bpawns) &amp;amp;amp; abcFiles )&amp;lt;br/&amp;gt;        | ( wWestLever(wpawns, bpawns) &amp;amp;amp; fghFiles );&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wOuterLever(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   const U64 bcdFiles = C64(0x0E0E0E0E0E0E0E0E);&amp;lt;br/&amp;gt;   const U64 efgFiles = C64(0x7070707070707070);&amp;lt;br/&amp;gt;   return ( wEastLever(wpawns, bpawns) &amp;amp;amp; efgFiles )&amp;lt;br/&amp;gt;        | ( wWestLever(wpawns, bpawns) &amp;amp;amp; bcdFiles );&amp;lt;br/&amp;gt;}&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;U64 wCenterLever(U64 wpawns, U64 bpawns) {&amp;lt;br/&amp;gt;   const U64 dFile = C64(0x0808080808080808);&amp;lt;br/&amp;gt;   const U64 eFile = C64(0x1010101010101010);&amp;lt;br/&amp;gt;   return ( wEastLever(wpawns, bpawns) &amp;amp;amp; dFile )&amp;lt;br/&amp;gt;        | ( wWestLever(wpawns, bpawns) &amp;amp;amp; eFile );&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wInnerLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 abcFiles &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x0707070707070707&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 fghFiles &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0xE0E0E0E0E0E0E0E0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wEastLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns, bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; abcFiles &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wWestLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns, bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; fghFiles &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wOuterLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 bcdFiles &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x0E0E0E0E0E0E0E0E&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 efgFiles &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x7070707070707070&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wEastLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns, bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; efgFiles &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wWestLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns, bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; bcdFiles &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
U64 wCenterLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 dFile &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x0808080808080808&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; U64 eFile &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; C64&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu12&quot;&gt;0x1010101010101010&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wEastLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns, bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; dFile &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;sy3&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wWestLever&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns, bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; eFile &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:4 --&gt;with similar code for black levers.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:25:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:25 --&gt;See also&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Defended%20Pawns%20%28Bitboards%29&quot;&gt;Defended Pawns (Bitboards)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Attacks%20%28Bitboards%29&quot;&gt;Pawn Attacks (Bitboards)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Rams%20%28Bitboards%29&quot;&gt;Pawn Rams (Bitboards)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:27:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc4&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:27 --&gt;External Links&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Lever&quot; rel=&quot;nofollow&quot;&gt;Lever from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://www.chess.com/forum/view/chess-equipment/pawn-power-in-chess-by-hans-kmoch-glossary-of-terms&quot; rel=&quot;nofollow&quot;&gt;Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums&lt;/a&gt; - &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Chess.com&quot; rel=&quot;nofollow&quot;&gt;Chess.com&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:29:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc5&quot;&gt;&lt;a name=&quot;References&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:29 --&gt;References&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextReferencesRule:166:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Hans%20Kmoch&quot;&gt;Hans Kmoch&lt;/a&gt; (&lt;strong&gt;1959, 1990&lt;/strong&gt;). &lt;em&gt;Pawn Power in Chess&lt;/em&gt;. New York: Dover, 1990. Previous ed.: New York: McKay, 1959. ISBN 0-486-26486-6&lt;/li&gt;
&lt;li id=&quot;cite_note-2&quot;&gt;&lt;a href=&quot;#cite_ref-2&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://www.chess.com/forum/view/chess-equipment/pawn-power-in-chess-by-hans-kmoch-glossary-of-terms&quot; rel=&quot;nofollow&quot;&gt;Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums&lt;/a&gt; - &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Chess.com&quot; rel=&quot;nofollow&quot;&gt;Chess.com&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-3&quot;&gt;&lt;a href=&quot;#cite_ref-3&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.chgs.umn.edu/museum/responses/bak/chess.html&quot; rel=&quot;nofollow&quot;&gt;Chess in the Art of Samuel Bak&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.chgs.umn.edu/&quot; rel=&quot;nofollow&quot;&gt;Center for Holocaust &amp;amp; Genocide Studies&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/University_of_Minnesota&quot; rel=&quot;nofollow&quot;&gt;University of Minnesota&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:166 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:31:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc6&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:31 --&gt;What links here?&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextIncludeRule:05:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Pawn Levers (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Pawn Levers (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;20&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Pawn_Levers_(Bitboards) includeBody-Pawn%20Levers%20%28Bitboards%29 includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Backward+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Backward Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 5, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Battery&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Battery&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 29, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Blockage+Detection&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Blockage Detection&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 19, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Candidates+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Candidates (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Dartmouth+CP&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Dartmouth CP&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 19, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Development&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Development&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hans+Kmoch&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hans Kmoch&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Lyudmil+Tsvetkov&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Lyudmil Tsvetkov&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 28, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Opponent+Model+Search&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Opponent Model Search&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Passed+Pawn&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Passed Pawn&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Center&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Center&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 12, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Levers+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Levers (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Rams+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Rams (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Structure&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Structure&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 2, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/PawnKing&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;PawnKing&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 5, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawns+Breakthrough&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawns Breakthrough&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 4, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Tempo&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Tempo&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:05 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Pawn Rams (Bitboards)</title>
      <link>https://chessprogramming.wikispaces.com/Pawn+Rams+%28Bitboards%29</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Pawn+Rams+%28Bitboards%29</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Pawn+Rams+%28Bitboards%29</comments>
      <pubDate>Sat, 11 Nov 2017 09:28:17 GMT</pubDate>
      <description>&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Pawn Pattern and Properties&lt;/a&gt; * Pawn Rams&lt;/strong&gt;&lt;br /&gt;


&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;!-- ws:start:WikiTextLocalImageRule:91:&amp;lt;a href=&amp;quot;http://www.chgs.umn.edu/museum/responses/bak/chess.html&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;/file/view/Locked.jpg/157869155/Locked.jpg&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;width: 200px;&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt; --&gt;&lt;a href=&quot;http://www.chgs.umn.edu/museum/responses/bak/chess.html&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;/file/view/Locked.jpg/157869155/Locked.jpg&quot; alt=&quot;Locked.jpg&quot; title=&quot;Locked.jpg&quot; style=&quot;width: 200px;&quot; /&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextLocalImageRule:91 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
        &lt;td rowspan=&quot;2&quot;&gt;&lt;strong&gt;Pawn Rams&lt;/strong&gt;, &lt;br /&gt;
all &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn&quot;&gt;pawns&lt;/a&gt; that are blocked by the opponent&#039;s pawns. A ram is a mutual mechanical obstruction. If the rammed pawn is no &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Levers%20%28Bitboards%29&quot;&gt;lever pawn&lt;/a&gt;, it becomes member of the &lt;a class=&quot;wiki_link&quot; href=&quot;/Immobile%20Pawns&quot;&gt;immobile pawns&lt;/a&gt;. Specially if other properties match, e.g. there is no or no mutual lever-possibility against the opponent counterpart, rams are a &lt;strong&gt;symptom&lt;/strong&gt; of &lt;strong&gt;congealment&lt;/strong&gt;. The term Ram or  &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://de.wikipedia.org/wiki/Widder&quot; rel=&quot;nofollow&quot;&gt;Widder&lt;/a&gt; in German (&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Ovis&quot; rel=&quot;nofollow&quot;&gt;Ovis&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Aries_%28constellation%29&quot; rel=&quot;nofollow&quot;&gt;Aries&lt;/a&gt;) was coined by &lt;a class=&quot;wiki_link&quot; href=&quot;/Hans%20Kmoch&quot;&gt;Hans Kmoch&lt;/a&gt; &lt;!-- ws:start:WikiTextRefRule:7:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/Hans%20Kmoch&amp;quot;&amp;gt;Hans Kmoch&amp;lt;/a&amp;gt; (&amp;lt;strong&amp;gt;1959, 1990&amp;lt;/strong&amp;gt;). &amp;lt;em&amp;gt;Pawn Power in Chess&amp;lt;/em&amp;gt;. New York: Dover, 1990. Previous ed.: New York: McKay, 1959. ISBN 0-486-26486-6&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:7 --&gt; &lt;!-- ws:start:WikiTextRefRule:10:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://www.chess.com/forum/view/chess-equipment/pawn-power-in-chess-by-hans-kmoch-glossary-of-terms&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums&amp;lt;/a&amp;gt; - &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/Chess.com&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Chess.com&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-2&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:10 --&gt;. Rammed none lever pawns in the &lt;a class=&quot;wiki_link&quot; href=&quot;/Center&quot;&gt;center&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/Center#ExtendedCenter&quot;&gt;extended center&lt;/a&gt; are most important to decide about &lt;a class=&quot;wiki_link&quot; href=&quot;/Bad%20Bishop&quot;&gt;bad bishops&lt;/a&gt;.&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Arts#Bak&quot;&gt;Samuel Bak&lt;/a&gt; - Locked &lt;!-- ws:start:WikiTextRefRule:14:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.chgs.umn.edu/museum/responses/bak/chess.html&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Chess in the Art of Samuel Bak&amp;lt;/a&amp;gt;, &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.chgs.umn.edu/&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Center for Holocaust &amp;amp;amp; Genocide Studies&amp;lt;/a&amp;gt;, &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/University_of_Minnesota&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;University of Minnesota&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-3&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-3&quot;&gt;[3]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:14 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:start:WikiTextTocRule:36:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:36 --&gt;&lt;!-- ws:start:WikiTextTocRule:37: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Blocked Positions&quot;&gt;Blocked Positions&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:37 --&gt;&lt;!-- ws:start:WikiTextTocRule:38: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Code&quot;&gt;Code&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:38 --&gt;&lt;!-- ws:start:WikiTextTocRule:39: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Mutual Mechanical Obstruction&quot;&gt;Mutual Mechanical Obstruction&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:39 --&gt;&lt;!-- ws:start:WikiTextTocRule:40: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:40 --&gt;&lt;!-- ws:start:WikiTextTocRule:41: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Forum Posts&quot;&gt;Forum Posts&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:41 --&gt;&lt;!-- ws:start:WikiTextTocRule:42: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:42 --&gt;&lt;!-- ws:start:WikiTextTocRule:43: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#References&quot;&gt;References&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:43 --&gt;&lt;!-- ws:start:WikiTextTocRule:44: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:44 --&gt;&lt;!-- ws:start:WikiTextTocRule:45: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:45 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:20:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Blocked Positions&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:20 --&gt;Blocked Positions&lt;/h1&gt;
Three or four &lt;a class=&quot;wiki_link&quot; href=&quot;/Isolated%20Pawn&quot;&gt;isolated&lt;/a&gt; rams are a perfect barrier - no path for either king to enter to opposite area.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. b . . b . . b&amp;lt;br/&amp;gt;. w . . w . . w&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;br/&amp;gt;. . . . . . . .&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;. . . . . . . .
. . . . . . . .
. . . . . . . .
. b . . b . . b
. w . . w . . w
. . . . . . . .
. . . . . . . .
. . . . . . . .&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:22:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Code&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:22 --&gt;Code&lt;/h1&gt;
 &lt;em&gt;Working in the bitboard centric world to determine &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn&quot;&gt;pawn&lt;/a&gt; related pattern set-wise.&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;The code snippets rely on &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#ShiftingBitboards&quot;&gt;shifting bitboards&lt;/a&gt;, specially by &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;one step only&lt;/a&gt;.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;U64 wRam(U64 wpawns, U64 bpawns) {return soutOne(bpawns) &amp;amp;amp; wpawns;}&amp;lt;br/&amp;gt;U64 bRam(U64 wpawns, U64 bpawns) {return nortOne(wpawns) &amp;amp;amp; bpawns;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;U64 wRam&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; soutOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; wpawns&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
U64 bRam&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;U64 wpawns, U64 bpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; nortOne&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wpawns&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; bpawns&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;Obviously the number of white rammed pawns is equal to the number of black rammed pawns.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:24:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Mutual Mechanical Obstruction&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:24 --&gt;Mutual Mechanical Obstruction&lt;/h1&gt;


&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;!-- ws:start:WikiTextLocalImageRule:93:&amp;lt;a href=&amp;quot;http://flickr.com/photos/olaf_k/2079888707/&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;/file/view/Widder.jpg/157869365/580x389/Widder.jpg&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;height: 389px; width: 580px;&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt; --&gt;&lt;a href=&quot;http://flickr.com/photos/olaf_k/2079888707/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;/file/view/Widder.jpg/157869365/580x389/Widder.jpg&quot; alt=&quot;Widder.jpg&quot; title=&quot;Widder.jpg&quot; style=&quot;height: 389px; width: 580px;&quot; /&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextLocalImageRule:93 --&gt;&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Mutual Mechanical Obstruction &lt;!-- ws:start:WikiTextRefRule:18:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.flickr.com/photos/olaf_k/2079888707/&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Kämpfende Steinböcke ... fighting ibex&amp;lt;/a&amp;gt; from &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.flickr.com/&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Flickr - Fotosharing!&amp;lt;/a&amp;gt;, &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.kleinwegen.net/&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;kleinwegen.net&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-4&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-4&quot;&gt;[4]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:18 --&gt;&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:26:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:26 --&gt;See also&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Backward%20Pawn&quot;&gt;Backward Pawn&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Blockade&quot;&gt;Blockade&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Blockage%20Detection&quot;&gt;Blockage Detection&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:28:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc4&quot;&gt;&lt;a name=&quot;Forum Posts&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:28 --&gt;Forum Posts&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://groups.google.com/group/gnu.chess/browse_frm/thread/37bbd87f491aa673&quot; rel=&quot;nofollow&quot;&gt;Pawn ram code in gnuchess&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Chua%20Kong%20Sian&quot;&gt;Chua Kong Sian&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/GNU%20Chess#NewsGroup&quot;&gt;gnu.chess&lt;/a&gt;, June 18, 1994&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:30:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc5&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:30 --&gt;External Links&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://www.chess.com/forum/view/chess-equipment/pawn-power-in-chess-by-hans-kmoch-glossary-of-terms&quot; rel=&quot;nofollow&quot;&gt;Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums&lt;/a&gt; - &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Chess.com&quot; rel=&quot;nofollow&quot;&gt;Chess.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://perl.guru.org/scott/hobbies/chess/&quot; rel=&quot;nofollow&quot;&gt;Monsoon/Typhoon Homepage&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Scott%20Gasch&quot;&gt;Scott Gasch&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:32:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc6&quot;&gt;&lt;a name=&quot;References&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:32 --&gt;References&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextReferencesRule:159:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Hans%20Kmoch&quot;&gt;Hans Kmoch&lt;/a&gt; (&lt;strong&gt;1959, 1990&lt;/strong&gt;). &lt;em&gt;Pawn Power in Chess&lt;/em&gt;. New York: Dover, 1990. Previous ed.: New York: McKay, 1959. ISBN 0-486-26486-6&lt;/li&gt;
&lt;li id=&quot;cite_note-2&quot;&gt;&lt;a href=&quot;#cite_ref-2&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://www.chess.com/forum/view/chess-equipment/pawn-power-in-chess-by-hans-kmoch-glossary-of-terms&quot; rel=&quot;nofollow&quot;&gt;Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums&lt;/a&gt; - &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Chess.com&quot; rel=&quot;nofollow&quot;&gt;Chess.com&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-3&quot;&gt;&lt;a href=&quot;#cite_ref-3&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.chgs.umn.edu/museum/responses/bak/chess.html&quot; rel=&quot;nofollow&quot;&gt;Chess in the Art of Samuel Bak&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.chgs.umn.edu/&quot; rel=&quot;nofollow&quot;&gt;Center for Holocaust &amp;amp; Genocide Studies&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/University_of_Minnesota&quot; rel=&quot;nofollow&quot;&gt;University of Minnesota&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-4&quot;&gt;&lt;a href=&quot;#cite_ref-4&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.flickr.com/photos/olaf_k/2079888707/&quot; rel=&quot;nofollow&quot;&gt;Kämpfende Steinböcke ... fighting ibex&lt;/a&gt; from &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.flickr.com/&quot; rel=&quot;nofollow&quot;&gt;Flickr - Fotosharing!&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.kleinwegen.net/&quot; rel=&quot;nofollow&quot;&gt;kleinwegen.net&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:159 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:34:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc7&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:34 --&gt;What links here?&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextIncludeRule:02:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Pawn Rams (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;30&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Pawn Rams (Bitboards)&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;30&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Pawn_Rams_(Bitboards) includeBody-Pawn%20Rams%20%28Bitboards%29 includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Backward+Pawns+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Backward Pawns (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 5, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Bad+bishop&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Bad bishop&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 22, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Blockade+of+Stop&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Blockade of Stop&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Blockage+Detection&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Blockage Detection&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 19, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Candidates+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Candidates (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Denis+Onneweer&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Denis Onneweer&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 3, 2012&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Design+Principles&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Design Principles&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hans+Kmoch&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hans Kmoch&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Hidden+Passed+Pawn&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Hidden Passed Pawn&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Middlegame&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Middlegame&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 6, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Najib+Nakad&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Najib Nakad&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 22, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Opponent+Model+Search&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Opponent Model Search&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Aug 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Center&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Center&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 12, 2015&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+chain&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn chain&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 17, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Endgame&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Endgame&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Levers+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Levers (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Pattern+and+Properties&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Pattern and Properties&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Rams+%28Bitboards%29&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Rams (Bitboards)&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 11, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawn+Structure&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawn Structure&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 2, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pawns+Breakthrough&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pawns Breakthrough&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 4, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Ramjet&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Ramjet&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 27, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Stalemate&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Stalemate&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Feb 21, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Vajolet&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Vajolet&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 25, 2018&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:02 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pattern%20and%20Properties&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Pieces versus Directions</title>
      <link>https://chessprogramming.wikispaces.com/Pieces+versus+Directions</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Pieces+versus+Directions</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Pieces+versus+Directions</comments>
      <pubDate>Thu, 06 Oct 2016 20:21:40 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextTocRule:26:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:26 --&gt;&lt;!-- ws:start:WikiTextTocRule:27: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Piece by Piece&quot;&gt;Piece by Piece&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:27 --&gt;&lt;!-- ws:start:WikiTextTocRule:28: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Directions&quot;&gt;Directions&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:28 --&gt;&lt;!-- ws:start:WikiTextTocRule:29: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Hybrid&quot;&gt;Hybrid&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:29 --&gt;&lt;!-- ws:start:WikiTextTocRule:30: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:30 --&gt;&lt;!-- ws:start:WikiTextTocRule:31: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:31 --&gt;&lt;!-- ws:start:WikiTextTocRule:32: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#References&quot;&gt;References&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:32 --&gt;&lt;!-- ws:start:WikiTextTocRule:33: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#What links here?&quot;&gt;What links here?&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:33 --&gt;&lt;!-- ws:start:WikiTextTocRule:34: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:34 --&gt;&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * Pieces versus Directions&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Despite the &lt;a class=&quot;wiki_link&quot; href=&quot;/Move%20Generation&quot;&gt;generation of moves&lt;/a&gt; to one &lt;a class=&quot;wiki_link&quot; href=&quot;/Target%20Square&quot;&gt;target square&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Pieces&quot;&gt;pieces&lt;/a&gt; from different &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;directions&lt;/a&gt; as mentioned &lt;a class=&quot;wiki_link&quot; href=&quot;/Square%20Attacked%20By&quot;&gt;Square Attacked By&lt;/a&gt;, there are two approaches to &lt;a class=&quot;wiki_link&quot; href=&quot;/Move%20Generation&quot;&gt;generate&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Moves&quot;&gt;moves&lt;/a&gt; in an &lt;a class=&quot;wiki_link&quot; href=&quot;/Origin%20Square&quot;&gt;origin centric&lt;/a&gt; manner to determine a set of distinct target squares. The classical approach, also applied in &lt;a class=&quot;wiki_link&quot; href=&quot;/Mailbox&quot;&gt;Mailbox&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/Array&quot;&gt;array&lt;/a&gt; representation, is to generate &lt;a class=&quot;wiki_link&quot; href=&quot;/Attacks&quot;&gt;attacks&lt;/a&gt; and moves piece by piece. Alternately there are set-wise approaches, to determine distinct direction attacks for sets of multiple pieces and &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn&quot;&gt;pawns&lt;/a&gt;. &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Pieces&quot;&gt;Sliding pieces&lt;/a&gt; rely on &lt;a class=&quot;wiki_link&quot; href=&quot;/Dumb7Fill&quot;&gt;dumb7fill&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;kogge-stone algorithm&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20by%20Subtraction&quot;&gt;fill by subtraction&lt;/a&gt;.&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:35:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@PieceByPiece&amp;quot; title=&amp;quot;Anchor: PieceByPiece&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;PieceByPiece&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:35 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:12:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Piece by Piece&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:12 --&gt;Piece by Piece&lt;/h1&gt;
 In general there are lookup techniques to determine attack- or move-target sets for each individual &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn&quot;&gt;pawn&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/Pieces&quot;&gt;piece&lt;/a&gt;, indexed by &lt;a class=&quot;wiki_link&quot; href=&quot;/BitScan&quot;&gt;bitscanned&lt;/a&gt; square and for the sliders by occupancy. Each piece-wise attack covers all their inherited &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;ray- or knight directions&lt;/a&gt;. This classical approach traverses all pieces and generates attack sets and move sets by following techniques:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Push&quot;&gt;Pawn Push&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Attacks%20%28Bitboards%29#AttacksOfaSinglePawn&quot;&gt;Attacks of a Single Pawn&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Knight%20Pattern#ByLookup&quot;&gt;Knight Attacks by Lookup&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/King%20Pattern#KingAttacks&quot;&gt;King Attacks by Lookup&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Piece%20Attacks#SingleSlidingPieceAttacks&quot;&gt;Single Sliding Piece Attacks&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
As usual, &lt;a class=&quot;wiki_link&quot; href=&quot;/Captures&quot;&gt;captures&lt;/a&gt; are determined by &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#Intersection&quot;&gt;intersection&lt;/a&gt; of attacks with opponent pieces or &lt;a class=&quot;wiki_link&quot; href=&quot;/En%20passant&quot;&gt;en passant&lt;/a&gt; target, while all other attacks or push targets of empty squares are &lt;a class=&quot;wiki_link&quot; href=&quot;/Quiet%20Moves&quot;&gt;quiet moves&lt;/a&gt;.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;for all pieces {&amp;lt;br/&amp;gt;  generateMovetargets(piece);&amp;lt;br/&amp;gt;  for all capture targets&amp;lt;br/&amp;gt;      generate captures (move or capture list)&amp;lt;br/&amp;gt;  for all empty square targets&amp;lt;br/&amp;gt;      generate quite moves (move list)&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;for all pieces {
  generateMovetargets(piece);
  for all capture targets
      generate captures (move or capture list)
  for all empty square targets
      generate quite moves (move list)
}&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:36:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@DirectionWise&amp;quot; title=&amp;quot;Anchor: DirectionWise&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;DirectionWise&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:36 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:14:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Directions&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:14 --&gt;Directions&lt;/h1&gt;
 The &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;direction-wise&lt;/a&gt; approach relies on following set-wise techniques to determine move-targets. As usual, &lt;a class=&quot;wiki_link&quot; href=&quot;/Captures&quot;&gt;captures&lt;/a&gt; are determined by &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#Intersection&quot;&gt;intersection&lt;/a&gt; of attacks with opponent pieces or &lt;a class=&quot;wiki_link&quot; href=&quot;/En%20passant&quot;&gt;en passant&lt;/a&gt; target, while all other attacks or push targets of empty squares are &lt;a class=&quot;wiki_link&quot; href=&quot;/Quiet%20Moves&quot;&gt;quiet moves&lt;/a&gt;.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Pushes%20%28Bitboards%29#PawnPushSetwise&quot;&gt;Pushes set-wise&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn%20Attacks%20%28Bitboards%29#PawnAttacks&quot;&gt;Pawn Attacks set-wise&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Knight%20Pattern#MultipleKnightAttacks&quot;&gt;Multiple Knight Attacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/King%20Pattern#byCalculation&quot;&gt;King Attacks by Calculation&lt;/a&gt; with &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#OneStepOnly&quot;&gt;Direction-Steps&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Piece%20Attacks#Multiple&quot;&gt;Multiple Sliding Pieces&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
For &lt;a class=&quot;wiki_link&quot; href=&quot;/Move%20Generation&quot;&gt;move generation&lt;/a&gt; purpose one may store target-sets of different piece types per direction. Thus, 16 bitboards as a kind of unsorted &lt;a class=&quot;wiki_link&quot; href=&quot;/Move%20List&quot;&gt;move list&lt;/a&gt;. Each &lt;a class=&quot;wiki_link&quot; href=&quot;/Target%20Square&quot;&gt;target square&lt;/a&gt; in each ray-direction set has an unique one-to-one relation to it&#039;s &lt;a class=&quot;wiki_link&quot; href=&quot;/Origin%20Square&quot;&gt;source square&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;for all 16 ray- and knight directions {&amp;lt;br/&amp;gt;  generateMovetargets(dirtargets[dir], dir);&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;for all 16 ray- and knight directions {
  generateMovetargets(dirtargets[dir], dir);
}&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;Likely this loop is unrolled - at least for the ray-attacks - where pawns, kings, bishops, rooks or queens may involved. See the proposal of &lt;a class=&quot;wiki_link&quot; href=&quot;/DirGolem&quot;&gt;DirGolem&lt;/a&gt; for a branch-less direction-wise generation of &lt;a class=&quot;wiki_link&quot; href=&quot;/Legal%20Move&quot;&gt;legal moves&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
An incremental &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://en.wikipedia.org/wiki/Finite_state_machine&quot; rel=&quot;nofollow&quot;&gt;finite state machine&lt;/a&gt; - move-getter may scan and reset the target squares per direction. For distant source squares of &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Pieces&quot;&gt;sliding pieces&lt;/a&gt;, one may &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#Intersection&quot;&gt;intersect&lt;/a&gt; the &lt;a class=&quot;wiki_link&quot; href=&quot;/On%20an%20empty%20Board#RayAttacks&quot;&gt;ray-wise masks&lt;/a&gt; per direction and &lt;a class=&quot;wiki_link&quot; href=&quot;/Target%20Square&quot;&gt;target-square&lt;/a&gt; with the occupancy - to use either &lt;a class=&quot;wiki_link&quot; href=&quot;/BitScan&quot;&gt;bitscan&lt;/a&gt; &lt;a class=&quot;wiki_link&quot; href=&quot;/BitScan#Bitscanreverse&quot;&gt;reverse&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/BitScan#Bitscanforward&quot;&gt;forward&lt;/a&gt; for the &lt;a class=&quot;wiki_link&quot; href=&quot;/On%20an%20empty%20Board#PositiveRays&quot;&gt;positive&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/On%20an%20empty%20Board#NegativeRays&quot;&gt;negative&lt;/a&gt; directions - similar to the &lt;a class=&quot;wiki_link&quot; href=&quot;/Classical%20Approach&quot;&gt;classical approach&lt;/a&gt;, except one don&#039;t needs the if (blocker) - condition, which is always true. However, one may delay determining the source square and moving piece until &lt;a class=&quot;wiki_link&quot; href=&quot;/Make%20Move&quot;&gt;make move&lt;/a&gt; time, and to &lt;a class=&quot;wiki_link&quot; href=&quot;/Encoding%20Moves&quot;&gt;encode moves&lt;/a&gt; uniquely with target square (six bits) and direction (4 bits).  &lt;br /&gt;
&lt;br /&gt;
Alternatively, one may process a ray in one run, to bitscan the most farthest &lt;a class=&quot;wiki_link&quot; href=&quot;/Target%20Square&quot;&gt;destination square&lt;/a&gt; from one distinct direction, i.e. bitscan reverse of positive ray attacks, and to loop over all intermediate targets by adding offsets until the source square is arrived. The below loop considers that move-target bits may already reset due to staged move generation, i.e. &lt;a class=&quot;wiki_link&quot; href=&quot;/Hash%20Move&quot;&gt;hash move&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/Killer%20Move&quot;&gt;killer moves&lt;/a&gt; may already tried. Therefor the extra condition with &lt;em&gt;testAndResetBit&lt;/em&gt; &lt;!-- ws:start:WikiTextRefRule:4:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://msdn.microsoft.com/en-us/library/hd0hzyf8%28VS.100%29.aspx&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;_bittestandreset, _bittestandreset64&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:4 --&gt;.&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;cpp&amp;quot;&amp;gt;while ( northMoveTargets )&amp;lt;br/&amp;gt;{&amp;lt;br/&amp;gt;    targetSquare = bitScanReverse( northMoveTargets );&amp;lt;br/&amp;gt;    sourceSquare = bitScanReverse( rayAttacks[sout][targetSquare] &amp;amp;amp; occupied);&amp;lt;br/&amp;gt;    storeMoveOrCapture( sourceSquare, targetSquare); &amp;lt;br/&amp;gt;    resetBit (northMoveTargets, targetSquare);&amp;lt;br/&amp;gt;    targetSquare -= 8; &amp;lt;br/&amp;gt;    while ( targetSquare &amp;amp;gt; sourceSquare) {&amp;lt;br/&amp;gt;       if ( testAndResetBit (northMoveTargets, targetSquare) )&amp;lt;br/&amp;gt;          storeMove( sourceSquare, targetSquare); &amp;lt;br/&amp;gt;       targetSquare -= 8; &amp;lt;br/&amp;gt;    }&amp;lt;br/&amp;gt;}&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.cpp  {font-family:monospace;}
.cpp .imp {font-weight: bold; color: red;}
.cpp .kw1 {color: #0000ff;}
.cpp .kw2 {color: #0000ff;}
.cpp .kw3 {color: #0000dd;}
.cpp .kw4 {color: #0000ff;}
.cpp .co1 {color: #666666;}
.cpp .co2 {color: #339900;}
.cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp .es0 {color: #000099; font-weight: bold;}
.cpp .es1 {color: #000099; font-weight: bold;}
.cpp .es2 {color: #660099; font-weight: bold;}
.cpp .es3 {color: #660099; font-weight: bold;}
.cpp .es4 {color: #660099; font-weight: bold;}
.cpp .es5 {color: #006699; font-weight: bold;}
.cpp .br0 {color: #008000;}
.cpp .sy0 {color: #008000;}
.cpp .sy1 {color: #000080;}
.cpp .sy2 {color: #000040;}
.cpp .sy3 {color: #000040;}
.cpp .sy4 {color: #008080;}
.cpp .st0 {color: #FF0000;}
.cpp .nu0 {color: #0000dd;}
.cpp .nu6 {color: #208080;}
.cpp .nu8 {color: #208080;}
.cpp .nu12 {color: #208080;}
.cpp .nu16 {color:#800080;}
.cpp .nu17 {color:#800080;}
.cpp .nu18 {color:#800080;}
.cpp .nu19 {color:#800080;}
.cpp .me1 {color: #007788;}
.cpp .me2 {color: #007788;}
.cpp span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; northMoveTargets &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    targetSquare &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bitScanReverse&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; northMoveTargets &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
    sourceSquare &lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; bitScanReverse&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; rayAttacks&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;sout&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;targetSquare&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy3&quot;&gt;&amp;amp;&lt;/span&gt; occupied&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
    storeMoveOrCapture&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sourceSquare, targetSquare&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; 
    resetBit &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;northMoveTargets, targetSquare&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt;
    targetSquare &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; targetSquare &lt;span class=&quot;sy1&quot;&gt;&amp;gt;&lt;/span&gt; sourceSquare&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
       &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; testAndResetBit &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;northMoveTargets, targetSquare&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
          storeMove&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sourceSquare, targetSquare&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; 
       targetSquare &lt;span class=&quot;sy2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;sy1&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy4&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:16:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Hybrid&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:16 --&gt;Hybrid&lt;/h1&gt;
 One may combine both approaches with usual &lt;a class=&quot;wiki_link&quot; href=&quot;/Move%20List&quot;&gt;move lists&lt;/a&gt;. For instance direction-wise attacks for all pawns, piece-wise attacks for none-pawns. The target set-of pawn-captures should be considered early, since this are winning or at least equal captures.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:18:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc3&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:18 --&gt;See also&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Serialization&quot;&gt;Bitboard Serialization&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/BitScan&quot;&gt;BitScan&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Classical%20Approach&quot;&gt;Classical Approach&lt;/a&gt; of &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Piece%20Attacks&quot;&gt;Sliding Piece Attacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/DirGolem&quot;&gt;DirGolem&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Move%20Generation&quot;&gt;Move Generation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Square%20Attacked%20By&quot;&gt;Square Attacked By&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:20:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc4&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:20 --&gt;External Links&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#MilesDavis&quot;&gt;Miles Davis&lt;/a&gt; - &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/A_Different_Kind_of_Blue&quot; rel=&quot;nofollow&quot;&gt;Call It Anything&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Isle_of_Wight_Festival_1970&quot; rel=&quot;nofollow&quot;&gt;Isle of Wight Festival&lt;/a&gt;, August 29, 1970,  &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/YouTube&quot; rel=&quot;nofollow&quot;&gt;YouTube&lt;/a&gt; Video&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#MilesDavis&quot;&gt;Miles Davis&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Gary_Bartz&quot; rel=&quot;nofollow&quot;&gt;Gary Bartz&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#ChickCorea&quot;&gt;Chick Corea&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#KeithJarrett&quot;&gt;Keith Jarrett&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#DaveHolland&quot;&gt;Dave Holland&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#JackDeJohnette&quot;&gt;Jack DeJohnette&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#AirtoMoreira&quot;&gt;Airto Moreira&lt;/a&gt; &lt;!-- ws:start:WikiTextRefRule:7:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://answers.yahoo.com/question/index?qid=20101214072119AASF0pn&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Does anyone know the name of the instrument Airto Moreira uses during the Isle of Wight Festival (1970)?&amp;lt;/a&amp;gt; | &amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/Yahoo!_Answers&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Yahoo! Answers&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-2&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:7 --&gt; &lt;!-- ws:start:WikiTextRefRule:9:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;https://en.wikipedia.org/wiki/Cu%C3%ADca&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Cuíca from Wikipedia&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-3&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-3&quot;&gt;[3]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:9 --&gt;&lt;br /&gt;
&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Bitches_Brew_Live#Track_listing&quot; rel=&quot;nofollow&quot;&gt;Directions&lt;/a&gt; (&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#JoeZawinul&quot;&gt;Joe Zawinul&lt;/a&gt;)  0:00 (7:30), &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Bitches_Brew&quot; rel=&quot;nofollow&quot;&gt;Bitches Brew&lt;/a&gt; 7:30 (10:09), &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Live_at_the_Fillmore_East,_March_7,_1970:_It%27s_About_that_Time&quot; rel=&quot;nofollow&quot;&gt;It&#039;s About That Time&lt;/a&gt; 17:39 (6:17),&lt;br /&gt;
&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Bitches_Brew#Track_listing&quot; rel=&quot;nofollow&quot;&gt;Sanctuary&lt;/a&gt; (&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#WayneShorter&quot;&gt;Wayne Shorter&lt;/a&gt;) 23:56 (1:10), &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Bitches_Brew&quot; rel=&quot;nofollow&quot;&gt;Spanish Key&lt;/a&gt; 25:06 (8:15), &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Bitches_Brew_Live&quot; rel=&quot;nofollow&quot;&gt;The Theme&lt;/a&gt; 33:21 (2:10)&lt;br /&gt;
&lt;!-- ws:start:WikiTextMediaRule:10:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/youtube/qyJooHmRcdc?h=315&amp;amp;w=560&amp;quot; class=&amp;quot;WikiMedia WikiMediaYoutube&amp;quot; id=&amp;quot;wikitext@@media@@type=&amp;amp;quot;youtube&amp;amp;quot; key=&amp;amp;quot;qyJooHmRcdc&amp;amp;quot;&amp;quot; title=&amp;quot;YouTube Video&amp;quot;height=&amp;quot;315&amp;quot; width=&amp;quot;560&amp;quot;/&amp;gt; --&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/qyJooHmRcdc&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;!-- ws:end:WikiTextMediaRule:10 --&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:22:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc5&quot;&gt;&lt;a name=&quot;References&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:22 --&gt;References&lt;/h1&gt;
&lt;!-- ws:start:WikiTextReferencesRule:207:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://msdn.microsoft.com/en-us/library/hd0hzyf8%28VS.100%29.aspx&quot; rel=&quot;nofollow&quot;&gt;_bittestandreset, _bittestandreset64&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-2&quot;&gt;&lt;a href=&quot;#cite_ref-2&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://answers.yahoo.com/question/index?qid=20101214072119AASF0pn&quot; rel=&quot;nofollow&quot;&gt;Does anyone know the name of the instrument Airto Moreira uses during the Isle of Wight Festival (1970)?&lt;/a&gt; | &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Yahoo!_Answers&quot; rel=&quot;nofollow&quot;&gt;Yahoo! Answers&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-3&quot;&gt;&lt;a href=&quot;#cite_ref-3&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Cu%C3%ADca&quot; rel=&quot;nofollow&quot;&gt;Cuíca from Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:207 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:24:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc6&quot;&gt;&lt;a name=&quot;What links here?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:24 --&gt;What links here?&lt;/h1&gt;
&lt;!-- ws:start:WikiTextIncludeRule:03:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/include/backlinks?w=200&amp;amp;h=100&amp;quot; class=&amp;quot;WikiMedia WikiMediaInclude&amp;quot; id=&amp;quot;wikitext@@include@@page=&amp;amp;quot;Pieces versus Directions&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;80&amp;amp;quot;&amp;quot; title=&amp;quot;Include backlinks: page=&amp;amp;quot;Pieces versus Directions&amp;amp;quot; component=&amp;amp;quot;backlinks&amp;amp;quot; limit=&amp;amp;quot;80&amp;amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;includeBody-Pieces_versus_Directions includeBody-Pieces%20versus%20Directions includeBody&quot;&gt;&lt;table class=&quot;includeBacklinks&quot;&gt;
  &lt;thead&gt;
    &lt;tr class=&quot;includeBacklinksHeading&quot;&gt;
      &lt;th class=&quot;includeBacklinksPageHeading&quot;&gt;Page&lt;/th&gt;
      &lt;th class=&quot;includeBacklinksDateHeading&quot;&gt;Date Edited&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Attack+and+Defend+Maps&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Attack and Defend Maps&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Bitboard+Serialization&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Bitboard Serialization&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Dec 24, 2014&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Bitboards&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Bitboards&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Nov 14, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Classical+Approach&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Classical Approach&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 28, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Direction&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Direction&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 6, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/DirGolem&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;DirGolem&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jun 5, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Dumb7Fill&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Dumb7Fill&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;May 27, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Encoding+Moves&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Encoding Moves&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 27, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Fill+by+Subtraction&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Fill by Subtraction&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Mar 5, 2010&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Kogge-Stone+Algorithm&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Sep 17, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Move+Generation&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Move Generation&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jan 29, 2018&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Move+List&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Move List&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Jul 19, 2017&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Origin+Square&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Origin Square&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 10, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Pieces+versus+Directions&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Pieces versus Directions&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 6, 2016&lt;/td&gt;
    &lt;/tr&gt;
        &lt;tr class=&quot;includeBacklinksLink&quot;&gt;
      &lt;td class=&quot;includeBacklinksLinkPage&quot;&gt;
        &lt;a href=&quot;https://chessprogramming.wikispaces.com/Target+Square&quot; class=&quot;includeBacklinksLinkUrl&quot;&gt;Target Square&lt;/a&gt;
      &lt;/td&gt;
      &lt;td class=&quot;includeBacklinksLinkDate&quot;&gt;Oct 26, 2017&lt;/td&gt;
    &lt;/tr&gt;
      &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextIncludeRule:03 --&gt;&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>
    <item>
      <title>Sliding Piece Attacks</title>
      <link>https://chessprogramming.wikispaces.com/Sliding+Piece+Attacks</link>
      <dc:creator>GerdIsenberg</dc:creator>
      <guid isPermaLink="true">https://chessprogramming.wikispaces.com/Sliding+Piece+Attacks</guid>
      <comments>https://chessprogramming.wikispaces.com/page/messages/Sliding+Piece+Attacks</comments>
      <pubDate>Fri, 27 May 2016 12:50:03 GMT</pubDate>
      <description>&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Home&quot;&gt;Home&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Board%20Representation&quot;&gt;Board Representation&lt;/a&gt; * &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Bitboards&lt;/a&gt; * Sliding Piece Attacks&lt;/strong&gt;&lt;br /&gt;


&lt;table class=&quot;wiki_table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;!-- ws:start:WikiTextLocalImageRule:215:&amp;lt;a href=&amp;quot;http://www.carinajorgensen.com/Chess/queensstar.php&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;/file/view/Queen%27s_Star.jpg/157880137/267x262/Queen%27s_Star.jpg&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;height: 262px; width: 267px;&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt; --&gt;&lt;a href=&quot;http://www.carinajorgensen.com/Chess/queensstar.php&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;/file/view/Queen%27s_Star.jpg/157880137/267x262/Queen%27s_Star.jpg&quot; alt=&quot;Queen&#039;s_Star.jpg&quot; title=&quot;Queen&#039;s_Star.jpg&quot; style=&quot;height: 262px; width: 267px;&quot; /&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextLocalImageRule:215 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
        &lt;td rowspan=&quot;2&quot;&gt;This is basically about how to calculate attack-sets of &lt;a class=&quot;wiki_link&quot; href=&quot;/Sliding%20Pieces&quot;&gt;sliding pieces&lt;/a&gt; for &lt;a class=&quot;wiki_link&quot; href=&quot;/Evaluation&quot;&gt;evaluation&lt;/a&gt; and &lt;a class=&quot;wiki_link&quot; href=&quot;/Move%20Generation&quot;&gt;move-generation&lt;/a&gt; purposes. While the attack-sets of &lt;a class=&quot;wiki_link&quot; href=&quot;/Pawn&quot;&gt;pawn&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/King&quot;&gt;king&lt;/a&gt; and &lt;a class=&quot;wiki_link&quot; href=&quot;/Knight&quot;&gt;knight&lt;/a&gt; are only dependent on their &lt;a class=&quot;wiki_link&quot; href=&quot;/Origin%20Square&quot;&gt;origin square&lt;/a&gt;, sliding pieces like &lt;a class=&quot;wiki_link&quot; href=&quot;/Rook&quot;&gt;rook&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/Bishop&quot;&gt;bishop&lt;/a&gt; or &lt;a class=&quot;wiki_link&quot; href=&quot;/Queen&quot;&gt;queen&lt;/a&gt; have to consider &lt;a class=&quot;wiki_link&quot; href=&quot;/Occupancy&quot;&gt;occupancy&lt;/a&gt;, as &lt;a class=&quot;wiki_link&quot; href=&quot;/Pieces&quot;&gt;pieces&lt;/a&gt; may block the attack-ray in one particular &lt;a class=&quot;wiki_link&quot; href=&quot;/Direction&quot;&gt;direction&lt;/a&gt;.&lt;br /&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Arts#Jørgensen&quot;&gt;Carina Jørgensen&lt;/a&gt;, Queen&#039;s Star &lt;!-- ws:start:WikiTextRefRule:2:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.carinajorgensen.com/Chess/queensstar.php&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Queen&#039;s Star&amp;lt;/a&amp;gt; 2009 by &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/Arts#Jørgensen&amp;quot;&amp;gt;Carina Jørgensen&amp;lt;/a&amp;gt;&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-1&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:2 --&gt;&lt;br /&gt;
&lt;/td&gt;
        &lt;th&gt;&lt;br /&gt;
&lt;/th&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;!-- ws:start:WikiTextTocRule:42:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:42 --&gt;&lt;!-- ws:start:WikiTextTocRule:43: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Move targets&quot;&gt;Move targets&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:43 --&gt;&lt;!-- ws:start:WikiTextTocRule:44: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Single Sliding Piece Attacks&quot;&gt;Single Sliding Piece Attacks&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:44 --&gt;&lt;!-- ws:start:WikiTextTocRule:45: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Single Sliding Piece Attacks-On an empty Board&quot;&gt;On an empty Board&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:45 --&gt;&lt;!-- ws:start:WikiTextTocRule:46: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Single Sliding Piece Attacks-Tinker&#039;s Approach&quot;&gt;Tinker&#039;s Approach&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:46 --&gt;&lt;!-- ws:start:WikiTextTocRule:47: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Single Sliding Piece Attacks-By Calculation&quot;&gt;By Calculation&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:47 --&gt;&lt;!-- ws:start:WikiTextTocRule:48: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Single Sliding Piece Attacks-By Occupancy Lookup&quot;&gt;By Occupancy Lookup&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:48 --&gt;&lt;!-- ws:start:WikiTextTocRule:49: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Single Sliding Piece Attacks-Miscellaneous&quot;&gt;Miscellaneous&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:49 --&gt;&lt;!-- ws:start:WikiTextTocRule:50: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Multiple Sliding Pieces&quot;&gt;Multiple Sliding Pieces&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:50 --&gt;&lt;!-- ws:start:WikiTextTocRule:51: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#See also&quot;&gt;See also&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:51 --&gt;&lt;!-- ws:start:WikiTextTocRule:52: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Forum Posts&quot;&gt;Forum Posts&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:52 --&gt;&lt;!-- ws:start:WikiTextTocRule:53: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Forum Posts-1999&quot;&gt;1999&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:53 --&gt;&lt;!-- ws:start:WikiTextTocRule:54: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Forum Posts-2000 ...&quot;&gt;2000 ...&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:54 --&gt;&lt;!-- ws:start:WikiTextTocRule:55: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Forum Posts-2005 ...&quot;&gt;2005 ...&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:55 --&gt;&lt;!-- ws:start:WikiTextTocRule:56: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Forum Posts-2010 ...&quot;&gt;2010 ...&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:56 --&gt;&lt;!-- ws:start:WikiTextTocRule:57: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Forum Posts-2015 ...&quot;&gt;2015 ...&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:57 --&gt;&lt;!-- ws:start:WikiTextTocRule:58: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#External Links&quot;&gt;External Links&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:58 --&gt;&lt;!-- ws:start:WikiTextTocRule:59: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#References&quot;&gt;References&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:59 --&gt;&lt;!-- ws:start:WikiTextTocRule:60: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:60 --&gt;&lt;!-- ws:start:WikiTextHeadingRule:8:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Move targets&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:8 --&gt;Move targets&lt;/h1&gt;
 Move target sets from attack-sets require &lt;a class=&quot;wiki_link&quot; href=&quot;/General%20Setwise%20Operations#Intersection&quot;&gt;intersection&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;with opponent pieces for &lt;a class=&quot;wiki_link&quot; href=&quot;/Captures&quot;&gt;captures&lt;/a&gt;&lt;/li&gt;&lt;li&gt;with all empty squares for &lt;a class=&quot;wiki_link&quot; href=&quot;/Quiet%20Moves&quot;&gt;quiet moves&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextAnchorRule:61:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@SingleSlidingPieceAttacks&amp;quot; title=&amp;quot;Anchor: SingleSlidingPieceAttacks&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;SingleSlidingPieceAttacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:61 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:10:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Single Sliding Piece Attacks&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:10 --&gt;Single Sliding Piece Attacks&lt;/h1&gt;
 The single sliding piece, a rook, bishop or queen is determined by square index, likely from a &lt;a class=&quot;wiki_link&quot; href=&quot;/BitScan&quot;&gt;bitscan&lt;/a&gt; of a piece-wise &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Serialization&quot;&gt;bitboard serialization&lt;/a&gt; of a sliding piece bitboard from a &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Board-Definition&quot;&gt;standard board-definition&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:12:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Single Sliding Piece Attacks-On an empty Board&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:12 --&gt;On an empty Board&lt;/h2&gt;
 Sliding piece attack sets or their disjoint subsets on lines or rays on an otherwise empty board are that simple than none sliding pieces. They are often base of further attack calculations. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/On%20an%20empty%20Board&quot;&gt;Attacks on the otherwise empty Board&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:14:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc3&quot;&gt;&lt;a name=&quot;Single Sliding Piece Attacks-Tinker&#039;s Approach&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:14 --&gt;Tinker&#039;s Approach&lt;/h2&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/Brian%20Richardson&quot;&gt;Brian Richardson&lt;/a&gt; proposed a move generation approach as used in &lt;a class=&quot;wiki_link&quot; href=&quot;/Tinker&quot;&gt;Tinker&lt;/a&gt; based on rook or bishop attacks on the otherwise empty board &lt;!-- ws:start:WikiTextRefRule:6:&amp;amp;lt;ref&amp;amp;gt;&amp;lt;a class=&amp;quot;wiki_link_ext&amp;quot; href=&amp;quot;http://www.stmintz.com/ccc/index.php?id=107485&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;Movegen Re: Bitmap Type Re: Tinker 81 secs Re: Testing speed&amp;lt;/a&amp;gt; by &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/Brian%20Richardson&amp;quot;&amp;gt;Brian Richardson&amp;lt;/a&amp;gt;, &amp;lt;a class=&amp;quot;wiki_link&amp;quot; href=&amp;quot;/CCC&amp;quot;&amp;gt;CCC&amp;lt;/a&amp;gt;, April 24, 2000&amp;amp;lt;/ref&amp;amp;gt; --&gt;&lt;sup id=&quot;cite_ref-2&quot; class=&quot;reference&quot;&gt;&lt;a href=&quot;#cite_note-2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt;&lt;!-- ws:end:WikiTextRefRule:6 --&gt;. While &lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboard%20Serialization&quot;&gt;serializing&lt;/a&gt; all potential targets, he tests for legality inside the loop body, that is whether the &lt;a class=&quot;wiki_link&quot; href=&quot;/Square%20Attacked%20By#InBetween&quot;&gt;inbetween squares&lt;/a&gt; of &lt;a class=&quot;wiki_link&quot; href=&quot;/Origin%20Square&quot;&gt;origin&lt;/a&gt; and &lt;a class=&quot;wiki_link&quot; href=&quot;/Target%20Square&quot;&gt;target&lt;/a&gt; are empty. This is not in the &amp;quot;real&amp;quot; bitboard spirit to determine attack sets in advance rather than to test individual elements of a superset belonging to a set, but at least it allows traversing disjoint target sets i.e. for captures in &lt;a class=&quot;wiki_link&quot; href=&quot;/Quiescence%20Search&quot;&gt;quiescence search&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:16:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc4&quot;&gt;&lt;a name=&quot;Single Sliding Piece Attacks-By Calculation&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:16 --&gt;By Calculation&lt;/h2&gt;
 Some &lt;a class=&quot;wiki_link&quot; href=&quot;/Bit-Twiddling&quot;&gt;bit-twiddling&lt;/a&gt; ray-wise and line-wise approaches, unfortunately not always for all directions.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Blockers%20and%20Beyond&quot;&gt;Blockers and Beyond&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Classical%20Approach&quot;&gt;Classical Approach&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/Bitfoot#ABBitboards&quot;&gt;Bitfoot - A/B Bitboards&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Shifted%20Bitboards&quot;&gt;Shifted Bitboards&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Subtracting%20a%20Rook%20from%20a%20Blocking%20Piece&quot;&gt;Subtracting a Rook from a Blocking Piece&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Reverse%20Bitboards&quot;&gt;Reverse Bitboards&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Hyperbola%20Quintessence&quot;&gt;Hyperbola Quintessence&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Obstruction%20Difference&quot;&gt;Obstruction Difference&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/SBAMG&quot;&gt;SBAMG&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Exploding%20Bitboards&quot;&gt;Exploding Bitboards&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;!-- ws:start:WikiTextAnchorRule:62:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@AttacksbyOccupancyLookup&amp;quot; title=&amp;quot;Anchor: AttacksbyOccupancyLookup&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;AttacksbyOccupancyLookup&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:62 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:18:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc5&quot;&gt;&lt;a name=&quot;Single Sliding Piece Attacks-By Occupancy Lookup&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:18 --&gt;By Occupancy Lookup&lt;/h2&gt;
 Covering line-attacks in one run, &lt;a class=&quot;wiki_link&quot; href=&quot;/Magic%20Bitboards&quot;&gt;magic bitboards&lt;/a&gt; even covers rook- and bishop-attacks in one run.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/First%20Rank%20Attacks&quot;&gt;First Rank Attacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Occupancy%20of%20any%20Line&quot;&gt;Occupancy of any Line&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Rotated%20Bitboards&quot;&gt;Rotated Bitboards&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Rotated%20Indices&quot;&gt;Rotated Indices&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Kindergarten%20Bitboards&quot;&gt;Kindergarten Bitboards&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/OliThink#SlidingPieceAttacks&quot;&gt;Sliding Piece Attacks&lt;/a&gt; in &lt;a class=&quot;wiki_link&quot; href=&quot;/OliThink&quot;&gt;OliThink&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Hashing%20Dictionaries&quot;&gt;Hashing Dictionaries&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Congruent%20Modulo%20Bitboards&quot;&gt;Congruent Modulo Bitboards&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Magic%20Bitboards&quot;&gt;Magic Bitboards&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/BMI2#PEXTBitboards&quot;&gt;BMI2 - PEXT Bitboards&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Sherwin%20Bitboards&quot;&gt;Sherwin Bitboards&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Titboards&quot;&gt;Titboards&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:20:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc6&quot;&gt;&lt;a name=&quot;Single Sliding Piece Attacks-Miscellaneous&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:20 --&gt;Miscellaneous&lt;/h2&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/The%20switch%20Approach&quot;&gt;The switch Approach&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/SIMD%20techniques&quot;&gt;SIMD techniques&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Hiding%20the%20Implementation&quot;&gt;Hiding the Implementation&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;!-- ws:start:WikiTextAnchorRule:63:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@Multiple&amp;quot; title=&amp;quot;Anchor: Multiple&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;Multiple&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:63 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:22:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc7&quot;&gt;&lt;a name=&quot;Multiple Sliding Pieces&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:22 --&gt;Multiple Sliding Pieces&lt;/h1&gt;
 For bitsets with multiple sliding pieces one can apply a &lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20Algorithms&quot;&gt;fill algorithm&lt;/a&gt; in each of the eight &lt;a class=&quot;wiki_link&quot; href=&quot;/Rays#RayDirections&quot;&gt;ray-directions&lt;/a&gt; to determine attacks. Since we keep disjoint directions, there is still a unique 1:1 relation from each bit of the target set to it&#039;s source square. This approach is great to determine target sets we may reach in two or more moves. One may use the union of rooks and queen(s), respectively bishops or queen(s) though.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Dumb7Fill&quot;&gt;Dumb7Fill&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/AVX2#Dumb7Fill&quot;&gt;AVX2 Dumb7Fill&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Kogge-Stone%20Algorithm&quot;&gt;Kogge-Stone Algorithm&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Fill%20by%20Subtraction&quot;&gt;Fill by Subtraction&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
If applied for &lt;a class=&quot;wiki_link&quot; href=&quot;/Move%20Generation&quot;&gt;move generation&lt;/a&gt; we better traverse directions rather than sliding pieces. Naturally this approach becomes less efficient, the less sliders are processed in parallel. Of course, one should avoid processing empty sets.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:24:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc8&quot;&gt;&lt;a name=&quot;See also&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:24 --&gt;See also&lt;/h1&gt;
 &lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Efficient%20Generation%20of%20Sliding%20Piece%20Attacks&quot;&gt;Efficient Generation of Sliding Piece Attacks&lt;/a&gt;, a Summary of selected attack generation techniques, a short Talk by &lt;a class=&quot;wiki_link&quot; href=&quot;/Gerd%20Isenberg&quot;&gt;Gerd Isenberg&lt;/a&gt; from the &lt;a class=&quot;wiki_link&quot; href=&quot;/Workshop%20Chess%20and%20Mathematics&quot;&gt;Workshop Chess and Mathematics&lt;/a&gt;, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Dresden&quot; rel=&quot;nofollow&quot;&gt;Dresden&lt;/a&gt;, November 21st and 22nd, 2008&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Combinatorial%20Logic#CombinatorialAttackandDefendMap&quot;&gt;Combinatorial Logic - Combinatorial Attacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Sequential%20Logic#SequentialRookAttack&quot;&gt;Sequential Logic - Sequential Rook Attack&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Vector%20Attacks&quot;&gt;Vector Attacks&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:26:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc9&quot;&gt;&lt;a name=&quot;Forum Posts&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:26 --&gt;Forum Posts&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextHeadingRule:28:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc10&quot;&gt;&lt;a name=&quot;Forum Posts-1999&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:28 --&gt;1999&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=71016&quot; rel=&quot;nofollow&quot;&gt;Re: How do you represent chess boards in your chess programms&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Sven%20Reichard&quot;&gt;Sven Reichard&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, September 29, 1999&lt;/li&gt;&lt;/ul&gt;&lt;!-- ws:start:WikiTextHeadingRule:30:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc11&quot;&gt;&lt;a name=&quot;Forum Posts-2000 ...&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:30 --&gt;2000 ...&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=107485&quot; rel=&quot;nofollow&quot;&gt;Movegen Re: Bitmap Type Re: Tinker 81 secs Re: Testing speed&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Brian%20Richardson&quot;&gt;Brian Richardson&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, April 24, 2000&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=134490&quot; rel=&quot;nofollow&quot;&gt;An idea to generate rook moves without rotated BBs&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Severi%20Salminen&quot;&gt;Severi Salminen&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, October 22, 2000&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=359243&quot; rel=&quot;nofollow&quot;&gt;sliding attacks in three #define&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Rasjid%20Chan&quot;&gt;Rasjid Chan&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, April 09, 2004&lt;/li&gt;&lt;/ul&gt;&lt;!-- ws:start:WikiTextHeadingRule:32:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc12&quot;&gt;&lt;a name=&quot;Forum Posts-2005 ...&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:32 --&gt;2005 ...&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=16002&quot; rel=&quot;nofollow&quot;&gt;BitBoard Tests Magic v Non-Rotated 32 Bits v 64 Bits&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Brian%20Richardson&quot;&gt;Brian Richardson&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, August 24, 2007&lt;br /&gt;
&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&amp;amp;p=140111&amp;amp;t=16002&quot; rel=&quot;nofollow&quot;&gt;Re: BitBoard Tests Magic v Non-Rotated 32 Bits v 64 Bits&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Harald%20L%C3%BC%C3%9Fen&quot;&gt;Harald Lüßen&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, August 24, 2007&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=30356&quot; rel=&quot;nofollow&quot;&gt;Yet another bitboard attack generator&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Miguel%20A.%20Ballicora&quot;&gt;Miguel A. Ballicora&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, October 28, 2009&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=30369&quot; rel=&quot;nofollow&quot;&gt;Other attack generator just for good measure ... C++ only...&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Filip%20Tvrzsky&quot;&gt;Filip Tvrzsky&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, October 29, 2009&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=30542&quot; rel=&quot;nofollow&quot;&gt;Caching AttackSets&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Michael%20Hoffmann&quot;&gt;Michael Hoffmann&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, November 09, 2009&lt;/li&gt;&lt;/ul&gt;&lt;!-- ws:start:WikiTextHeadingRule:34:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc13&quot;&gt;&lt;a name=&quot;Forum Posts-2010 ...&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:34 --&gt;2010 ...&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.open-aurec.com/wbforum/viewtopic.php?f=4&amp;amp;t=51076&quot; rel=&quot;nofollow&quot;&gt;Bitboards&lt;/a&gt; by Jeroen de Bruin, &lt;a class=&quot;wiki_link&quot; href=&quot;/Computer%20Chess%20Forums&quot;&gt;Winboard Forum&lt;/a&gt;, July 07, 2010&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.open-aurec.com/wbforum/viewtopic.php?f=4&amp;amp;t=51996&quot; rel=&quot;nofollow&quot;&gt;Low memory usage attack bitboard generation&lt;/a&gt; by crystalclear, &lt;a class=&quot;wiki_link&quot; href=&quot;/Computer%20Chess%20Forums&quot;&gt;Winboard Forum&lt;/a&gt;, October 06, 2011&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?p=446380&quot; rel=&quot;nofollow&quot;&gt;Re: Bitboard implementation, how much time?&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Michael%20Hoffmann&quot;&gt;Michael Hoffmann&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, January 26, 2012&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=49611&quot; rel=&quot;nofollow&quot;&gt;152k rook and bishop attacks using PEXT and PDEP&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Lasse%20Hansen&quot;&gt;Lasse Hansen&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, October 06, 2013 » &lt;a class=&quot;wiki_link&quot; href=&quot;/BMI2&quot;&gt;BMI2&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;!-- ws:start:WikiTextHeadingRule:36:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc14&quot;&gt;&lt;a name=&quot;Forum Posts-2015 ...&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:36 --&gt;2015 ...&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=55418&quot; rel=&quot;nofollow&quot;&gt;On Rook tables in magic move generation&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Syed%20Fahad&quot;&gt;Syed Fahad&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, February 22, 2015&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=55604&quot; rel=&quot;nofollow&quot;&gt;Yet another way of generating sliding attack masks&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Syed%20Fahad&quot;&gt;Syed Fahad&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, March 09, 2015&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=56468&quot; rel=&quot;nofollow&quot;&gt;Slider attack mask generation without table lookup&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Syed%20Fahad&quot;&gt;Syed Fahad&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, May 24, 2015&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=58795&quot; rel=&quot;nofollow&quot;&gt;Comparison of bitboard attack-getter variants&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Sven%20Sch%C3%BCle&quot;&gt;Sven Schüle&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, January 04, 2016&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.talkchess.com/forum/viewtopic.php?t=59845&quot; rel=&quot;nofollow&quot;&gt;SBAMG - Completing Hyperbola Quintessence&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Syed%20Fahad&quot;&gt;Syed Fahad&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, April 10, 2016&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:38:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc15&quot;&gt;&lt;a name=&quot;External Links&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:38 --&gt;External Links&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Slide_attack&quot; rel=&quot;nofollow&quot;&gt;Slide attack from Wikipedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Videos#Focus&quot;&gt;Focus&lt;/a&gt; - Glider, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/Ship_of_Memories&quot; rel=&quot;nofollow&quot;&gt;Ship of Memories&lt;/a&gt; 1976, &lt;a class=&quot;wiki_link_ext&quot; href=&quot;https://en.wikipedia.org/wiki/YouTube&quot; rel=&quot;nofollow&quot;&gt;YouTube&lt;/a&gt; Video&lt;br /&gt;
&lt;!-- ws:start:WikiTextMediaRule:7:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/custom/24020882?h=0&amp;amp;w=0&amp;quot; class=&amp;quot;WikiMedia WikiMediaCustom&amp;quot; id=&amp;quot;wikitext@@media@@type=&amp;amp;quot;custom&amp;amp;quot; key=&amp;amp;quot;24020882&amp;amp;quot;&amp;quot; title=&amp;quot;Custom Media&amp;quot;/&amp;gt; --&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/kcYXSutFCXA?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;!-- ws:end:WikiTextMediaRule:7 --&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:40:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc16&quot;&gt;&lt;a name=&quot;References&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:40 --&gt;References&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextReferencesRule:380:&amp;amp;lt;references /&amp;amp;gt; --&gt;&lt;ol class=&quot;references&quot;&gt;
&lt;li id=&quot;cite_note-1&quot;&gt;&lt;a href=&quot;#cite_ref-1&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.carinajorgensen.com/Chess/queensstar.php&quot; rel=&quot;nofollow&quot;&gt;Queen&#039;s Star&lt;/a&gt; 2009 by &lt;a class=&quot;wiki_link&quot; href=&quot;/Arts#Jørgensen&quot;&gt;Carina Jørgensen&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;cite_note-2&quot;&gt;&lt;a href=&quot;#cite_ref-2&quot;&gt;^&lt;/a&gt; &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.stmintz.com/ccc/index.php?id=107485&quot; rel=&quot;nofollow&quot;&gt;Movegen Re: Bitmap Type Re: Tinker 81 secs Re: Testing speed&lt;/a&gt; by &lt;a class=&quot;wiki_link&quot; href=&quot;/Brian%20Richardson&quot;&gt;Brian Richardson&lt;/a&gt;, &lt;a class=&quot;wiki_link&quot; href=&quot;/CCC&quot;&gt;CCC&lt;/a&gt;, April 24, 2000&lt;/li&gt;
&lt;/ol&gt;&lt;!-- ws:end:WikiTextReferencesRule:380 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;a class=&quot;wiki_link&quot; href=&quot;/Bitboards&quot;&gt;Up one Level&lt;/a&gt;&lt;/strong&gt;</description>
          </item>

  </channel>
</rss>