Changes

Jump to: navigation, search

Pawn Levers (Bitboards)

5,528 bytes added, 10:09, 10 May 2018
Created page with "'''Home * Board Representation * Bitboards * Pawn Pattern and Properties * Pawn Levers''' FILE:TotheRight.jpg|border|right|thumb|link=http://chgs...."
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Pawn Levers'''

[[FILE:TotheRight.jpg|border|right|thumb|link=http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bbf|[[Arts#Bak|Samuel Bak]] - To The Right <ref>[http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bbf Chess in the Art of Samuel Bak], , [http://chgs.elevator.umn.edu/ Center for Holocaust & Genocide Studies], [https://en.wikipedia.org/wiki/University_of_Minnesota University of Minnesota]</ref> ]]

'''Pawn Lever''',<br/>
opposing [[Pawn|pawns]] in contact that can [[Captures|capture]] each other. In chess the term lever is also used as '''option''' to attack an opposing pawn by a [[Pawn Push|push]] or [[Pawn Push#DoublePush|double push]]. In ''Pawn Power in Chess'' <ref>[[Hans Kmoch]] ('''1959, 1990'''). ''Pawn Power in Chess''. New York: Dover, 1990. Previous ed.: New York: McKay, 1959. ISBN 0-486-26486-6</ref>, [[Hans Kmoch]] classified levers in the following way <ref>[https://www.chess.com/forum/view/chess-equipment/pawn-power-in-chess-by-hans-kmoch-glossary-of-terms Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums] - [https://en.wikipedia.org/wiki/Chess.com Chess.com]</ref>:

=Lever Classification=
* '''Center lever''' - A lever wholly within the two center files.
* '''Chain lever''' - 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.
* '''Fork lever''' - A lever attacking two units at once (can include a piece).
* '''Inner Lever''' - A lever where the capture would move toward the center.
* '''Loose lever''' - A lever where each side has the option of capturing or bypassing.
* '''Mute chain lever''' - 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't produce passers.
* '''Outer lever''' - A lever where the capture would move away from the center.
* '''Tight lever''' - A lever including a ram, that offers only one side the option of both capture and bypass, e.g., c4, d4 vs. d5, e6.

''Working in the bitboard centric world to determine pawn related pattern set-wise''.
==East and West Levers==
We define lever direction by the two horizontal [[Pawn Attacks (Bitboards)#PawnAttacks|attack]] directions of the pawn, not where it comes from if capturing. Whites east lever implies blacks west lever and vice versa:
<pre>
whites east lever whites west lever
is blacks west is blacks east
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . b . . . . . . . b . . . .
. . w . . . . . . . . . w . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
</pre>
Keeping disjoint west- or east levers...

''Code is based on [[Pawn Attacks (Bitboards)]] and [[Pawn Pushes (Bitboards)]].''
<pre>
U64 wEastLever(U64 wpawns, U64 bpawns) {
return wpawns & bPawnWestAttacks(bpawns);
}

U64 wWestLever(U64 wpawns, U64 bpawns) {
return wpawns & bPawnEastAttacks(bpawns);
}

U64 wAnyLever(U64 wpawns, U64 bpawns) {
return wEastLever(wpawns, bpawns)
| wWestLever(wpawns, bpawns);
}
</pre>
... makes it easier to decide about inner or outer levers.

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:
<pre>
bEastLever = wWestLever << 7;
bWestLever = wEastLever << 9
</pre>
==Inner, Outer and Center Levers==
Whites inner levers imply black outer levers and vice versa. Inner levers are usually more advantageous than outer levers.
<pre>
whites inner lever whites outer lever
is blacks outer is blacks inner
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . b . . . b . . b . . . . . b
. w . . . . . w . . w . . . w .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
</pre>

<pre>
U64 wInnerLever(U64 wpawns, U64 bpawns) {
const U64 abcFiles = C64(0x0707070707070707);
const U64 fghFiles = C64(0xE0E0E0E0E0E0E0E0);
return ( wEastLever(wpawns, bpawns) & abcFiles )
| ( wWestLever(wpawns, bpawns) & fghFiles );
}

U64 wOuterLever(U64 wpawns, U64 bpawns) {
const U64 bcdFiles = C64(0x0E0E0E0E0E0E0E0E);
const U64 efgFiles = C64(0x7070707070707070);
return ( wEastLever(wpawns, bpawns) & efgFiles )
| ( wWestLever(wpawns, bpawns) & bcdFiles );
}

U64 wCenterLever(U64 wpawns, U64 bpawns) {
const U64 dFile = C64(0x0808080808080808);
const U64 eFile = C64(0x1010101010101010);
return ( wEastLever(wpawns, bpawns) & dFile )
| ( wWestLever(wpawns, bpawns) & eFile );
}
</pre>
with similar code for black levers.

=See also=
* [[Defended Pawns (Bitboards)]]
* [[Pawn Attacks (Bitboards)]]
* [[Pawn Rams (Bitboards)]]

=External Links=
* [https://en.wikipedia.org/wiki/Lever Lever from Wikipedia]
* [https://www.chess.com/forum/view/chess-equipment/pawn-power-in-chess-by-hans-kmoch-glossary-of-terms Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums] - [https://en.wikipedia.org/wiki/Chess.com Chess.com]

=References=
<references />

'''[[Pawn Pattern and Properties|Up one Level]]'''
[[Category:Samuel Bak]][[Category:Hans Kmoch]]

Navigation menu