Simulate realistic human motion in a virtual world with an optimization-based approach to motion prediction. With this approach, motion is governed by human performance measures, such as speed and energy, which act as objective functions to be optimized. Constraints on joint torques and angles are imposed quite easily. Predicting motion in this way allows one to use avatars to study how and why humans move the way they do, given specific scenarios. It also enables avatars to react to infinitely many scenarios with substantial autonomy. With this approach it is possible to predict dynamic motion without having to integrate equations of motion -- rather than solving equations of motion, this approach solves for a continuous time-dependent curve characterizing joint variables (also called joint profiles) for every degree of freedom.