Posts

Showing posts from September, 2022

Simulating Pente in Python (Data Generation and Labeling)

Image
  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...

Introduction to Pente AI

Image
Approximating Optimal Solutions to Massively Complex, Deterministic Games What do Google Maps, many board games, and social media websites have in common?  These are a small subset of things that have parts that can be modeled as "graphs".  For anyone who is not familiar with computer science or discrete math lingo, the word " graph " here does not refer to a visualization or plot, but instead it refers to a collection of connected data points, where each data point is called a "node" and each connection between nodes is called an "edge". For example, with Google Maps, nodes may represent road intersections and edges may represent the streets or highways connecting those intersections.  With a board game like Chess, though, the nodes may represent game states (i.e. a snapshot of where all pieces are at or before a player takes a turn) and the edges may be the moves taken to get from one game state to another.  With social media websites, the node...