Difference between revisions of "Dispersion and Distortion"

From Chessprogramming wiki
Jump to: navigation, search
m
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Dispersion and Distortion'''
 
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Dispersion and Distortion'''
  
[[FILE:SamuelBakLuna.jpg|border|right|thumb|link=http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bb7|[[Arts#Bak|Samuel Bak]] - Luna <ref>[http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bb7 Chess in the Art of Samuel Bak], [http://www.chgs.umn.edu/ Center for Holocaust & Genocide Studies], [https://en.wikipedia.org/wiki/University_of_Minnesota University of Minnesota]</ref> ]]  
+
[[FILE:SamuelBakLuna.jpg|border|right|thumb|link=http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bb7|[[:Category:Samuel Bak|Samuel Bak]] - Luna <ref>[http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bb7 Chess in the Art of Samuel Bak], [http://www.chgs.umn.edu/ Center for Holocaust & Genocide Studies], [[University of Minnesota]]</ref> ]]  
  
 
'''Dispersion''' and '''Distortion''',<br/>
 
'''Dispersion''' and '''Distortion''',<br/>
Line 36: Line 36:
 
<span id="Distortion"></span>
 
<span id="Distortion"></span>
 
=Distortion=  
 
=Distortion=  
Distortion is [[Hans Kmoch|Kmoch's]] term for horizontal splitting of pawns caused by advances. One may use something like this based on [[Pawn Fills|rearfill]], xor and [[Population Count|population count]] to get an idea of distortion. It considers the rank-difference of two file-adjacent pawns (if any) as distortion penalty - the higher the worse. [[Isolated Pawns (Bitboards)IsolanisSetWise|Half-isolated]] or even [[Isolated Pawn|isolated pawns]] contribute a distortion penalty according to the size of their rearfill from 2 to 7 for each empty neighboring file, which discourages advancement of such pawns, interacting with terms considerring (half-) isolated pawns. Alternatively, for a "reverse" distortion penalty to encourage advancement of half-isolanis, one may use [[Pawn Fills|frontfill]] instead with a slightly different semantic is case of [[Doubled Pawn|doubled pawns]].  
+
Distortion is [[Hans Kmoch|Kmoch's]] term for horizontal splitting of pawns caused by advances. One may use something like this based on [[Pawn Fills|rearfill]], xor and [[Population Count|population count]] to get an idea of distortion. It considers the rank-difference of two file-adjacent pawns (if any) as distortion penalty - the higher the worse. [[Isolated Pawns (Bitboards)#IsolanisSetWise|Half-isolated]] or even [[Isolated Pawn|isolated pawns]] contribute a distortion penalty according to the size of their rearfill from 2 to 7 for each empty neighboring file, which discourages advancement of such pawns, interacting with terms considerring (half-) isolated pawns. Alternatively, for a "reverse" distortion penalty to encourage advancement of half-isolanis, one may use [[Pawn Fills|frontfill]] instead with a slightly different semantic is case of [[Doubled Pawn|doubled pawns]].  
 
<pre>
 
<pre>
 
int wDistortion(U64 wpawns) {
 
int wDistortion(U64 wpawns) {

Revision as of 20:32, 22 October 2019

Home * Board Representation * Bitboards * Pawn Pattern and Properties * Dispersion and Distortion

Dispersion and Distortion,
are Kmoch's terms [2] [3] for pawn structure weaknesses due to vertical or horizontal splitting caused by captures or advancement. The proposed functions may be used via an additional scaling or indirection, f.i. to index a table with concrete penalties.

Dispersion

Dispersion is Kmoch's term for vertical splitting of pawns (most commonly, isolation) caused by captures. Having three or four islands while the opponent has one or two - assuming about the same number of pawns for both sides - may be considered in evaluation. But this is also implicitly done by evaluating double- or triple and isolated or the balance of weak pawns in general. Some arbitrary dispersion measure, intended as index of a pre-calculated table for evaluation purpose.

int dispersion(U64 pawns)
{
   BYTE fileset  = (BYTE) soutFill(pawns);
   int  ni = popCount(islandsEastFiles(fileset));
   int  np = popCount(wpawns);
   return abs(3*ni*ni - np);
}

BYTE islandsEastFiles(BYTE f) {return f & ((f ^ (f >> 1));}

The higher the worse.

  \  number if islands
   \     1   2   3   4
np  \    3  12  27  48
_____\________________
 1   |   2   -   -   -
 2   |   1  10   -   -
 3   |   0   9  24   -
 4   |   1   8  23  44
 5   |   2   7  22  43
 6   |   3   6  21  42
 7   |   4   5  20  41
 8   |   5   4  19  40

Distortion

Distortion is Kmoch's term for horizontal splitting of pawns caused by advances. One may use something like this based on rearfill, xor and population count to get an idea of distortion. It considers the rank-difference of two file-adjacent pawns (if any) as distortion penalty - the higher the worse. Half-isolated or even isolated pawns contribute a distortion penalty according to the size of their rearfill from 2 to 7 for each empty neighboring file, which discourages advancement of such pawns, interacting with terms considerring (half-) isolated pawns. Alternatively, for a "reverse" distortion penalty to encourage advancement of half-isolanis, one may use frontfill instead with a slightly different semantic is case of doubled pawns.

int wDistortion(U64 wpawns) {
   U64 fill  = wRearFill(wpawns); // wFrontFill
   U64 delta = (fill ^ (fill<<1)) & C64(0xfefefefefefefefe));
   return popCount(delta);
}

High distortion sample:

wpawns              rearFill            rearFill << 1      xor & ~A-File
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . . . . . . .     . . . . . . . .     . . . . . . . .     . . . . . . . .
. . 1 . 1 . 1 .     . . 1 . 1 . 1 .     . . . 1 . 1 . 1     . . 1 1 1 1 1 1
. . . . . . . .     . . 1 . 1 . 1 .     . . . 1 . 1 . 1     . . 1 1 1 1 1 1
1 . . . . . . .     1 . 1 . 1 . 1 .     . 1 . 1 . 1 . 1     . 1 1 1 1 1 1 1
. . . . . . . .     1 . 1 . 1 . 1 .     1 1 . 1 . 1 . 1     . 1 1 1 1 1 1 1
. 1 . 1 . 1 . 1     1 1 1 1 1 1 1 1     1 1 1 1 1 1 1 1     . . . . . . . .
. . . . . . . .     1 1 1 1 1 1 1 1     . 1 1 1 1 1 1 1     . . . . . . . .

                                                            26 bits sets

See also

External Links

References

  1. Chess in the Art of Samuel Bak, Center for Holocaust & Genocide Studies, University of Minnesota
  2. Hans Kmoch (1959, 1990). Pawn Power in Chess. New York: Dover, 1990. Previous ed.: New York: McKay, 1959. ISBN 0-486-26486-6
  3. Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums - Chess.com

Up one Level