  The equation of state of cold supra-nuclear-density matter, such as in
neutron stars, is an open question in astrophysics. A promising method for
constraining the neutron star equation of state is modelling pulse profiles of
thermonuclear X-ray burst oscillations from hotspots on accreting neutron
stars. The pulse profiles, constructed using spherical and oblate neutron star
models, are comparable to what would be observed by a next-generation X-ray
timing instrument like ASTROSAT, NICER, or LOFT. In this paper, we showcase the
use of an evolutionary optimization algorithm to fit pulse profiles to
determine the best-fit masses and radii. By fitting synthetic data, we assess
how well the optimization algorithm can recover the input parameters. Multiple
Poisson realizations of the synthetic pulse profiles, constructed with 1.6
million counts and no background, were fitted with the Ferret algorithm to
analyze both statistical and degeneracy-related uncertainty, and to explore how
the goodness-of-fit depends on the input parameters. For the regions of
parameter space sampled by our tests, the best-determined parameter is the
projected velocity of the spot along the observer's line-of-sight, with an
accuracy of $\le3$% compared to the true value and with $\le5$\% statistical
uncertainty. The next best-determined are the mass and radius; for a neutron
star with a spin frequency of 600\,Hz, the best-fit mass and radius are
accurate to $\le5$%, with respective uncertainties of $\le7$% and $\le10$%. The
accuracy and precision depend on the observer inclination and spot co-latitude,
with values of $\sim1$ % achievable in mass and radius if both the inclination
and co-latitude are > 60 degrees.
