Sounds like you are making a Braitenburg vehicle.
For training neural networks of just about any size and depth, you can use Google's free TensorFlow package. It has become quite popular and useful for recognition of shapes in images, and works very well if you have the patience to go through lots of input examples.
As pointed out above, you need to know how to recognize the output you want, for feedback to the network. Then you get a set of weights.
Naturally, all the training happens on a personal computer, not the Arduino.