The mechanisms of pattern formation during embryonic development remain poorly understood. Embryonic stem cells in culture self-organise to form spatial patterns of gene expression upon geometrical confinement indicating that patterning is an emergent phenomenon that results from the many interactions between the cells. Here, we applied an agent-based modelling approach in order to identify plausible biological rules acting at the meso-scale within stem cell collectives that may explain spontaneous patterning. We tested different models involving differential motile behaviours with or without biases due to neighbour interactions. We introduced a new metric, termed stem cell aggregate pattern distance (SCAPD) to probabilistically assess the fitness of our models with empirical data. The best of our models improves fitness by 70% and 77% over the random models for a discoidal or an ellipsoidal stem cell confinement respectively. Collectively, our findings show that a parsimonious mechanism that involves differential motility is sufficient to explain the spontaneous patterning of the cells upon confinement. Our work also defines a region of the parameter space that is compatible with patterning. We hope that our approach will be applicable to many biological systems and will contribute towards facilitating progress by reducing the need for extensive and costly experiments.