Simulating Pente in Python (Data Generation and Labeling)

The goal here is not to try to solve a traditional supervised training neural network task, like image classification or house price regression, so the data collection methods must be different. Instead of "collecting" data, a game simulation must be used to simulate the game logic behind Pente, and to enable running thousands of games of Pente in only a few minutes. This has several implications for data cleaning and preparation... mainly, these steps are integrated into the data generation step so they don't need to be done separately later. For those interested, the entire code for the simulator can be interacted with here on Google Colab . Simulating the Game Pente is a fairly easy game to simulate because the win conditions and rules are both simple. Legal moves are simply determined by whether a board position is occupied or not, and finding unoccupied positions on the board is not a computationally or conceptually difficult process. Then, out o...