Statistics for Motion planning of a mechanical snake using neural networks