Animals display rich and coordinated motor patterns during walking and running. Previous modelling as well as experimental results suggest that the balance between excitation and inhibition in neural networks may be critical for generating such structured motor patterns. However, biological neural networks have an anatomical imbalance between excitatory and inhibitory neural populations. We explore the influence of such an anatomical imbalance on the ability of a reservoir computing artificial neural network to learn human locomotor patterns for slow walking, fast walking and running. We varied the numbers of neurons, connections percentages and connection strengths of excitatory and inhibitory populations. We showed that performance depended on the network anatomy. First, it deteriorated when the total number of neurons was too small or the total connection strength was too large. Second, performance was critically dependent on the balance between excitation and inhibition. Imbalance towards excitation caused a reduction in the richness of internal network dynamics, leading to a stereotypical motor output and poor overall performance. In contrast, rich internal dynamics and good overall performance were found when the network anatomy was either balanced or imbalanced towards inhibition. This suggests that motor pattern generation may be robust to increased inhibition but not increased excitation in neural networks.1Author summaryHow does the anatomy of the nervous system allow the generation of the complex motor patterns observed during the movements of humans and other animals? We explore this question in a model of the spinal cord in which we vary the neural anatomy. We find that movement generation requires the neural network to have rich internal dynamics. Such rich internal dynamics emerge from the interaction between the excitatory and inhibitory neurons in the network. Strong inhibition causes fluctuations in the neural activity which allow rich motor patterns to be produced. However, strong excitation quenches these fluctuations and causes a reduction in the variability of motor patterns. When both excitation and inhibition are strong, the neural activity becomes chaotic, and dysfunctional, highly variable motor patterns are produced. We therefore predict that diseases of the nervous system which affect inhibitory and excitatory neurons differently will have a different signature in terms of motor patterns. Diseases causing increased excitation in neural circuits should lead to stereotypical motor behaviors, whereas diseases causing increased excitation and inhibition should lead to unstable motor patterns.