An important component of dynamic compression x-ray diffraction (XRD) experiment analysis is geometry calibration: proper data interpretation requires knowledge of the precise detector position and orientation and, if the experiment involves a single-crystal sample, knowledge of the lattice orientation. The determination of these parameters in the arbitrary three-dimensional (3D) scattering geometries often present in dynamic compression facilities is challenging, as the associated optimization problem can be highly nonlinear, nonsmooth, and discontinuous. We present a genetic algorithm-based approach for performing dynamic compression XRD calibrations that overcomes these obstacles. We provide details regarding the image processing, algorithm implementation, and open-source software deployment and demonstrate the capability of the approach to calibrate the detector and crystal parameters in 3D geometries. Notably, we demonstrate the solver's capacity to find the crystal orientation without a priori rotation constraints.