## 1 Introduction  
Road accidents are one of the main disasters during coal mining, which seriously restricts the yield of mines and threatens the safety of production [1]. The most direct cause of roof accidents is excessive roof pressure on the working face, which leads to roof caving, sheet walls, roof support collapse, and impact ground pressure [2; 3]. Therefore, improving roof pressure monitoring and prediction is an effective method to reduce roof accidents, and so is of great significance in coal mine production safety. In the process of roof pressure monitoring and prediction, it is very important to calculate the strength and interval of the first weighting. The first weighting indicates that the working face support forces generally increase when the roof of the coal mine face collapses for the first time. At present, there are two methods to determine the first weighting strength and interval. One is the estimation method, which is calculated according to the existing mine pressure research results and uses an empirical formula. Due to the numerous and complex factors affecting the first weighting, various estimation methods are used in different conditions, but they are not sufficiently accurate. Another method is practical measurement, which determines the first weighting strength and interval of the adjacent working face according to the measured data of the mined working face [4; 5; 6]. How to determine the strength and interval more accurately is an urgent problem to be solved in production. Because the first weighting of the coal mine roof is mainly affected by the geological conditions and mining parameters, and the relationship between them is nonlinear for the same or similar mining geological conditions and mining parameters, we can make use of artificial neural network technology in terms of the analysis of the measured training data for one mining area to predict another one. In recent years, with the rapid development of artificial intelligence technologies, artificial neural networks have been widely used to deal with nonlinear problems in coal mining and rock mechanics [6; 7; 8; 9; 10]. [PERSON] et al. (2010) used a coupled fault tree analysis (FTA) and artificial neural network (ANN) model to improve the prediction of the potential coal and gas outburst events during the underground mining of thick and deep coal seams in China [11]. A gray model that combines the finite element method (FEM) and an artificial neural network (ANN) was developed for a more precise prediction of pore pressure changes [12]. The recorded nonlinear behavior of the mudrock is modeled using an artificial neural network (ANN). Using this method facilitates the prediction of the swelling pressure of the argillaceous rocks with different swelling potentials and site conditions [13]. An artificial neural network is used to predict the surface subsidence caused by coal mining [14]. Inspired by these studies, we considered applying an artificial intelligence algorithm to the study of coal face roofs. This paper tries to use a BP neural network to predict the first weighting of the working face roof. The training results show that, although the BP model can predict the first strike step and strength, it has the disadvantages of easily falling into a local minimum and slow convergence speed. Other researchers have tried to solve these problems by combining the ANN with other optimization methods such as a genetic algorithm (GA), response surface methodology (RSM), particle swarm optimization (PSO), and ant colony optimization (ACO). For example, [PERSON] and [PERSON] have proven that both GA and ACO are highly effective at optimizing the performance of the neural networks to estimate the bottom hole pressure [15]. [PERSON] et al. introduced an efficient optimization method, combining RSM and GA to find the optimal topology of artificial neural networks (ANNs) for predicting color changes in rehydrated apple cubes [16].