phhnguyen wrote: ↑Mon Oct 13, 2025 11:39 am
syzygy wrote: ↑Wed Oct 01, 2025 3:50 am
I have just created this new repository:
https://github.com/syzygy1/probetool
I wrote the code such that it should be easy to integrate the probing code into an engine or GUI.
Thank you a lot for your excellent work!
Could you write clearly about the license of this code, please? I guess what it is, but I still prefer a clear thing.
There are no restrictions or requirements on the use of the code.
No permission is needed to use, modify and distribute it all you want.
You can even pick a license and pretend it is released under that license.
syzygy wrote: ↑Wed Oct 01, 2025 3:50 am
Of course Fathom already exists:
https://github.com/jdart1/Fathom
And there is probably no valid reason to switch if your engine uses Fathom.
(Unless your engine wants to learn to play Shatranj, for which I am going to write probing code next.)
A user of my chess GUI reported that it took too much memory when running with Syzygy 7 men for a while. My chess GUI uses a modified Fathom. I can't check since I don't have Syzygy 7. Could you manage to check/test both Fathom and your new code with Syzygy 7 men? Thanks a lot again.
I don't have 7 men either. But what you can do, certainly in a GUI, is call TB_release() to unmmap() the TB files.
Code: Select all
// TB_release() will release any mmap()ed tablebase files, reducing memory
// usage. This could be called between games, for example.
void TB_release(void);
When you call TB_release() there should not be any ongoing TB probes. Once TB_release() returns, you can continue probing.
In Fathom a similar effect can probably be achieved by calling tb_init(""), i.e. with empty path, which releases everything, and then calling tb_init() again with the correct path, which rescans the TB paths (which TB_release() avoids). But I did not check this.
Someone using 7-men tables should have enough RAM that there is no need for a swap file. So the swap file should be disabled -> no swapping! (and the OS will be forced instead to release RAM used to cache mmap()d TB files, which is exactly what you want).