Reproducing stellar structures in the Magellanic Clouds using a genetic algorithm with N-body simulations | Synapse