Yes, it's Python parallel/delayed code which then calls up (8) C-threads, each thread plays out 1024 games (not chess). At the beginning of each game the piece square table is varied a bit, each entry has a small-ish randint based on rand() added to it.. The speed up is near linear, multiple parallel threads for game batches work fine. (Selecting "multiprocessing" slows it down by a factor of two, btw).mar wrote: ↑Fri Jan 11, 2019 5:58 amWait - could this possibly be related to the fact that you used Python, where threads are completely useless due to GIL and you have to use multiple processes?Code: Select all
int random() {return 42;}
Then your "bug" is directly related to the language "features" you used, not at all to the pseudo-code which tells absolutely nothing.
You're reading the scrappy pseudo code too literally! Sorry, my fault.
Each 1024 game batch comes back with identical game data, moves, result, everything as every other game batch, although the games within the batches are mostly different. Whereas, if I compute 8*1024 batches in serial, the games are all mostly different.
I have more or less fixed it, but in quite a scrappy way, and I've another quick fix idea to try, but was mostly wondering if anyone else ever faced a similar problem and how they got round it.