No TT hits with optimizations

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

niel5946
Posts: 174
Joined: Thu Nov 26, 2020 10:06 am
Full name: Niels Abildskov

Re: No TT hits with optimizations

Post by niel5946 »

mar wrote: Tue Feb 23, 2021 1:56 pm I see now that your problem is actually a non-determinism between debug and release build - might be some uninitialized variables?

I've also noticed that you use masking when probing TT, but I don't see where you round numEntries to a power of two; while it still works for your default TT size, it might not for arbitrary TT sizes;
still even this doesn't explain the problems you're facing.
I hadn't even thought about that... But I implemented your PRNG and now with 16MB hash debug and release give the same results.

I will fix the rounding problem soon to get rid of unwanted behaviour at other TT sizes. I will also check for uninitialized variables and just generally take a day next week to do a bug-hunt.
Thank you for your help :)
Author of Loki, a C++ work in progress.
Code | Releases | Progress Log |
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: No TT hits with optimizations

Post by Ras »

niel5946 wrote: Tue Feb 23, 2021 5:50 pmI will also check for uninitialized variables and just generally take a day next week to do a bug-hunt.
I highly recommend cranking up your compiler to the maximum warning level. Never accept code with warnings because once the engine throws dozens of compiler warnings, you won't see those that might hint to actual bugs. Otherwise, CppCheck is a nice GUI driven program, and also it's free open source.
Rasmus Althoff
https://www.ct800.net