Changes

Jump to: navigation, search

Attack Spans

3,349 bytes added, 11:25, 10 May 2018
Created page with "'''Home * Board Representation * Bitboards * Pawn Pattern and Properties * Attack Spans''' The admittedly arbitrary definition of '''front attackspa..."
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Attack Spans'''

The admittedly arbitrary definition of '''front attackspans''' includes the attacked squares itself, thus it is like a '''fill''' of [[Pawn Attacks (Bitboards)|attacked squares]] in the appropriate direction. The '''rear attackspan''' is the '''complement''' set on the '''same file''', so that the union of both spans covers the '''whole file'''. As always, we keep disjoint east-west sets for separate applications, despite illustrated as union with one single pawn:

''Set-wise pattern, based on attackspans are for instance [[Isolated Pawns (Bitboards)|isolated pawns]], [[Passed Pawns (Bitboards)|passers]] and [[Candidates (Bitboards)|candidates]]''.

<pre>
white attack white attack attack filefill with least one
frontspan rearspan square attacked by white
. . 1 . 1 . . . . . . . . . . . . . 1 . 1 . . .
. . 1 . 1 . . . . . . . . . . . . . 1 . 1 . . .
. . 1 . 1 . . . . . . . . . . . . . 1 . 1 . . .
. . 1 . 1 . . . . . . . . . . . . . 1 . 1 . . .
. . . w . . . . . . 1 w 1 . . . . . 1 w 1 . . .
. . . . . . . . . . 1 . 1 . . . . . 1 . 1 . . .
. . . . . . . . . . 1 . 1 . . . . . 1 . 1 . . .
. . . . . . . . . . 1 . 1 . . . . . 1 . 1 . . .

black attack black attack attack filefill with least one
frontspan rearspan square attacked by black
. . . . . . . . . . 1 . 1 . . . . . 1 . 1 . . .
. . . . . . . . . . 1 . 1 . . . . . 1 . 1 . . .
. . . . . . . . . . 1 . 1 . . . . . 1 . 1 . . .
. . . . . . . . . . 1 . 1 . . . . . 1 . 1 . . .
. . . b . . . . . . 1 b 1 . . . . . 1 b 1 . . .
. . 1 . 1 . . . . . . . . . . . . . 1 . 1 . . .
. . 1 . 1 . . . . . . . . . . . . . 1 . 1 . . .
. . 1 . 1 . . . . . . . . . . . . . 1 . 1 . . .
</pre>
The routines based on [[General Setwise Operations#OneStepOnly|one step only]], [[Pawn Fills|vertical fills]] and [[Pawn Spans|pawn spans]] :
<pre>
U64 wEastAttackFrontSpans (U64 wpawns) {return eastOne(wFrontSpans(wpawns));}
U64 wWestAttackFrontSpans (U64 wpawns) {return westOne(wFrontSpans(wpawns));}
U64 bEastAttackFrontSpans (U64 bpawns) {return eastOne(bFrontSpans(bpawns));}
U64 bWestAttackFrontSpans (U64 bpawns) {return westOne(bFrontSpans(bpawns));}

U64 wEastAttackRearSpans (U64 wpawns) {return eastOne(wRearFill(wpawns));}
U64 wWestAttackRearSpans (U64 wpawns) {return westOne(wRearFill(wpawns));}
U64 bEastAttackRearSpans (U64 bpawns) {return eastOne(bRearFill(bpawns));}
U64 bWestAttackRearSpans (U64 bpawns) {return westOne(bRearFill(bpawns));}
</pre>
The filefills are independent on color
<pre>
U64 eastAttackFileFill (U64 pawns) {return eastOne(fileFill(pawns));}
U64 westAttackFileFill (U64 pawns) {return westOne(fileFill(pawns));}
</pre>
* If a pawn is not member of own west or east attack filefills, the pawn is [[Isolated Pawns (Bitboards)|half-isolated]].
* If a pawn is not member of the union of own east and west attack filefills, the pawn is [[Isolated Pawns (Bitboards)|isolated]].
* If a pawn is not member of the union of all opponent front pawn- and attack-spans, it is a [[Passed Pawns (Bitboards)|passed pawn]].

'''[[Pawn Pattern and Properties|Up one Level]]'''

Navigation menu