## 2 Materials and Methods
This generalization property makes it possible to train a network on a representative set of input/target pairs and get good results without training the network on all possible input/output pairs. The most common backpropagation training algorithm is Levenberg-Marquardt, which has been used in this investigation. One hidden layer has been used in the ANN modeling with sigmoid transfer functions. Before training the selected data, normalization/scaling for the whole data has been conducted. This has been done since the sigmoid transfer function has been used in the network which recognizes values between 0 and 1. In order to scale the data from 0.1 to 0.9, minimum and maximum values have been taken to use linear relationship between those values. In the ANN modeling, 60% of the whole data has been specified as the training data in which the network could be adjusted according to its error. Similarly, 20% of the database has been considered as the validating data which have been used to measure network generalization and to halt training when generalization stops improving. Finally, the remaining 20% of the whole data has been specified as the testing data which have no effect on training, providing an independent measure of the network performance during and after training. The mean square error (MSE), which is the average squared difference between the outputs and targets, has been taken as the criterion for stopping the training of the networks. Lower values mean a better performance of the network (zero means no error). Regression values (R-values) measure the correlation between the outputs and targets in the networks: an R-value of 1 means a close relationship and in contrast, 0 means a random relationship. These two criteria (MSE and R-values) have been considered as the basis for selecting the idealized network. The natural periods of structures, peak ground acceleration (PGA) of earthquake records, height of buildings, and peak lateral displacements of independently vibrating structures have been defined as inputs in the analysis. These chosen variables (as the representatives of the structural properties and the characteristics of earthquake records) have been considered as the input signals for the neural network and it has been tried to generate some data by repeating the analysis for some ground motions and also buildings with different heights and periods in order to form a generalized database by which the target (critical separation gap) could be predicted. For instance, the maximum lateral displacement is the maximum displacement obtained from a time history analysis under a certain earthquake record. In each analysis, the required separation gap has been computed using a trial-and-error procedure. The analysis has been focused on adjacent reinforced concrete regular buildings with a square plan of 20 \(\times\) 20 m (see [36] to see how irregularity changes the displacement response). The height, mass, and stiffness of each story for them are equal to \(h\) = 3 m, \(m\) = 30,000 kg, and \(k\) = 2 \(\times\) 10\({}^{6}\) kg/m, respectively. Lumped mass models of structures, with the mass of each story lumped at the floor level, have been considered. Six models with a different number of stories (from one to six) have been analyzed. Their elastic (un-cracked) natural vibration periods, which depend directly on structural stiffness and mass, have been calculated as equal to T = 0.544 s, 1.24 s, 1.73 s, 2.215 s, 2.93 s, and 3.38 s for single-story, two-story, three-story, four-story, five-story, and six-story buildings, respectively. Two structures have been considered to be located close to one another, taking into account all possible combinations from the point of view of the different number of stories. The example of the arrangement, denoted as 3-2, indicating a three-story building adjacent to a two-story structure is presented in Figure 2.  
It should be underlined that this study uses linear elastic numerical models.