Many types of large cells have multiple nuclei. In skeletal muscle fibers, the nuclei are distributed along the cell to maximize their internuclear distances. This myonuclear positioning is crucial for cell function. Although microtubules, microtubule associated proteins, and motors have been implicated, mechanisms responsible for myonuclear positioning remain unclear. We used a combination of rough interacting particle and detailed agent-based modeling to examine computationally the hypothesis that a force balance generated by microtubules positions the muscle nuclei. Rather than assuming the nature and identity of the forces, we simulated various types of forces between the pairs of nuclei and between the nuclei and cell boundary to position the myonuclei according to the laws of mechanics. We started with a large number of potential interacting particle models and computationally screened these models for their ability to fit biological data on nuclear positions in hundreds of Drosophila larval muscle cells. This reverse engineering approach resulted in a small number of feasible models, the one with the best fit suggests that the nuclei repel each other and the cell boundary with forces that decrease with distance. The model makes nontrivial predictions about the increased nuclear density near the cell poles, the zigzag patterns of the nuclear positions in wider cells, and about correlations between the cell width and elongated nuclear shapes, all of which we confirm by image analysis of the biological data. We support the predictions of the interacting particle model with simulations of an agent-based mechanical model. Taken together, our data suggest that microtubules growing from nuclear envelopes push on the neighboring nuclei and the cell boundaries, which is sufficient to establish the nearly-uniform nuclear spreading observed in muscle fibers.