Legged robots are intrinsically nonlinear hybrid dynamic systems due to the intermittent contact of the feet with the ground. For optimal performance, in the sense of maximizing speed or energy consumption, different motion control affects the stance from the swing leg during a stride. Designing such controllers, however, can be a daunting task when there is a lack of knowledge about the exact operating conditions, i.e., the surface on which the robot walks or runs. To address this problem, we present a model-free learning controller making use of a supervised machine learning method called Local Linear Regression. This method allows the controller to online adjust its controller parameters as a function of the state. We demonstrate this approach on a tunable stiffness and damping controller for a quadrupedal legged robot. The controller learns to compensate for friction and other nonlinear effects encountered while walking in an average sense, without the use of explicit models. Experimental results with the robot walking on a treadmill are presented.