This paper describes a technique that employs cost functions to produce complex motions. Cost functions can be used to define goal-oriented motions and actions. A cost function can be defined whose variables are the animated parameters of a scene. The parameters are modified in such a way to minimize the cost function. The minimum cost configuration can be viewed as a "key goal" configuration. The values of the parameters are stored at certain intervals during the minimization process. This produces a path through the parameter space of the model being animated. By incrementally moving along the parameter space curve and updating the model defined by the parameters, an animation of the model performing a goal-oriented action may be produced.