Joint torque optimization for redundant manipulators using neural networks