Jan Brouwer wrote:michiguel wrote:It is unbelievable that this bug went unnoticed for such a long time. The tables are fine, but I missed two lines of code when probing a position with an en passant square.
Miguel
Hi Miguel,
I have been designing software for a living for many years now, and it still amazes me how easy it is (al least for me) to introduce bugs in what seems like straightforward code.
Programming should really be left to programs...
Jan
A bug is always a lesson.
The tables are fine because I designed a very thorough testing and validation procedure (every single position does a one ply search and probe their descendants and makes sure everything is compatible). On the other hand, the probing code has been tested with "only" a couple of hundreds of positions (tbtest in gaviota). But... they do not need to be switched. So, the biggest sin here was not the code itself but the testing procedure.
In addition, the fact that this bug went unnoticed is unbelievable but not surprising
Alpha-beta has a tremendous power to "heal itself" against bugs. It always find workarounds to pick the right move and that is why is so challenging to remove all bugs from a chess engine. A bug may reduce 3 ponts elo, but the program may not crash (or may do it 1 in 10000 games).
Miguel