Adds the current state calculation for neural network