Abstract
Soil Tillage serious game designed as a training media has been researched based on the plowing forces using polynomial functions. However, the learning process is rare; hence the players in Serious Games (SG) are less engaged and tend to be more static in their games. The effects of vertical cutting angle, plowshare depth, and motor speed affect the soil plowing force in soil tillage. Therefore it is expected that a plow force model with a learning function will generate more actual conditions, engage the player and eventually affect the player’s behavior. The serious game design uses a Hierarchical Finite State Machine (HFSM) in this study. HFSM state is motor speed, vertical cutting angle, and plowing depth. The learning function is based on Neural Network (NN), with a multilayer feed-forward neural network (FFNN) is chosen to estimate plowing forces. The Levenberg-Marquardt algorithm is used by NN to approach second-order training speed without computing the Hessian matrix and is the fastest backpropagation algorithm. The result of the research is a plowing force model values closer to the actual by giving players feedback as they learn. In the transition, HFSM has a feedback value to the initial state, which is helpful as part of measuring one game cycle that is run, thus providing a learning experience in a serious game.
Introduction
Games such as video games can affect emotions and show personality traits. Based on statistical data from physiological signals, produce representative arousal values (direct correlation); from the PANAS questionnaire, the system generates a valence value (reverse correlation) [1]. An emotional impact also has a short-term effect on play, a useful clinical tool for preventing and treating some cognitive disorders [2]. On the other side, with this influence on players, video games are directed to influence player behavior, which can be used as a learning medium. A game with a specific purpose other than the fun side is called a serious game. Integrating with other devices such as sensors is also required to create a real learning atmosphere. Physical rehabilitation uses serious video games with motion systems that incorporate inertial units, which offer precision and accessibility at low cost, and health care coverage, and which, in addition, integrate elements that encourage patient motivation and participation [3]. As a serious game training medium that can be used as a training medium such as for dental student training called Virtual Dental Clinic (VDC) [4], the military field [5], and other fields.
Using a data-based approach, designing a serious game means focusing on game objectives by producing real-life situations. However, a static data approach process may reduce the learning quality and provide less experience to the players [6]. Deep learning using Neural Network has been successfully applied to the serious game, especially in the automatic adaptation process of (Non-Player Character) NPC behavior, interactive player, such as ‘brain training’ to maintain mental acuity, Tactical Combat Casualty Care (TCCC) [7–9].
The application of artificial intelligence concepts, intense learning neural networks to support decision-making processes in agriculture is widely carried out, such as assisting decision-making processes during grain weevil storage, crop protection, precision agriculture, detection and classification of plant diseases, and crop pests precisely [10]. Soil spatial variability mapping allows limiting the number of soil samples investigated to describe agricultural areas by showing functional electrical parameters for delimiting management zones associated with soil compaction [11]. In its development, machine learning can be applied to the needs of monitoring soil conditions, such as assessing the prediction of surface roughness from satellite images. This study shows that the PCA-MM-SVR model outperforms all SVR (Support Vector Regression) variants [12]. In previous studies, a realistic data approach was based on plowing force and optimized using Pareto for an immersive serious game for soil tillage [6].
The plowing force is the soil’s reaction forces caused by the horizontal force generated by the tillage tools in the opposite direction. One of the tillage goals is to make the soil loose with changes in the physical properties of the soil. The physical properties of the soil can be improved when using a high-speed plow on soils with moderate water content [13]. The plowing forces of soil tillage is influenced by several factors including the type of soil, the type of tools for tillage, and the depth of plowing. Subsoil tillage activities have a deeper processing than other cultivation activities, hence the tensile resistance is also high. When plowing on the ground, the tools’ plowing force is the same as the force exerted on the ground in the opposite direction of the instrument’s forward motion. In short, plowing forces may be described as a horizontal force component in the opposite direction of the towing tool’s line [14].
The impact of changes in plow depth on the plowing force, which is also influenced by changes in cutting angle, was modeled using a third-order polynomial function with an error range of 8,54 percent to 25,63 percent [15]. Other research on similar modeling has resulted in the 4th order polynomial functions and design for the scenario of a serious game [16]. With this modeling and based on the game flow design of a serious game, the value of the plowing forces resembles the real condition.
Presumption for the plowing force necessary for the specific condition in soil tillage can be done. Unfortunately, there is no learning process in computing, so it is more static and cannot be used to give the player more experience in the serious game concept.
This study aims to create a serious game design for soil tillage using an artificial neural network-based plowing force model to reinforce learning. The domain of serious game added to the player’s experience using a moldboard based on vertical cutting angle, plowshare depth, and motor speed.
Material and methods
Moldboard plowing forces
As a result of the moldboard plow, there are changes in the soil’s structure, both in size and shape, making it suitable for planting certain types of plants. This change occurs because of the forces during soil tillage processing, and this force can be between the plow tool with the ground and between the soil structure [17]. Plowing force, also called the tillage draft force is a tool that is operated based on the tillage conditions. These conditions are important parameters for the design and implementation of tillage tools that affect soil yields [18].
Soil conditions include soil type and condition, moisture content, cutting angle, motor speed and depth of plowing [15, 20]. The specific topic of research for plow forces is the power per area of earthworks for moldboard plows, chisel blades, and discs harrow in various soil conditions, resulting in highest plowing forces for chisel plows and lowest for moldboard plow and disk harrow [21].
The plowing forces specific drafts for the tillage using moldboard plows are illustrated in Fig. 1. Newton’s third law can be explained as follows: all forces have the same value in the opposite direction so the pull of the driving force that is the motor speed and the gravitational force affects the plowshare depth, resulting in a force in the opposite direction called plowing force or specific draft [22].

