# A Long/Short-Term Memory Based Automated Testing Model to Quantitatively Evaluate Game Design
## 3 Proposed Framework: LSTM-Testing
### Phase 2: Extracting Feature by Deep Neural Network  
In the second phase, LSTM-Testing extracts features from the screenshot image by deep neural network. The second phase consists of steps 2-6 as shown in the top-right corner of Figure 1.  
Figure 2: LSTM-Testing hardware and environment settings; (**a**) preparing a projector screen and projector; (**b**) set up the webcam and LSTM-Testing system; (**c**) project the video frame on the project screen and take a screenshot by the webcam. Steps 2 and 3 use input gate to aggregate continuous pictures as a sample. The input gate owns a screenshot queue to store \(k\) screenshots. After one screenshot taken in Step 1, the input gate pops the oldest frame and pushes the new one into its queue, then the input gate combines the screenshots in the queue as a sample of a gameplay, and then it normalizes this sample to standard input (three-dimensional array) for the convolution gate, i.e., \(S^{std}\). For example, in order to store the action of a gameplay moving right-ward, the input gate pops the oldest screenshot at time \(t\)-4 from the queue and pushes the current screenshot at time \(t\) into the queue, and then the input gate combines the screenshots in the queue at time (\(t\)-3)-\(t\) to form a gameplay sample of moving left-ward (Figure 3a). The input gate then converts these images to two-dimensional (2D) arrays of pixel values (Figure 3b), and finally aggregates these 2D arrays to a 3D array as a sample to demonstrate moving right-ward action (Figure 3c). It should be noted that the LSTM-Testing does not collect all video frames of a game but only collects the frames based on the game testing scenario (e.g., eye strain or different hardware requirements). For example, LSTM-Testing may only collect 20 frames per second (one frame per 50 milliseconds) to emulate the game experience of a gamer with high eye strain, given that this game can support 120 frames per second for better flicker fusion experience. In steps 4-6, LSTM-Testing applies the convolutional gate to reduce the sample size, which can lower the computational complexity during the training process. The convolution gate consists of convolution, pooling, and fully-connected operations. The convolution operation in step 4 attempts to extract targeted features from the origination sample and filter out unnecessary noise by calculating the input sample \(S^{std}\) with multiple vectors of weight \(w^{cv}_{p,q,l}\) and bias \(b^{cv}_{p,q,l}\). The vector of weights and the bias are called a filter, and this filter represents the feature extraction of the input sample. As shown in Figure 4, \(K\) filters are first selected in this convolutional operation, and each filter \(k\) contains a weight \(w^{cv,k}_{p,q,l}\) (\(P\times Q\times L\) matrix) and bias \(b^{cv,k}_{i,j}\) (\(I\times J\) matrix). Then, the sample \(S^{std}\) is convolutional calculated with each filter by equation (1), extracting a convoluted sample \(S^{cv}_{i,j,k}\) (\(I\times J\) matrix):  
\[S^{cv}_{i,j,k}=\sum_{p=1}^{P}\sum_{q=0}^{Q}\sum_{l=1}^{L}\left(S^{std}_{kci+p, d\times j+q,l}\times w^{cv,k}_{p,q,l}+b^{cv,k}_{p,q,l}\right) \tag{1}\]  
where \(d\) is the sliding distance (called stride) that a filter attempts to decrease the overlay extracting cells process. Figure 3: An example of aggregate continuous screenshot images to show a right-ward action. Figure 5 demonstrates an example of different strides with \(S^{std}\) (\(7\times 7\) matrix) and W (\(7\times 7\) matrix). The number of overlay cell in the feature extraction process with a stride of one is two, and the extracted \(S^{cv}\) will be a \(5\times 5\) matrix. On the other hand, the number of overlay cells in the feature extraction process with a stride of one is one, and the extracted \(S^{cv}\) will be a \(3\times 3\) matrix. The \(S^{cv}\) therefore shrinks when the stride is set to two from one. The game tester can choose to decrease the size of \(S^{cv}\) and lower the computational complexity with the trade-off of learning speed.