  For idealized (spherical, smooth) dark matter halos described by
single-parameter density profiles (such as the NFW profile) there exists a
one-to-one mapping between the energy of the halo and the scale radius of its
density profile. The energy therefore uniquely determines the concentration
parameter of such halos. We exploit this fact to predict the concentrations of
dark matter halos via a random walk in halo energy space. Given a full merger
tree for a halo, the total internal energy of each halo in that tree is
determined by summing the internal and orbital energies of progenitor halos. We
show that, when calibrated, this model can accurately reproduce the mean of the
concentration--mass relation measured in N-body simulations, and reproduces
more of the scatter in that relation than previous models. We further test this
model by examining both the autocorrelation of scale radii across time, and the
correlations between halo concentration and spin, and comparing to results
measured from cosmological N-body simulations. In both cases we find that our
model closely matches the N-body results. Our model is implemented within the
open source Galacticus toolkit.
