Smoothed algorithm