  We have modelled the process of reionization of the IGM by photoionization by
galaxies, in order to predict the epoch of reionization. We use a sophisticated
semi-analytic model to track the formation of galaxies. Our study represents a
much more complete and physically consistent modelling of reionization than has
been conducted in the past, containing significant improvements in the
modelling of the collapse of baryons into dark matter halos, and in the model
for the cooling and condensation of gas within halos (including photoheating
from a self-consistently computed ionizing background and cooling due to H2).
We find that reionization can be achieved by z~10-20 in a LCDM cosmological
model with sigma8~0.9. However, a cosmological model with a running spectral
index is only able to achieve reionization before z~9 if extreme assumptions
are made about the physics of feedback at high redshifts. We also consider the
galaxy formation model discussed by Baugh et al., and find that it is able to
reionize the Universe by z~12. The previous results assume that all of the
ionizing photons produced by stars in galaxies are able to escape and ionize
the IGM. If this is not the case, then the redshift of reionization could be
substantially reduced. We find that extended periods of partial reionization
and double reionizations can occur in models in which the first stars formed
via cooling by H2 molecules, are very massive, and in which the escape fraction
of ionizing photons ~10-30%. Such models do not fully reionize until z~6-7, but
predict an electron scattering optical depth as large as 0.15. Models with
lower sigma8=0.7-0.8 as suggested by the recent WMAP three year data have
reduced redshifts of reionization, but can be consistent with the lower optical
depth also suggested by the WMAP three year data.
