A study of a general central pattern generator (CPG) is carried out by means of a measure of the gain of information between the number of available topology configurations and the output rhythmic activity. The neurons of the CPG are chaotic Hindmarsh-Rose models that cooperate dynamically to generate either chaotic or regular spatiotemporal patterns. These model neurons are implemented by computer simulations and electronic circuits. Out of a random pool of input configurations, a small subset of them maximizes the gain of information. Two important characteristics of this subset are emphasized: (1) the most regular output activities are chosen, and (2) none of the selected input configurations are networks with open topology. These two principles are observed in living CPGs as well as in model CPGs that are the most efficient in controlling mechanical tasks, and they are evidence that the information-theoretical analysis can be an invaluable tool in searching for general properties of CPGs.