Illustration for plowing forces.
Hierarchical Finite State Machine (HFSM) is used to solve problems that cannot be solved by Finite State Machine (FSM) or complex process problems. Using FSM, there may be difficulties for maintenance, such as when adding or removing states. It is necessary to change the conditions of all other states that have a transition to the new or old; scalability with FSM many states lose the advantages of graphic legibility into a knotty boxy and arrows where FSM models cannot be reused. Based on HFSM chart is State Charts to solve complex systems problems [23].
Using HFSM already uses patterns from the concept of inheritance from programming, making it easier when applying HFSM to processes on a computer. The concept of inheritance can be analogous to classes and subclasses in the program, in HFSM generating superstates and states with general transitions and transitions [24].
In-Game designs with complex processes can implement HFSM, for example, simple war games. Non-Player Characters (NPCs) are prepared to defend against enemy attacks, position standby the NPCs crouch and stand up. HFSM has a standby superstate with a crouch and stand-up state, and the enemies have a walking state, as shown in Fig. 2.

The example implements HFSM in-game.
The form of HFSM in Fig. 2, superstate standby has state
Prior research has been carried out using a soil bin by creating soil conditions in a laboratory box and providing three types of vertical cutting angles of 600, 650, and 700 [6, 19], as shown in Fig. 3.

The types of moldboard plow are based on vertical cutting angles.
The depths of plowshare are at 3.5 cm and 7 cm, while the speed at gear 1 is 6.8 cm/s, gear 2 is 10.2 cm/s, and gear 3 is 19.92 cm/s. A mathematical model using the polynomial function of order four is generated with an error of 4,44×10-05 [16]. Equation (1) is an example of a model.
Plowing forces is F with variable r is the speed of gear in motor moldboard, t is the vertical cutting angle, and e is the deep plowing depth because the dependent variable’s predicted values are r, t, e.
Where ct,i is constant value, i = { 0, 1, …, n } , n = 3 and j = { 1, 2, …, m } , m = 125.
The immersive serious game (ISG) design is based on the polynomial function model using Hierarchical finite state machines (HSM), where the polynomial function F = p (f) becomes a state [16], in Fig. 4.

Immersive serious game design using HFSM (Hierarchical finite state machines) for soil tillage [16].
The serious game starts with the player starting the engine motor, where there is a choice of gears that determine the initial speed, namely the 1st transition at low speed, 2nd gear at medium speed, and 3rd gear at high speed. The motor starts moving if the value is one and stops if the value is 0. p (f) is a superstate which is a polynomial function affected by the substate transition of r for motor speed, the substate transition of t for plow vertical cutting angle, and substate transition of e for depth of plowing. These parameters are interconnected and produce a transition value F which is a state of the plowing force. The feedback transition from the plowing force state is an effort to create the player’s real situation by finding the least error value.
Historically, neural networks (NN) were supported by human brain functions and are part of machine learning algorithm engineering. In their development, there is the fact that neural networks are deep neural processes that are applied in a technique called deep learning [25].
Speed of gear in motor moldboard denoted by r, vertical cutting angle denoted by t, and depth of plowing denoted by e, are three variables that define an input for NN, as shown in Fig. 5.

Neural Network architecture for soil tillage.
The NN model shows one hidden layer with ten neurons, for weight hidden layer are wa1, wa2, … . wa n , where n = 1 …30, for hidden bias layer are ba1, ba2, …, ba n where n = 1 . . .10, and weight for output are wb1, wb2, …, wb n where n = 1 …10, the bias for output is bb1, bb2, …, bb n Where n = 1 …10.
The Levenberg-Marquardt algorithm is used by NN to approach second-order training speed without computing the Hessian matrix and is the fastest backpropagation algorithm.
The Levenberg-Marquardt algorithm is specifically designed to minimize sum-of-squares error functions [26].
The details of NN architecture for soil tillage are shown in Table 1.
Architecture specification NN for soil tillage
In this research, a multilayer feed-forward neural network (FFNN) is chosen to estimate plowing forces. In FFNN, there is one input layer, one or more hidden layers, and one output layer. A neural network with one hidden layer can already handle cases with complex functions. In this soil tillage model, the work of FFNN with one hidden layer is shown in Fig. 6. One hidden layer is used because the soil bin’s experimental data changes the plowing forces as the depth increases tens to be linear. In addition, using a hidden layer can produce a relatively small average error value of 0.037767 and MSE = 0,0019815

