A neural network requires an input in the form of a float array, where each element typically falls within the range of 0 to 1. This normalization ensures that the data fed into the network is consistent and helps the network to converge more efficiently during training. By scaling the input values to this range, the network's learning process becomes more stable, reducing the risk of issues like exploding or vanishing gradients and improving the overall performance and accuracy of the model.

This NeuralNet comes with a helper called ‘Neural Input’, It helps you feed data to neural networks more easily.

image.png

Neural Input has several feature that may you needs

Input-Output

this part is the most important in NeuralInput, which defines the input and output.

Input and Stack Count

Input only allows array of float, but rest assured, if you enable AutoNormalizeInput you don’t need to normalize it manually into 0-1, it’ll build min-max value and interpolating the value to 0 and 1.

Next is StackCount, Stack Count is used to save the previous state of this agent, so the agent will have information of it’s previous Step.

for example,

Pos 1
[0,2]

you won’t get any information about where a Ball is moving to, and how fast is it, by only the current position. but, it’ll be different if you add stack of 3.

Pos 1 Pos 2 Pos 3
[0,0] [0,1] [0,2]

with this information, you’ll know that the ball is moving toward +Y axis, with a speed of 1.