A geometric explosion of data

I’m already facing up to the fact that the sheer amount of data in a game of Gobang / Gomoku / Connect 5 is quite a bit larger than in Connect 4; after all, the board is 15×15, where a Connect4 board is 7×6. 225 spaces on the board instead of 42 means you have a correspondingly greater number of inputs for the neural network to process.

Additionally, the games last longer. The average game of Connect 4 I saw lasted 10-20 moves (with most closer to 10). In the first tests I’ve done for Gomoku, the games last between 60-100 moves.

Finally, there’s the issue of convolution. Consider the two positions below:


Most people will see these two positions as being functionally equivalent. To traditional computer evaluation, however, they are completely distinct. Ideally, a neural network would generalize what it learns such that either one is equivalent. To facilitate this, I’ll be taking board positions like the above and shifting them over the available space on the board; I’ll also be rotating and flipping them.

With all of the above, I did some tests and found that each game would generate around 6,000 pieces of training data, as opposed to about 12 for a game of Connect 4.

Since it won’t be practical to run as many games per training set (the time to train would quickly prove ridiculous), I’m going to prime each training set with a series of examples standard positions meant to train the neural network in the basics of play. Hopefully, this will result in better performance overall.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s