## 1 Introduction
Literature [18] uses a support vector machine (SVM) to establish a ship trajectory prediction model and adopts speed over ground (SOG), course over ground (COG), longitude (LON), latitude (LAT), and time stamp as the input sample features, which improves the prediction efficiency and accuracy to a certain extent; however, SVM has shortcomings such as weak generalization ability and ease of falling into local extreme values. [PERSON] [19] proposed a dual linear auto-encoder method to predict the future trajectories of selected ships. The auto-encoder consists of two modules, encoding and decoding, which can extract hidden features of AIS data, and the model can predict the trajectory of multiple ships. However, in the process of trajectory features extraction, useless data features cannot be effectively filtered, so the prediction effect of the model is poor. [PERSON] [20] proposed a method for predicting ship trajectory based on an extreme learning machine (ELM). As a single-hidden-layer feed-forward neural network model, the ELM does not require weights and biases of the iterative network and has a high calculation speed. However, the number of hidden-layer nodes in the ELM model is difficult to determine, which affects the generalization performance of the network. Recurrent neural networks (RNNs) have been extensively developed due to their powerful ability to process sequence information and predictable time information. [PERSON] et al. [21] improved the RNN unit structure and proposed a long short-term memory network (LSTM) model, which solved the problems of gradient disappearance, gradient explosion, and insufficient information memory ability by designing the \"gate\" structure, and LSTM networks can effectively use long-distance timing information [22]. LSTM networks have been successfully applied in speech recognition [23], text processing [24], and other fields, yet there are some defects key hyperparameters, such as the number of hidden-layer neurons, learning rate, etc., which are difficult to determine [25]. Because the number of hidden-layer neurons plays a decisive role in the fitting ability of the model, the learning rate directly affects the convergence speed and calculation time of the model and the topology of the model is controlled directly by the LSTM network structure parameters. Therefore, the prediction performance of the model established by different hyperparameters is quite different, and how to select the appropriate parameters is very important for the establishment of the model. At present, the hyperparameters of the network model are often selected based on the experience of the researchers and the results of multiple experiments. The randomness is relatively large, which affects the prediction performance of the model to a certain extent. In order to predict the ship trajectory quickly and accurately, this paper adopts the LSTM network model [26, 27, 28] as the technical basis to establish an inland river ship trajectory prediction model. Considering that the key hyperparameters of the current LSTM model are difficult to determine, such as the number of hidden-layer neurons, learning rate, etc., the genetic algorithm (GA) is proposed to optimize the key hyperparameters of LSTM networks. The model takes LOG, LAT, SOG, and COG as the input features and the future position of the ship as the target output. The LSTM neural network model optimized by the GA (GA-LSTM) is used to predict the ship trajectory. The experimental results show that, compared with the current classical LSTM and SVM, the algorithm proposed in this paper can predict the ship trajectory more quickly and accurately to a certain extent. The remainder of this paper is organized as follows. Section 2 describes the ship trajectory prediction model. Section 3 describes the theoretical background of the LSTM, GA and GA-LSTM models. Moreover, Section 4 mainly contains experiments and analysis. Finally, Section 5 concludes the paper.