# Setting up Neural Network for this problem

I have a question regarding neural networks considering I am not an expert in NN. Assume have a 5 by 5 grid that depending on me pushing any square (or combination of squares) some of those squares (not necessarily the squares I have pushed) will light up. My question is:

1. Can we set this problem as a NN problem if I have a set of input and outputs? Assume input layer with 25 neurons where all are zero except the ones are pushed and output layer is another 25 neuron where all are zero except the squares that light up. Assume in my training data set I have done this experiment 50 times.
2. Let’s say, in my training set square (3,3) has never been pushed. Can my trained model predict what would the response be if the square is pushed. So basically if a square has not been pushed in training set can NN still be used for prediction?
3. At the end, if all this is possible how would you set up a problem like this? Which NN method would you choose?

## 1 Answer

1. Yes, you can use a neural network exactly with the architecture you have described. Just define a consistent mapping from your grid to your input and output layer shapes. For example square $(x,y)$ can map to input neuron $5*y + x$ for zero-based indexing.

2. If square (3,3) is never on in your training input data then it will be hard to predict what will happen in an unseen example where it is on, so the short answer is no. However, if you think your data exhibits any special structure you might be able to leverage this to still make a good prediction.

• If you think nearby squares behave similarly you might get good results with a convolutional neural network, which can learn from similar patterns nearby but possibly not exactly on the square you are interested in.

• If you think certain patterns of squares behave similarly despite translation or rotation you could augment your training data with translations and rotations and you might then have training examples where (3,3) is on.

With all that said, 50 training examples is low so it might be hard to get good results.