Machine Learning and Cosmological Simulations