Optimizing quantum dynamics in the age of machine learning