An information processing apparatus for optimizing an arrangement of internal knots and control points of a nonuniform B-spline that approximates waveform data, representing motion data, comprising: selection means configured to select, in respect of the waveform data, a plurality of nonuniform interval width sequences for a knot interval between internal knots, so as to enable the waveform data to be approximated to a nonuniform B-spline; generation means configured to generate, for each of the plurality of interval width sequences selected by the selection means, a knot vector that is based on the interval width sequence, by sampling the width between the nonuniform knots in each knot vector according to a multivariate normal distribution having a predetermined mean and variance; determination means configured to determine an optimal control point sequence for each of the knot vectors generated by the generation means; evaluation means configured to use an objective function to evaluate an approximation error with the waveform data, for a nonuniform B-spline defined for each combination of a knot vector and an optimal control point sequence corresponding to the knot vector; and control means configured to perform control so as to repeat the selection of a plurality of interval width sequences by the selection means, the generation of knot vectors by the generation means, the determination of optimal control point sequences by the determination means, and the evaluation by the evaluation means, until an evaluation indicating that the approximation error has been converged to a value regarded as a minimum is obtained by the evaluation means, wherein the control means, in the case where an evaluation indicating that the approximation error has been converged to a value regarded as a minimum is not obtained by the evaluation means, are configured to update the mean and the variance of the multivariate normal distribution using a plurality of candidate solutions, based on a predetermined number of interval width sequences selected in ascending order of the approximation errors from the plurality of interval width sequences selected by the selection means, and to cause the operations to be repeated using the multivariate normal distribution after updating. selection means configured to select, in respect of the waveform data, a plurality of nonuniform interval width sequences for a knot interval between internal knots, so as to enable the waveform data to be approximated to a nonuniform B-spline; generation means configured to generate, for each of the plurality of interval width sequences selected by the selection means, a knot vector that is based on the interval width sequence, by sampling the width between the nonuniform knots in each knot vector according to a multivariate normal distribution having a predetermined mean and variance; determination means configured to determine an optimal control point sequence for each of the knot vectors generated by the generation means; evaluation means configured to use an objective function to evaluate an approximation error with the waveform data, for a nonuniform B-spline defined for each combination of a knot vector and an optimal control point sequence corresponding to the knot vector; and control means configured to perform control so as to repeat the selection of a plurality of interval width sequences by the selection means, the generation of knot vectors by the generation means, the determination of optimal control point sequences by the determination means, and the evaluation by the evaluation means, until an evaluation indicating that the approximation error has been converged to a value regarded as a minimum is obtained by the evaluation means, wherein the control means, in the case where an evaluation indicating that the approximation error has been converged to a value regarded as a minimum is not obtained by the evaluation means, are configured to update the mean and the variance of the multivariate normal distribution using a plurality of candidate solutions, based on a predetermined number of interval width sequences selected in ascending order of the approximation errors from the plurality of interval width sequences selected by the selection means, and to cause the operations to be repeated using the multivariate normal distribution after updating.