An autonomous skid-steer machine includes a chassis, a plurality of ground engaging elements supporting the chassis on a ground surface and one or more computing devices for controlling movement of the machine. The one or more computing devices are configured to generate a control signal for controlling operation of at least some of the plurality of ground engaging elements, the control signal being generated according to a control algorithm incorporating tuning parameters, and to automatically determine the tuning parameters in real time during operation of the machine such that the control algorithm is always optimized for a current speed of the machine. The tuning parameters are found using the machine's current speed, a natural frequency value and a damping value.