elihaber / sascha

Simple chess engine
0 stars 0 forks source link

Engine recommends invalid move #5

Closed elihaber closed 3 years ago

elihaber commented 3 years ago

Describe the bug Sometimes the engine recommends a move like "a7`6". This causes the UI to reject it and wait for a proper move, which will never arrive.

To Reproduce Enter these commands:

  1. position startpos moves h2h4 g7g5 h4h5 g8h6 g2g4 h6g8 f2f4 b8a6 e2e4 e7e6 d2d4 h7h6 c2c4 d8e7 b2b4 c7c6 a2a4 b7b6 a4a5 g8f6 b4b5 b6a5 b5c6 a6c7 a1a4 c7a6 e4e5 d7d5 e5d6 f6e4 f4g5 c8b7 g5h6 e4g3 d6e7 e8e7 c6b7 f8h6 b1c3 h8g8 c1f4 h6f4 d1d3 g8h8 d3g3 h8b8 g3f4 b8h8 f4h6 a8c8 h6h8 e7d7 h8c8 d7d6 c8e6 f7e6 c3e4 d6e7 d4d5 e7f8 d5e6 f8g8 c4c5 g8f8 c5c6
  2. go wtime 1553096 btime 194926 winc 5000 binc 1000

In the log I see: Got 9 possible moves: a6b8 a6b4 a6c7 a6c5 a7`6 f8g7 f8e7 f8g8 f8e8

The move a7`6 is garbage. All 8 of the other moves are correct and they are all the legal moves possible.

Expected behavior I would expect to see this in the log: Got 8 possible moves: a6b8 a6b4 a6c7 a6c5 f8g7 f8e7 f8g8 f8e8

elihaber commented 3 years ago

Fixed.