AI CHEATER- King in check and it ignored it

i basically got cheated on by the AI bot today . I put blacks king in check with my Hpawn and instead of moving out of check , black tried to move his B from C8 to H3 ( see photo) the game was allowing me to continue my move at that point as if the black king wasn’t in + . And it wasn’t allowing me to put the B back on C8 where it belonged . Any comments? obviously I was in a winning position and had to abandon the game at this point. By the way this was the AI internal bot at 1300 elo , not on chess.com .

update : since i had the position saved by taking a photo, i went ahead and used the game editor to replay the position. Turns out after the pawn h4+ , it was mate in one for white , next move . Something to remember, if your game freezes like this , just replay it out on the board editor . Still wanna know why the game did this (??? )

2 Likes

I can’t remember what it looks like when a piece captures. Is it possible it registered the pawn move as h3 instead of h4 and it was just capturing it?

that’s kinda weird. @jeff , any ideas?

I don’t think so because if the pawn was registerd on a3 instead of a4, A4 would be purple.

1 Like

It is likely a bug for this specific position - we will check it out and fix it in the next release.

I think the bishop thinks it can capture en-passant which might be a bug we introduced by accident. Or something went wrong with processing the checkmate.

Hey , thanks jeff for responding. A bishop who thinks hes a pawn and can capture en-passant. Funny as heck . Its all good I normally play against the Bots at 2000 elo , and just wanted a relaxing game to practice tactics . These new rules with bishop En-passant are hard to keep up with , especially when AI is making the rules :laughing:.. have a great day. :+1:

2 Likes

Question is, can you leverage the bishop en passant rule for yourself when playing against the AI? Would be fun to check

2 Likes

Were you able to reproduce the case if you set the position before H pawn move and remove it to the same position? I’ll try that myself tonight

Yes, we’re on it.

So the bug was that when we consider a move - we consider whether or not it leaves-or-exposes the king to check.

In this case, we had a bug where the move under consideration (the bishop move) was considered legal because our code was not careful enough when it was considering check relief via moves to an en passant square.. it was allowing any piece to relieve check via en passant.

It is now restricting the check relief via en passant to pawn moves only.

Fixed and will be out in next release.

Thank you for reporting

7 Likes

Well… I’ve reproduced the bug on the very first try, setting up both level to 11 (1400 elo). What’s interesting is that I’ve tried the illegal move thinking it will tell me to remove the pawn which it didn’t and next move I captured black king and then the board freaked out, check the pictures


Reproductible consistently, just tried once again and it’s working, same cheating behavior

1 Like

It looks like from Jeff’s response that it has been identified and fixed but won’t be in your board until the next release (next week?)

The conditions to produce it (you can do it with less pieces)

Set up a position where:

  1. You can advance a pawn 2 squares and check the king
  2. The opponent can move a non-pawn to the en passant square

It will falsely allow that move to the en passant square even though the king is in check.

You can set it up with just the two kings, 1 pawn, and 1 opposing piece to the pawn.

Turned out to be an old bug that has been in the code for a while. Just that no one ever reached a position like that (or more likely the first time the bug was reported).

If you encounter any bug of the sort - sharing a picture of the position and the illegal move in action helps us find it.

That said - these bugs are really rare and this may be the last one related to illegal moves. To give perspective on how rare - before this was like 18 months ago and we allowed the king to castle with a lost rook that was captured without moving (the code forgot to consider a rook may never move but may be gone).

More common bugs are things that have to do with unexpected timing conditions (i.e. you see two Ai moves in rapid succession because some thread timing issues). So there are still occasional things to track down. Sharing the info for us to reproduce helps.

4 Likes

:laughing:.. yeah , the absurdity of capturing blacks king .. !! how dare you .. wonder what the odds were of my playing into this happening. maybe time to buy some lotto tix