# Predicting the Magnitude of Earthquakes Using Grammatical Evolution
## 1 Introduction
In this article, a new generation of earthquake catalogs, developed through supervised machine learning, provides a means of capturing seismic activity in unprecedented detail. The use of unsupervised machine learning to more comprehensively analyze seismicity is suggested as the most efficient path toward enhancing earthquake forecasting [31]. The same researchers emphasize that machine learning and data mining techniques can greatly enhance our ability to process seismic data. In their review, they offer a comprehensive overview of machine learning applications in earthquake seismology, discuss recent advancements and existing challenges, and propose directions for future research [32]. In the current work, seismological data collected from the NSF Seismological Facility were obtained, and afterwards, these data were preprocessed, so that for each earthquake with a magnitude greater than 5, the closest earthquakes that had preceded it in various parts of the planet within a critical distance were identified. Then, the number of these preceding seismic vibrations and their average magnitude were added to these recordings. The purpose of the above process is to achieve the most accurate prediction of the magnitude of an earthquake based on its characteristics and the earthquakes that have preceded it within a predetermined distance. An attempt was then made to predict the magnitude of earthquakes using machine learning techniques based on the Grammatical Evolution method [33]. Grammatical Evolution is an evolutionary technique where chromosomes (candidate solutions) are expressed as a series of production rules of a provided BNF grammar [34]. Grammatical Evolution has been used in a series of problems, such as data fitting [35; 36], composition of music [37], video games [38; 39], energy problems [40], cryptography [41], economics [42], etc. Methods based on Grammatical Evolution were compared against various optimization techniques employed to train artificial neural networks [43; 44] for the prediction of the magnitude of earthquakes, and the results are presented and discussed. The limitations of the proposed work stem primarily from those that we imposed ourselves, as it is focused on the analysis of data from a three-year period. Moreover, in order to avoid overfitting, we deliberately excluded a significant portion of data from each year, and concentrated on seismic events with a magnitude greater than 5. In this study, is was observed that machine learning and soft computing techniques have a longstanding presence in the field of seismology. For instance, artificial neural networks (ANNs) were introduced to the field of seismology in 1994 [45]. The initial application of Deep Neural Networks (DNNs), featuring two hidden layers, emerged in 2002 [46], while the earliest implementation of Recurrent Neural Networks (RNNs) in the context of seismology appeared in 2007 [47]. However, they have yet to achieve so-called \"triple prediction\" namely, accurate forecasting of the date and time, location, and precise magnitude of seismic events. For this reason, in 2025, we adopt a groundbreaking approach employing Grammatical Evolution, a novel technique within the domain. Our initial approach involved the application of machine learning techniques. Specifically, we conducted experiments using the following algorithms: LSTM, RBF, MLP (BP, RPROP, BFGS), and SVM. Subsequently, we carried out an exploratory experiment employing Grammatical Evolution. The results proved to be so compelling that we decided to shift our focus and pursue this novel direction in greater depth. Moreover, our approach distinguishes itself from other studies in the field, as most existing research relies on data obtained directly from seismographs and primarily focuses on localized regions.