I've coded my own engine (Java), it was working nicely on a level where you find like tens of thousands of it. But I was happy and continued to work on some more enhancements, transposition tables lately. This is where the problems arised: From time to time the engine did "funny" though bad moves. So you ask the expert: Dr. Google and I landed here, where I was not the only one facing such strange behaviour, and I've read quite a number of threads. This ist what happened to me, well more or less ...
I read in Thread 1: "Checkout your move and zobrist hash generation, this is the most common issue!"
I think: "Nah, come on, this thing is working perfectly! It's something else!"
I read in Thread 2: "Checkout your move and zobrist hash generation, this is the most common issue!"
I say: "No, no ... I've got even Unit tests proving they are working perfectly! It has to be something more exclusive!"
I read in Thread 3: "Checkout your move and zobrist hash generation, this is the most common issue!"
I shout: "Come on! Stop it! I'm a paid developer for 20+ years! I'm able to handle a simple algorithm like this! Tell me where the real problem is!"
Well, needless to say, that I've found the error. I've screwed up and forgot to put the color to move into the zobrist hash key after some refactoring, and yes there is no unit test that does prove it is different between white and black.
Lesson learned: A good test coverage does not show missing code
So, all you people answering questions to newbies! Thank you! You do not only help the people that open threads, but also ignorants like me!
Greetings from Switzerland,
Bernhard
