An edge case of a pin not mentioned by Wikipedia (?)

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

Moderator: Ras

fkarger
Posts: 47
Joined: Sat Aug 15, 2020 8:08 am
Full name: Frank Karger

An edge case of a pin not mentioned by Wikipedia (?)

Post by fkarger »

Some years ago I wrote the basics of a chess engine in Haskell in order to understand the language.

For some reason I made the assumption that a piece which is pinned is attacked by the pinning piece.
This turned out to be true most of the times but there is also some edge case like this:

[d]2b5/8/8/8/R5pk/8/5P2/1K6 w - - 0 1

After 1.f4
[d]2b5/8/8/8/R4Ppk/8/8/1K6 b - f3 0 1

black cannot play gxf3e.p. because the black king would be attacked by the white rook.
That means that g4 is (kind of) pinned.

Wikipedia https://en.wikipedia.org/wiki/Pin_(chess) writes:
"In chess, a pin is a tactic in which a defending piece cannot move out of an attacking piece's line of attack without exposing a more valuable defending piece."

But in this case the (partially) pinned pawn on g4 CAN move to g3
and it is not directly attacked by the rook on a4.

Wikipedia mentions a different case of a partial pin where e.g. a pinned rook can move
in the direction of a pinning rook.
Maybe for this rare en passant case of a pin a second partial pin has to be introduced (?).

Anyways I thought this to be an curiosity :)
User avatar
Ajedrecista
Posts: 2096
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: An edge case of a pin not mentioned by Wikipedia (?).

Post by Ajedrecista »

Hello Frank:

Just a friendly remainder: Wikipedia is often an excellent source to get some idea of things, but literature on the topics is needed if you want to further investigate. Regarding chess, Wikipedia is not the original source of FIDE rules.

Having said that, this kind of e.p. captures were discussed before at TalkChess:

Being silly with perft and legal move generation

Once I saw your example, I remembered that I saw something similar and went into the search engine of the forum. There might be more threads like that one.

Regards from Spain.

Ajedrecista.
gordonr
Posts: 220
Joined: Thu Aug 06, 2009 8:04 pm
Location: UK

Re: An edge case of a pin not mentioned by Wikipedia (?)

Post by gordonr »

fkarger wrote: Thu Apr 17, 2025 4:04 pm Anyways I thought this to be an curiosity :)
Yes, a very curious pin. Thanks for sharing :)
fkarger
Posts: 47
Joined: Sat Aug 15, 2020 8:08 am
Full name: Frank Karger

Re: An edge case of a pin not mentioned by Wikipedia (?).

Post by fkarger »

Ajedrecista wrote: Thu Apr 17, 2025 8:55 pm Hello Frank:

Just a friendly remainder: Wikipedia is often an excellent source to get some idea of things, but literature on the topics is needed if you want to further investigate. Regarding chess, Wikipedia is not the original source of FIDE rules.

Having said that, this kind of e.p. captures were discussed before at TalkChess:

Being silly with perft and legal move generation

Once I saw your example, I remembered that I saw something similar and went into the search engine of the forum. There might be more threads like that one.

Regards from Spain.

Ajedrecista.
Nice! The diagonal e.p. pin is also cool :)