  The physics of planet formation is investigated using a population synthesis
approach. We develop a simple model for planetary growth including pebble and
gas accretion, and orbital migration in an evolving protoplanetary disk. The
model is run for a population of 2000 stars with a range of disk masses and
radii, and initial protoplanet orbits. The resulting planetary distribution is
compared with the observed population of extrasolar planets, and the model
parameters are improved iteratively using a particle swarm optimization scheme.
The characteristics of the final planetary systems are mainly controlled by the
pebble isolation mass, which is the mass of a planet that perturbs nearby gas
enough to halt the inward flux of drifting pebbles and stop growth. The pebble
isolation mass increases with orbital distance so that giant planet cores can
only form in the outer disk. Giants migrate inwards, populating a wide range of
final orbital distances. The best model fits have large initial protoplanet
masses, short pebble drift timescales, low disk viscosities, and short
atmospheric cooling times, all of which promote rapid growth. The model
successfully reproduces the observed frequency and distribution of giant
planets and brown dwarfs. The fit for super Earths is poorer for single-planet
systems, but improves steadily when more protoplanets are included. Although
the study was designed to match the extrasolar planet distribution, analogs of
the Solar System form in 1-2% of systems that contain at least 4 protoplanets.
