  As matter accretes onto the central supermassive black holes in active
galactic nuclei (AGN), X-rays are emitted. We present a population synthesis
model that accounts for the summed X-ray emission from growing black holes;
modulo the efficiency of converting mass to X-rays, this is effectively a
record of the accreted mass. We need this population synthesis model to
reproduce observed constraints from X-ray surveys: the X-ray number counts, the
observed fraction of Compton-thick AGN [$\log$ (N$_{\rm H}$/cm$^{\rm -2}$) $>$
24] and the spectrum of the cosmic X-ray background (CXB), after accounting for
selection biases. Over the past decade, X-ray surveys by {\it XMM-Newton}, {\it
Chandra}, \textit{NuSTAR} and \textit{Swift}-BAT have provided greatly improved
observational constraints. We find that no existing X-ray luminosity function
(XLF) consistently reproduces all these observations. We take the uncertainty
in AGN spectra into account, and use a neural network to compute an XLF that
fits all observed constraints, including observed Compton-thick number counts
and fractions. This new population synthesis model suggests that,
intrinsically, 50$\pm$9\% (56$\pm$7\%) of all AGN within z $\simeq$ 0.1 (1.0)
are Compton-thick.
