From mind to machine: neural circuits, learning algorithms, and beyond