Well, a neural network is good at making distinctions between the values of actions. Like if producing shell decreases pain of the organism (bots can't feed on it), it'd learn to do that. Produce too much shell, and it's pain would increase again (since pain is change in energy, and it takes energy to make shell) so it wouldn't make that much. So a neural net could theoretically figure out a good balance on the fly by 'learning'. The hardest part I think is figuring out the basic interactions between the bots/neurons.
PY, if I could make a suggestion, I would move ALL ties into a system like your new one for length and angle. I'll be working on tie physics a bit too (revamping the entire physics code 'cept collisions. Stupid drag got me excited about physics, such a headache) so tie angle and length commands may need to be modified in what they do, I'm not sure yet, I'll keep you posted.