We describe an algorithm that searches the parameter space of rate theories to optimize the associated rate coefficients based on a fit to experimental (or any other) data. Beginning with an initial set of parameters, which may be estimated, partially calculated, or indeed random, the algorithm follows a path, calculating the error at each point, until a minimum error is reached. We illustrate our method by correcting a previously proposed rate theory for the nucleation and growth of graphene on Ru(0 0 0 1) and Ir(1 1 1) to account for the temperature dependence of the graphene island density. This quantity shows an exponential decrease as the temperature is raised, in contrast to the power law decrease predicted by conventional nucleation theory, which indicates that a qualitatively different mechanism is operative for graphene island formation. Other applications of our method are also discussed.