Ab initio density functional theory calculations are presented on cyclization reactions of polyaromatics involved in coke formation during the thermal cracking of hydrocarbons. During coke formation, cyclization can take place at various sites, differing from each other by the local polyaromatic structure. This local structure also determines the minimum number of carbon atoms that must be added to allow the formation of a new ring. Kinetic parameters are calculated for the various ring-closure reactions by means of transition state theory. The activation energy is largely affected by the local structure of the polycyclic aromatic hydrocarbon, whereas the frequency factor varies significantly in terms of the length of the attached alkyl chain. The calculations, as presented, give a microscopic insight into the mechanisms that contribute to barrier formation and to the value of the frequency factor. The relative importance of cyclization at different sites, under conditions typical for an industrial cracking unit, is studied on the basis of the calculated rate constants at various temperatures. The results suggest that the nature of coke formation is autocatalytic: the larger the macroradicals, the faster the subsequent reactions that lead to further growth of the polyaromatic surface. This type of calculation is the first step towards the development of structural relations for the kinetic parameters in terms of the local structure of the coke matrix.