## 2 Use of the Recurrent Neural Network  
The FNNs tend to be straightforward networks that associate inputs with outputs. They allow signals to travel one way only from input to output, as shown in Figure 1a. FNN has no feedback (loops); i.e., the output of any layer does not affect the same layer. In contrast, recurrent neural networks can have signals traveling in both directions, by introducing loops in the network, as shown in Figure 1b. RNN has been shown to be able to represent any measurable sequence-by-sequence mapping. Thus, RNN is being used nowadays for all kinds of sequential tasks, such as time series prediction, sequence labeling, and sequence classification. The RNN's ability to model time series forecasting problems is adequate to the development of the dynamic response prediction model of the buildings with semi-active control devices. If FNN is used for the dynamic response simulation model of a structure subjected to earthquake loads, the output responses of FNN are always equal given the same inputs (excitation and control command data). However, RNN has a mechanism by which it \"remembers\" the previous inputs, and produces an output based on all of the inputs. This mechanism causes the outputs of RNN to be determined based not only on the instant input values, but also on the trends (e.g., increase, decrease) of inputs. Accordingly, RNN can output different responses even when given the same inputs, resulting in a more accurate dynamic response simulation model. RNN can be structured in multiple ways, as shown in Figure 2. The bottom rectangle is the input, leading to the middle rectangle, which is the hidden layer, leading to the top rectangle, which is the output layer. The one-to-one model is the typical neural network with a hidden layer and does not consider sequential inputs and outputs. This model is frequently used for the image classification. The one-to-many model provides sequential outputs with one input, and thus it is generally applied to the image captioning that takes an image and outputs a sentence of words. The many-to-one model accepts sequential inputs and provides one output. The many-to-many model uses sequential inputs and sequential outputs. This model is suitable for machine translation. For example, an RNN reads a sentence in English and then outputs a sentence in French. Among the four architectures, the many-to-one model is the most suitable for the dynamic response simulation model. Several sequential ground motion and control command data are given as'many' inputs, while the dynamic responses of the specific time-step are provided as 'one' output in this study. The input and output variables of the RNN model are described in detail in the following section. A number of semi-active control devices have been used for the dynamic response reduction of building structures subjected to earthquake loads. One of the most promising semi-active control devices is the magnetorheological (MR) damper, because it offers many advantages, such as force capacity, high stability, robustness, and reliability. Because of their mechanical simplicity, high dynamic range, and low power requirements, MR dampers are considered to be good candidates for reducing structural vibrations, and they have been studied by a number of researchers for the seismic protection of civil structures [27; 28; 29]. A number of models for dynamic simulation of the MR damper have been proposed by many researchers [30; 31; 32]. These models can be classified into parametric and  
Figure 1: Difference between feedforward and recurrent neural networks: (**a**) Feedforward neural network; (**b**) Recurrent neural network. non-parametric models. The Bouc-Wen model is the most common parametric model. Most of the non-parametric models are based on soft computing techniques, such as neural networks, fuzzy logic, fuzzy neural network, neuro-fuzzy system, and deep neural networks [23; 27; 32].