Structured of NN for soil tillage
While Fig. 6 shows the schematic structure of a neuron with more than one input, namely r, t, e (speed of gear in motor moldboard, vertical cutting angle, and depth of plowing).
The bias b with the value of 0.5 in a neuron, which is summed up with the weighted w form the network input m, which can be expressed by:
p are the input value of the gear speed in the motor moldboard, vertical cutting angle, and depth of plowing.
The network input m passes through an active function f which generates the neuron output plowing forces F.
The following Equation [16] can be used to calculate the log-sigmoid activation function:
From Fig. 6, a multi-input NN for soil tillage can be implemented with the following equation:
Part of the activation functions of the hidden layer and output layer are
The weight connecting the
The data is the result of an experiment using a soil bin tool [6, 19], where the experimental parameters are; There are three types of speed from the driving motor, there are three vertical plowshare cutting angles, and it has two depths. To identify the effect pattern of motor speed, vertical cut angle, and plowing depth to the plowing force, a neural network model with the characteristics and specifications in Table 1 is used.
The training process uses a neural network through several stages, namely: Data Normalization from the experiment using soil bin. Data Training and testing from the experiment using soil bin.
Data normalization from the experiment using soil bin.
Normalizing data is done by transforming the data into the range 0.1 and 0.9 with Equation (9), and the normalized data is presented in Table 2.
Normalized data from an experiment using soil bin
Normalized data from an experiment using soil bin
Where, y′ Is normalized data, a is a maximum value, b is the minimum value, andy is original data.
Serious game design using Hierarchical Finite State Machine (HFSM) to describe scenario player is shown in Fig. 7.

Design serious game using HFSM for soil tillage with a learning process using NN.
The engine motor starts indicated by the transition value of the motor state with initial M as 1, the selection of gear 1, 2 or 3 shows that the initial speed in the motor speed state is R at transition r, while the transition t in the initial T for vertical cutting angle state and the plowing depth state is E at transition e. The transition values of r, t, and e as the input of neurons are calculated using the NN model, which produces an output of state F at transition f, namely plowing forces. This process will be continued when the player changes the input value of the serious game process. The feedback value of state F is a comparison of the MSE value result, which shows the force required to carry out soil tillage to produce certain soil conditions.
The feedback from state F has two conditions; the first value is 0 if MSE i > MSEi+1, which indicates that the results of the plowing force are worse (farther away from the target data); therefore, the player is allowed to re-select the conditions r, t, and e.
MSE i ⩽ MSEi+1 indicates that it is getting closer to the target, and a repetition process is carried out for NN; hence it is expected to be closer to the results with the target data. In this case, the target data is experimental data using a soil bin.
Data that has been normalized is divided into two parts, namely training data which is the input, and the target, which is the output. The training data is the speed of the motor, vertical cutting angle, and plow depth while the target is plowing forces. The architecture of the training data is shown in Fig. 5.
There are three inputs, r, t, and e referring to motor speed, vertical cutting angle, and plowing depth. The weighting randomly is assigned at 0-1, with a bias value used of 0.5 for hidden layer bias and output bias.
From Fig. 8 for the training using NN, it can be seen that the resulting pattern in the graph coincides with the target, where MSE is 0.0019815.

Graph result from implementation NN for soil tillage.
Testing the NN model was done using 30 test data with random input parameters between the maximum and minimum values. The random values are described with Equation (10).
Where x′ is a random value ranging from maximum and minimum. The result of NN testing is shown in Table 4.
Result of NN test in serious game design for soil tillage
Table 3 shows that the neural network results are close to the experimental data using the soil bin, meaning that the architecture of NN can be used as a model for plowing forces in soil tillage. In addition, residual plots and histogram error plots are also generated in Figs. 9 10. The residual plot shows that more values are close to zero, namely between –0.05 to 0.05. From the histogram plot, it can be seen that the small frequency error between 0.0052 and 0.0482 reaches more than 13 data, so the plot of residuals and the histogram error can be stated that the NN model produces data that is close to the target or actual situation.
Plowing forces comparison between soil bin experiment and NN

Plot Residual from model NN for soil tillage.

Plot Histogram Error from model NN for soil tillage.
Using random values generated by the plowing force in Tables 4 and 5, the plowing forces represent the NN model’s actual data. The graphic output from testing NN for soil tillage is shown in Fig. 11.

Graph result for NN test in serious game design for soil tillage.
According to the present study, the transition r t e indicates the value of the motor speed, vertical cutting angle, and plowing depth entered into NN modeling. The HFSM results in a transition value of f, giving players feedback to add to the learning experience. At the value of the motor speed or state R with an increasing transition r for the exact vertical of cutting angle and depth of plow, it shows that the plowing forces are getting bigger. The value of the vertical cutting angle or state T with an t transition for the constant motor speed and depth of plowshare indicates that the plowing forces are getting smaller. While for the value of the depth of the plowshare or state E with a e transition at the constant for vertical cutting angle and motor speed, it shows the plowing force is getting bigger. Furthermore, function learning in a serious game design can provide almost realistic values, according to the results of an artificial neural network with MSE = 0.0019815.
