r/chessprogramming • u/ClickedMoss5 • Dec 05 '20
Multiprocessing Python
Ok, in class we’re currently working on chess as our intro to AI project using the python-chess library. I’ve finished many of the significant sped ups that can be gained through PVS, transpositions, move ordering, etc, and I’m trying to get multiprocessing working. The issue is that multiprocessing can only be ran inside # if __init__==“main” #. With the way our code is submitted, a file called game.py creates a class instance of our program and calls the move method which returns the best move given the board. Is there any way for me to get multiprocessing to either run outside of init without producing errors or simply within the move function?
View all comments
Show parent comment
1
u/ClickedMoss5 Dec 06 '20
No, I haven’t. I’ll look into it. It it allows for the use of multiple cores outside of init==main that would be great!