Techniques for training artificial neural networks (ANNs) and convolutional neural networks (CNNs) using simulated dynamical electron diffraction patterns are described. The premise is based on the following facts. First, given a suitable crystal structure model and scattering potential, electron diffraction patterns can be simulated accurately using dynamical diffraction theory. Secondly, using simulated diffraction patterns as input, ANNs can be trained for the determination of crystal structural properties, such as crystal orientation and local strain. Further, by applying the trained ANNs to four-dimensional diffraction datasets (4D-DD) collected using the scanning electron nanodiffraction (SEND) or 4D scanning transmission electron microscopy (4D-STEM) techniques, the crystal structural properties can be mapped at high spatial resolution. Here, we demonstrate the ANN-enabled possibilities for the analysis of crystal orientation and strain at high precision and benchmark the performance of ANNs and CNNs by comparing with previous methods. A factor of thirty improvement in angular resolution at 0.009 degrees (0.16 mrad) for orientation mapping, sensitivity at 0.04% or less for strain mapping, and improvements in computational performance are demonstrated.