This paper presents a general framework for representing and generating gaitsfor legged robots. We introduce a convenient parametrization of gait generators as dynamical systems possessing specified stable limit cycles over an appropriate torus. Inspired by biology, this parametrization affords a continuous selection of operation within a coordination design plane spanned by axes that determine the mix of ”feedforward/feedback” and centralized/decentralized” control. Applying optimization to the parameterized gait generation system allowed RHex, our robotic hexapod, to learn new gaits demonstrating significant performance increases. For example, RHex can now run at 2.4m/s (up from 0.8m/s), run with a specific resistance of 0.6 (down from 2.0), climb 45◦ inclines (up from 25◦), and traverse 35◦ inclines (up from 15◦).