

I would propose to use 9 neurons in the intermediate layer. For that, you need at least one intermediate layer. However, you need to give your neural net the opportunity to put the inputs into relation. Well, you have an input layer of 18 neurons, and an output layer of 1 neuron. So the output value is the sum of the weights of the activated input neurons: Output = SUM(ActivatedInputNeurons)ĭo you think this is a good way of programming the network? Do you have better ideas? Whenever there is a neuron to be activated, I add the weight to the output value. The I would walk through the array using a loop. The values of this array are the input weights. The lower it is, the better is it for Player 2.īut my problem is: How could I code that neural network? My idea was to use an Array for the input neurons. The higher the output value is, the better is the position for Player 1. In addition to that, I have 1 output neuron which gives an evaluation of the current board position. For every field, I have 1 input neuron for a piece of Player 1 and 1 neuron for a piece of Player 2. My configuration for the network is as follows:įor each of the 9 fields, I use 2 input neuron. I want to play Tic-tac-toe using an artificial neural network.
