I want to try some reinforcement learning techniques (borrowed from AlphaZero, etc.) and so I need a chess environment in order to run games.
I code in python, so I found python-chess but unfortunately it is too slow to generate a large amount of games. Playing 100 games with random moves (average length of ~400 moves for a random game) takes 8 seconds, which doesn't scale to higher orders of magnitude well. My profiling shows that over 99.9% of the time taken is with the library as opposed to other code, so I can't optimize any further.
Is there already an existing chess environment that is faster than this in python?