Energy-based learning algorithms for analog computing: a comparative study