King shelter x-ray attacks

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

King shelter x-ray attacks

Post by Lyudmil Tsvetkov »

Attacking the enemy king shelter is by far the most important thing programs should do, much more important than anything else, including care for own king shelter. When you attack and mate the opponent, the game simply ends. So that no effort to improve attacking the enemy king shelter would be wasted.

I know that most engines have pretty good king attack implementations, they weight attacking pieces by type with queen getting biggest bonus and minors least, some also possibly would split weights for attacking squares of the king shelter that are adjacent to the king and that are not. (of course, it makes sense to score attacking squares that are not adjacent to the enemy king some 2/3 of what squares adjacent to the king get)

However, I ask myself how many engines actually consider x-ray attacking of the king shelter?
I think this is very important, as such attacks usually greatly contribute to the overall attack and sometimes might completely change the picture.

For simplicity, an x-ray attack of the king shelter would be a sliding piece attacking a square of the shelter with one own or enemy pawns or pieces in between the attacker and the square itself.

X-ray attacks of the king shelter might get 1/2 of what direct attacks of the respective squares get.

Below some diagrams.

[d]6k1/1R3p1p/6p1/8/8/6Q1/2B5/6K1 w - - 0 58
Qg3 attacks g6 and x-ray attacks g7
Bc2 attacks g6 and x-ray attacks h7
Rb7 attacks f7 and x-ray attacks g7 and h7

[d]6k1/1RN2pp1/7p/8/3N1P2/8/8/B1Q3K1 w - - 0 58
Qc1 x-ray attacks h6
Ba1 x-ray attacks f6 and g7
Rb7 x-ray attacks f7 and g7

X-ray attacks of the king shelter are especially useful when heavy pieces line up against the shelter, if you do not consider such doublings separately.

[d]6k1/5pb1/6p1/8/8/7R/6K1/7R w - - 0 58
Rh3 attacks h6,h7 and h8, but Rh1 also x-ray attacks the same squares. So that you see here that doubling of heavy pieces against the enemy king gives you more than just adding 2 rooks on an open file. The threats are simply much more vigorous.

[d]6k1/5p1p/6p1/8/8/7R/6KQ/7R w - - 0 58
Rh3 attacks h6 and h7, but Qh2 also x-ray attacks those squares

How many of you consider x-ray attacks of the king shelter?
What do you think of the above suggestion?
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: King shelter x-ray attacks

Post by Lyudmil Tsvetkov »

Some game examples.

[d]1rb2rk1/4bppp/pq6/2p1P3/4B3/2B1Q2P/PP4P1/R4R1K w - - 0 23
Rf1 attacks f6 and f7 squares of the shelter directly, Be4 attacks g6 and h7 suqares directly, Qe3 attacks h6 directly, but Bc3 also attacks f6 and g7 on an x-ray.

This is important and should be taken into account. For example, in the position above now Rf6 is possible precisely because of the Bc3 x-ray attack.

[d]5rk1/2pb2rp/3p4/p1pPp2q/2P1Np1b/1P1B1P1P/P2QR1P1/5R1K b - - 0 26
In the position above Ne4 attacks f6 direcly, Bd3 x-ray attacks g6 and h7, Qe3 x-ray attacks h6, so that white adds 3 more squares attacked on an x-ray. If you do not consider this, king attack will certainly be imperfect.

For black, Bd7 attacks h3 directly, Bh4 attacks g3 directly, Rg7 attacks g2 and g3 directly, but also x-ray attacks g1, which is important. Qh3 also x-ray attacks h3, which is very important. So that black also adds here 3 squares attacked on an x-ray. Not considering this would be wrong.
jdart
Posts: 4367
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: King shelter x-ray attacks

Post by jdart »

Lyudmil Tsvetkov wrote: How many of you consider x-ray attacks of the king shelter?
I think this is pretty common. I factor pins into the king safety calculation. And "x-ray" attacks are counted in the case of stacked attackers of the same type: for example, Bishop behind Queen, or Rook attacking King with another Rook behind it. However, that leaves out the case where an "own piece" blocks the line of attack to the King. Here is a somewhat extreme example:

[D] 5rnk/r2q2pp/3p2B1/2p1pPB1/p1PnP2Q/Pp1P2RP/1P4R1/6K1 b - - 0 1

My king attack score for White does not count the rook battery as attacking pieces, even though they might enter the attack once the bishops move.

--Jon
Engin
Posts: 918
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: King shelter x-ray attacks

Post by Engin »

bingo, this is a very good idea, i have implemented now in Tornado also x-ray attackers to king.

thanks!