AI in physics: selected studies in classical and quantum mechanics