**Gravitational-wave observations** of double compact object mergers are rapidly providing new insights into the physics of **massive stars **and the **evolution of binary systems** [1,2,3]. The distributions of the inferred masses and spins of the black holes and neutron stars contain valuable information about their origin. Distinguishing different theories for their formation and learning about the complex physical processes that govern the lives of their possible massive-star progenitors requires comparing observed populations with theoretical predictions.

However, theoretical simulations of the population of merging double compact objects are challenging because gravitational-wave events represent an **extremely rare outcome** of binary evolution. From a thousand massive binary systems typically only of order one, or less, yields a double compact object [4]. A meaningful comparison with population observations requires simulating a statistically significant sample of events. Modeling binaries over cosmological volumes whilst exploring the uncertain physics requires running computationally expensive binary **population synthesis simulations** with billions of binaries that cost millions of CPU hours.

To make it feasible to simulate such large numbers of systems, all present-day simulations pay a high price. In many studies computational speed is ensured by using highly approximate algorithms that treat the physical processes in a simplified way. Another way to keep the computational costs reasonable is to limit the total number of simulations, restricting the exploration of the impact of the uncertain physical input assumptions beyond a few variations

To overcome this issue we developed the algorithm **STROOPWAFEL**: *Sampling The Rare Outcome Of Populations With AIS* For Efficient Learning.* We have designed STROOPWAFEL to improve the efficiency of simulations of rare astrophysical events, and so to enable accurate simulations of populations of extremely rare events at reasonable computational cost.

*AIS: Adaptive Importance Sampling