While developing my own engine (Redqueen chess) I've encountered some issues that I would like to share with you.
I'm pretty sure this is completely trivial to all the experts here, but I'd be happy if you could point me out some direction.
Obs.: I have to mention this is a hobby for me, so I lack the time I wish researching/testing or inspecting other's engines code.
1) What is the best way to calculate the engine amount of time to search a given position in various time controls?
For instance(UCI notation):
Code: Select all
go wtime 60000 btime 60000 winc 1000 binc 1000
Code: Select all
go wtime 180000 btime 180000 winc 0 binc 0
Is it worth?
Or simply divide the remaining time by an arbitrary game length?
2) I'm struggling trying to develop my engine for cross-platform compilation. Especially when I came to the multi-threading stuff.
I've tried to abstract threads by using frameworks like boost::thread. It works perfectly on Linux, but was crashing on Windows.
So I tried pthreads and it worked just fine on Linux - but crashed on Windows. Obviouslly boost::thread was crashing because it relays
on pthreads. The problem was in my MingW/pthreads-win32 distribution. I took a look at Glaurung source code and I saw that it implements both API's:
*unix pthreads and windows threads, controlling compilation with preprocessors. I didn't like it. It's to difficult to maintain. Any ideas?
3) I'm using boost unordered_map for the TT. What is the common correlation for the number of entries in the hashtable and its total memory occupancy in bytes?
Considering a Hash data value with size 12 bytes and a key with size 4, for example? Even adjusting some policy parameters in boost unordered_map, I think it is not well optimized for memory space usage. Should I develop my own TT data structure?
Thanks!