Free online Chess server. Play Chess now in a clean interface. No registration, no ads, no plugin required. Play Chess with the computer, friends or random opponents.
Create a game Tournament Simultaneous exhibitions
Chess basics Puzzles Practice Coordinates Study Coaches
Lichess TV Current games Streamers Broadcasts (beta) Video library
Players Teams Forum Questions & Answers
Analysis board Board editor Import game Advanced search
Sign in
  1. Forum
  2. Lichess Feedback
  3. Weird Castle

So I created a position to practice with the stockfish and he played castle when he already castled here. Here is the game:

The move is on move 12. for black. Is this a bug?

No, not a bug. The FEN for the position you set up indicates kingside castling is an option for both sides.

Just make sure you set the castling flags correctly when setting up a position; if you tell the computer kingside castling is legal in the start position, it will take you seriously :)

Right... technically the AI only castled once this game. :-)

oh yeah, I set it after black castled

but not a legal castle move
k was on kb1 square meaning it had already moved once

not if it is Chess960

Fun fact: there are positions in chess960 where you can play 1.0-0.

Strictly speaking if the game was standard game (not marked to be Chess960) this _is_ a bug. Standard chess rules doesn't depend on how you encode a given starting position (using FEN or anything else). This is a typical "always check your input!" kind of bug IMO.

@gbtami I understand the point, but this becomes rather a matter of preference.

It's quite true, of course, that if this had been a game played in the standard way, this position with kingside castling still available is impossible (and technically, this isn't possible in 960 either, since the king must start between the rooks, so whether it's marked 960 or not is irrelevant).

The board editor lets you set up all sorts of positions not legally achievable from the standard start position, though, and not just with respect to castling rights.

Whether such positions should be flatly disallowed for analysis and board setup is rather subjective.

It seems to me it is much more sensible to allow players to set up positions as they choose, and leave it up to the player to set it up in a way that is legally achievable from the start position, if this is what they desire.

I for one like being able to set up positions not legally achievable from the standard start position and analyze them sometimes; I'd rather not see all such positions rejected, but that's just my preference :)

@a_pleasant_illusion I agree with you that enabling to set up invalid positions in board editor can be a feature, but this is not what I'm talking about here. In standard chess 12... O-O is an invalid move here, so the GUI shoudn't enable it at all. It's not a valid/invalid setup issue. It's a valid/invalid _move_ (by FIDE rules of chess) issue.

Of course this is not a big issue because this will never occur in played games, but definitely a minor bug.