How to properly represent a tic tac toe board to a CNN? I'm figuring out how to manipulate convolutional neural networks (CNN) in python and I want to apply this kind of NN to an agent player that plays tic tac toe. I know that's weird and the problem doesn't need some elaborate and complex solutions like CNN, but I'm using this environment just to learn better and compare with the training of a MLP that I implemented.

So, I'm trying to think about how to represent the board correctly as an input to the CNN. Unlike the chess board which we can think the input as 8x8x6 (8x8 as the 2d array representing the board and 6 channels which one representing the different pieces of the game), the tic tac toe is a bit more complicated for me because there are just one kind of piece. Is it possible and correct to represent the X and O as different pieces? Has anyone implemented something like this?
I used a tic tac toe board to explain the value of convolutions in my master's thesis (https://apps.dtic.mil/dtic/tr/fulltext/u2/1046500.pdf checkout page 21-23 if you are interested).  I think this illustration (extracted from my thesis) might answer the question on how you could represent the board to the CNN and what you hope your filters might learn through training. Presumably you could train the network to recognize playable spaces and predict best X/O placement as you add more layers to your network.  While this doesn't tell you how to do this, I think my diagram will be useful in developing what type of input you should provide your network and some of the dimensions in order to answer your question.