A learning control system using stochastic approximation for hill-climbing