  We present a fast and accurate method to select an optimal set of parameters
in semi-analytic models of galaxy formation and evolution (SAMs). Our approach
compares the results of a model against a set of observables applying a
stochastic technique called Particle Swarm Optimization (PSO), a self-learning
algorithm for localizing regions of maximum likelihood in multidimensional
spaces that outperforms traditional sampling methods in terms of computational
cost. We apply the PSO technique to the SAG semi-analytic model combined with
merger trees extracted from a standard $\Lambda$CDM N-body simulation. The
calibration is performed using a combination of observed galaxy properties as
constraints, including the local stellar mass function and the black hole to
bulge mass relation. We test the ability of the PSO algorithm to find the best
set of free parameters of the model by comparing the results with those
obtained using a MCMC exploration. Both methods find the same maximum
likelihood region, however the PSO method requires one order of magnitude less
evaluations. This new approach allows a fast estimation of the best-fitting
parameter set in multidimensional spaces, providing a practical tool to test
the consequences of including other astrophysical processes in SAMs.
