Nanophotonic particle simulation and inverse design using artificial neural networks