Stockfish accepts this fen which says that black has short castling rights. That makes no sense.
[d] rrrrkr1R/rr1rr3/8/8/8/8/8/6K1 b k - 0 1
Invalid fen
Moderators: hgm, Rebel, chrisw
-
- Posts: 2559
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: Invalid fen
My engine accepts that FEN as well.Henk wrote:Stockfish accepts this fen which says that black has short castling rights. That makes no sense.
[d] rrrrkr1R/rr1rr3/8/8/8/8/8/6K1 b k - 0 1
It assumes it's a valid X-FEN from Chess960.
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Invalid fen
Engines. It's all crap.mar wrote:My engine accepts that FEN as well.Henk wrote:Stockfish accepts this fen which says that black has short castling rights. That makes no sense.
[d] rrrrkr1R/rr1rr3/8/8/8/8/8/6K1 b k - 0 1
It assumes it's a valid X-FEN from Chess960.
-
- Posts: 2559
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: Invalid fen
Blame the GUIs Arena's FRC supports is certainly crap and I had to add a hack to support FRC under Arena.Henk wrote:Engines. It's all crap.
My engine simply ignores UCI_Chess960 flag because it can be determined directly from the (X-/S-/FEN).
You may/may not like this approach. I like it because it makes the code simpler.
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Invalid fen
At least user should see a warning if it types an invalid fen. But maybe engines assume there are no Spartan users anymore that create fens. O yes it really assumes Spartan users.mar wrote:Blame the GUIs Arena's FRC supports is certainly crap and I had to add a hack to support FRC under Arena.Henk wrote:Engines. It's all crap.
My engine simply ignores UCI_Chess960 flag because it can be determined directly from the (X-/S-/FEN).
You may/may not like this approach. I like it because it makes the code simpler.
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Invalid fen
Actually problem was that Skipper computed perft(3) = 17838 instead of 17835. Because if short castling rights are set wrongly in the fen, Skipper doesn't correct them and a move like f8-h8 does not update them. For why should it be updated. So it thinks that after f8-h8 it can castle short.
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Invalid fen
what's the point of this trolling post? to ask a question to which you know the answer?Henk wrote:Stockfish accepts this fen which says that black has short castling rights. That makes no sense.
[d] rrrrkr1R/rr1rr3/8/8/8/8/8/6K1 b k - 0 1
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Invalid fen
Yes to troll only. Stockfish and more engines allow import of invalid fens. As I said they should at least give a warning. In the fen given above the user probably meant q instead of k. For castling on the queen side makes sense.lucasart wrote:what's the point of this trolling post? to ask a question to which you know the answer?Henk wrote:Stockfish accepts this fen which says that black has short castling rights. That makes no sense.
[d] rrrrkr1R/rr1rr3/8/8/8/8/8/6K1 b k - 0 1
Removing seven black rooks in this position would make it a more realistic example. [b8, c8, d8] and the rooks on the seventh row.
-
- Posts: 27811
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Invalid fen
Well, being user friendly does not bring any Elo, I guess. We should not forget that the purpose of the Stockfish project is to inflict maximal hurt on its users. That needs high Elo to make sure there will be any users, and then mess up anything else as long as it doesn't cost any Elo.
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Invalid fen
UCI is made for engine <-> GUI communication, so the engine can assume correct input, and any invalid input is a GUI bug. "Inflicting pain" to some smart ass user who knowingly inputs wrong FEN to fuel his trolling posts on talkchess… maybe that's a good thing ?hgm wrote:Well, being user friendly does not bring any Elo, I guess. We should not forget that the purpose of the Stockfish project is to inflict maximal hurt on its users. That needs high Elo to make sure there will be any users, and then mess up anything else as long as it doesn't cost any Elo.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.