Economists typically make simplifying assumptions to make the solution and estimation of their highly complex models feasible. These simplifications include approximating the true nonlinear dynamics of the model, disregarding aggregate uncertainty or assuming that all agents are identical. While relaxing these assumptions is well-known to give rise to complicated curse-of-dimensionality problems, it is often unclear how seriously these simplifications distort the dynamics and predictions of the model. We leverage the recent advancements in machine learning to develop a solution and estimation method based on neural networks that does not require these strong assumptions. We apply our method to a nonlinear Heterogeneous Agents New Keynesian (HANK) model with a zero lower bound (ZLB) constraint for the nominal interest rate to show that the method is much more efficient than existing global solution methods and that the estimation converges to the true parameter values. Further, this application sheds light on how effectively our method is capable to simultaneously deal with a large number of state variables and parameters, nonlinear dynamics, heterogeneity as well as aggregate uncertainty.