The objective of this project is to develop methods to design control systems for humanoid robots that show human levels of competence, robustness and flexibility in locomotion on human-scale rough terrain, focusing on responses to errors such as slipping and tripping, and responses to perturbations caused by irregular terrain. The research is motivated by the large disparity between human performance and current robot performance. The project uses a data-driven approach, utilizing motion data recorded from people to create trajectory libraries of these behaviors. It develops algorithms that allow these libraries to be adapted for robot control and generalized through interpolation, resequencing, and optimization for new environments. The project also explores strategy selection, modeling what strategies humans use in different situations. The project will have intellectual impacts in making better robots and understanding people better. The project will demonstrate better robot performance as well as more accurate models and simulations of human behavior. In both cases scientific publications will be augmented by extensive additional material and data on the web. Potential applications include insight into how the changes in the motor and sensory systems due to aging increase the risk of falling. The project may develop ways to change environments and train at-risk people to reduce the risk of falling.