We analyze the lateral undulatory motion of a natural or artificial snake or other slender organism that ''swims'' on land by propagating retrograde flexural waves. The governing equations for the planar lateral undulation of a thin filament that interacts frictionally with its environment lead to an incomplete system. Closures accounting for the forces generated by the internal muscles and the interaction of the filament with its environment lead to a nonlinear boundary value problem, which we solve using a combination of analytical and numerical methods. We find that the primary determinant of the shape of the organism is its interaction with the external environment, whereas the speed of the organism is determined primarily by the internal muscular forces, consistent with prior qualitative observations. Our model also allows us to pose and solve a variety of optimization problems such as those associated with maximum speed and mechanical efficiency, thus defining the performance envelope of this mode of locomotion.undulatory locomotion ͉ optimization ͉ snake ͉ worm S lender organisms such as sperms, worms, snakes, and eels propel themselves through a fluid using undulatory waves of flexure that propagate along their body (1). However, undulatory propulsion is not limited to movements through a liquid. Indeed, the side-to-side slithering of snakes, worms, and other elongated organisms that ''swim'' on land by lateral undulation has piqued the curiosity and interest of humans since biblical times (2). § It is only in the last century that we have begun to understand this unusual (and seemingly inefficient) mode of locomotion (3). These studies continue into the present, as zoologists try to decipher the neural and physiological bases for the generation of rhythmic patterns of muscular contraction (4,5) and engineers build and analyze hyperredundant robotic machines inspired by these organisms (6, 7). From a mechanistic perspective, lateral undulatory locomotion on land has its genesis in the interaction between retrograde flexural waves propagating along the slender body and anisotropic frictional contact with a solid environment. ¶ Although this has been known qualitatively for a long time (1,3,8,9), a number of questions remain. In particular, understanding the coupling of the endogenous dynamics of muscular force generation to the exogenous dynamics of the interaction of the organism with its external environment to determine the gait and velocity remains an open question. Furthermore, the important aspects of locomotion associated with gait selection in the presence of sensorimotor feedback are not addressed. Lateral undulatory locomotion on land allows us to approach both these basic questions directly in the context of a relatively simple and realistic model for the exogenous dynamics, allowing the organism's gait, defined here as the periodic shape of the organism, its velocity, and the reactive forces on it to be determined simultaneously. In addition, the simplicity of the model allows us to explore th...