Simple optimization models show that bipedal locomotion may largely be governed by the mechanical work performed by the legs, minimization of which can automatically discover walking and running gaits. Work minimization can reproduce broad aspects of human ground reaction forces, such as a double-peaked profile for walking and a single peak for running, but the predicted peaks are unrealistically high and impulsive compared to the much smoother forces produced by humans. The smoothness might be explained better by a cost for the force rather than work produced by the legs, but it is unclear what features of force might be most relevant. We therefore tested a generalized force cost that can penalize force amplitude or its n-th time derivative, raised to the p-th power (or p-norm), across a variety of combinations for n and p. A simple model shows that this generalized force cost only produces smoother, human-like forces if it penalizes the rate rather than amplitude of force production, and only in combination with a work cost. Such a combined objective reproduces the characteristic profiles of human walking (R² = 0.96) and running (R² = 0.92), more so than minimization of either work or force amplitude alone (R² = -0.79 and R² = 0.22, respectively, for walking). Humans might find it preferable to avoid rapid force production, which may be mechanically and physiologically costly.