Hacker News new | ask | show | jobs
by Fang_ 1751 days ago
> Black to move, and in the final position, the pawn at h4 can be captured en-passant.

> They're all legal.

But then, looking at the final position[1], black is in check by the knight on b2. If white's pawn can be captured en passant, this implies the knight was not the most recent move, so the black king was in check on the previous turn as well.

It's obviously not legal to remain in check. What am I missing?

[1] https://raw.githubusercontent.com/tromp/ChessPositionRanking...

2 comments

To quote from Seinfeld: "It's not you. It's me"

I missed something, and clearly misclassified this position, leaving only 51 legal in the 1k set (and only 537 in the 10k set).

Oops. It's embarrassing since I did pay attention to the en-passant positions in the 919-93 positions not from the smaller 1k sample, such as this one: https://github.com/tromp/ChessPositionRanking/issues/916

I'll have to make some changes to my README. Meanwhile, congratulations on spotting the error. And I'll be sure to mention you in the eventual publication.

This underscores the need to back up my classification with proof games...

As I went to look for the corresponding issue, I was surprised to not find the position among the open issues.

In fact it was closed as

https://github.com/tromp/ChessPositionRanking/issues/915

So I had classified it correctly, but only AFTER making the diagrams for the 1k sample.

That means the 538 count for the 10k sample still stands. Good. Less things to fix on the README :-)

A misclassified issue was found by Github user 1pab42 at https://github.com/tromp/ChessPositionRanking/issues/878

That changes the prospective number of legal positions to 539...

But just today github user @mcdallas found another position misclassfied as legal [1], so the two misjudgements cancel out and the original 538 count currently still stands. Lovely:-)

[1] https://github.com/tromp/ChessPositionRanking/issues/794

Peter Osterland found yet another misclassification in

https://github.com/tromp/ChessPositionRanking/issues/824

Why isn't it legal to remain in check?
Being in check means it’s your move and the pieces are positioned so that if it was your opponent’s move they could capture your king. So, to “remain in check” would mean to make a move which still allows your opponent to capture your king. If this were allowed the opponent would just capture your king and you would lose. Instead, the rules of chess require you to “get out of check”, i.e. make a move which prevents your opponent from capturing your king. If there is no such move you are said to be in “checkmate” and you lose.
It's a good question as most games, including chess have few rules about making otherwise legal moves illegal just because they might be suboptimal. In novice games the other player might not even realize they can win, so it being illegal to stay in check is an oddity but one that's actually in the rules.
As far as I’m aware, the only game-theory difference between chess and a variant of chess where moving into check is legal, is that stalemate exists. Otherwise the “can’t move into check” rule is basically useless.
The rules of Chess say so. Duh.
Ha!

It's funny-- except for Tenoke all the responses so far boil down to essentially this.

I'll try again.

Assume an alternate reality where this incredibly important rule doesn't exist. In it, the other player simply takes the king on the next turn from a neophyte who didn't realize they are still in check.

What bad things would happen as a result of the non-existence of the gratuitous rule?

And don't just speculate based on the zero cost of posting on HN. Give me the real reason based on the history of the creation of chess rules and/or the documented behavior of real chess players in history.

> Assume an alternate reality where this incredibly important rule doesn't exist. In it, the other player simply takes the king on the next turn from a neophyte who didn't realize they are still in check.

This is not merely an alternate reality; this is effectively the reality of blitz chess, where capturing the king is a way of claiming victory by declaring that the opponent made an illegal move when they didn't move out of check. In blitz chess you do not have the right to correct illegal moves after the opponent points them out.

https://www.reddit.com/r/chess/comments/jrvmk7/capture_the_k...

I feel as if I'm being gaslighted.

If the penalty for the specific illegal move of not getting oneself out of check is to lose the game, what could the practical significance of the rule possibly be?

The other respondent is claiming that chess would become a game of "gotcha," as if the rule somehow prevents chess players from faking injuries to distract the chess ref and get free moves.

That penalty applies only in blitz-chess.

In regular chess, the rule just helps a player avoid one particular kind of blunder. Basically, it was arbitrarily decided that game records should never have king captures in them.

I would agree that makes it a poor excuse for a rule.

Chess is a politically-themed wargame featuring monarchy. The King, being top kick, makes the rules of the land. Of course the King would enact such a rule that makes putting/leaving him in danger illegal.

Think about actual, medieval monarchs in their castles, holding literal absolute power over everyone. If someone were to invent a board game featuring a King, and the King were to be made aware that you moved him into danger and got him captured, he might have your head.

> What bad things would happen as a result of the non-existence of the gratuitous rule?

Chess would be a game of gotcha instead of the game it currently is.

The rule is there to support the preferences of the kind of people who think chess is fun.

I feel as if I'm asking something fundamental that hasn't been considered by insiders. As if I asked music afficionados why Beethoven's Appassionata Sonata couldn't be performed in F-sharp minor and the response is something like, "Because arbitrarily changing the keys of sonatas would make a travesty of classical music, and performing the piece in F minor supports the preferences of the people who enjoy listening to classical music."

In other words, complete horseshit.

> I feel as if I'm asking something fundamental that hasn't been considered by insiders.

You're not. You're asking a stupid question and complaining that other people don't share your views on what makes a game fun.

I don't know the history, but it's consistent with all the other rules, e.g. checkmate stops the game one move before the king is captured, stalemate occurs if the king would have to open himself up to capture, etc.
Because the next move made by your opponent would trivially be to capture your king, ending the game.
If you remain in check you essentially lose the game during the next move.