DOI QR코드

DOI QR Code

A Computer Model for Simulating the Bicycle Rider's Behavior in a Virtual Riding System

  • Ding, Wei-long (College of Computer Science & Technology, Zhejiang University of Technology) ;
  • Ding, Xiao (College of Computer Science & Technology, Zhejiang University of Technology) ;
  • Chen, Kai (College of Computer Science & Technology, Zhejiang University of Technology) ;
  • Wan, Zang-xin (College of Computer Science & Technology, Zhejiang University of Technology) ;
  • Xu, Yan (College of Computer Science & Technology, Zhejiang University of Technology) ;
  • Feng, Yuan-jing (College of Information Engineering, Zhejiang University of Technology)
  • 투고 : 2019.01.04
  • 심사 : 2019.11.05
  • 발행 : 2020.03.31

초록

People are increasingly demanding to experience realistic behavior of virtual characters in computer games. In this article, we build a computer model for simulating a bicycle rider's behavior in a virtual riding system. A method to calculate the speed of a bicycle rider is proposed to improve the reality in a virtual riding system. In this method, the property of physical energy is introduced, and the bicycle-riding speed is calculated in real time according to the relationship between the rider's physical energy and bicycle-riding speed. Then based on the analysis of the behavior of a cyclist in a real competition, various behaviors of the virtual rider are designed and a behavior-tree for the virtual bicycle rider is constructed accordingly. On the basis of these, a virtual riding system is developed. The experiments results show that our system can simulate the behavior of a virtual bicycle rider, and thus encourage exercise on a stationary bicycle.

키워드

1. Introduction

Cycling has a broad base in all parts of the world. Its participants may be young and old, and the types of activities include commuting, leisure, travel and sports competitions [1]. But cycling is limited by weather factor and the performance of cyclists is influenced by subjective and objective factors. Virtual reality and human-machine interaction technology enable sports to be performed in computers.

With the development of society and technology, computer games have gradually become an important part of entertainment. The gaming industry integrates various elements such as computer hardware, software, and network technology and various cultural arts [2]. A virtual bicycle riding system is free from site, weather conditions, and time, without lacking the riding pleasure [3]. At present, many different virtual bicycle riding systems are available on the market which are abundant in functions and can also be used for multiplayer online riding competitions. A virtual scene will be displayed on the computer screen through a Bluetooth connection, and people can ride on a stationary cycle indoors. The virtual riding system of this paper also provides a single-person training model and adds virtual rivals to solve the tedium of single-person training, thereby allowing people to experience the fun of riding games. The virtual rider generated by the computer will automatically ride at the start of the race. Therefore, improving the design of virtual riders to enhance the authenticity of their behavior is crucial.

2. Related Work

At present, research on virtual characters has been gradually diversified at home and abroad. An increasing number of technologies and methods, such as search algorithms for trees or graphs, the A* algorithm, collision detection algorithm, Unity3D and cocos2d-x development engine, are used by developers [4]. In early games, the behavior of the virtual characters is single (i.e. without interaction with the players), and their actions are simply repetitive [5]. Currently, many virtual characters can react differently to various situations by analyzing the behavior of players [6]. A behavior tree decision system is applied to an increasing number of games [7]. For example, every virtual character in the ‘simulated life’ has its own characteristics and can create a behavioral decision [9] that is suitable for the current state in accordance with different circumstances. In the shooting game ‘Counter-Terrorism Elite’, multiple sets of behavior tree systems are used to design a unique decision-making system for each virtual character, thereby enabling each enemy to have a different attack strategy [10]. In virtual games, virtual characters can interact with not only the players but also the environment [11]. Liu Zhen et al. [12] added character emotions to virtual roles, thus providing virtual characters certain character parameters, such as role perception, motivation, mood and other modules for interaction with the social environment by analyzing the emotions of the characters. In ‘Thief 4’, each virtual character can determine the position of an enemy by hearing sound, adjust the vision in accordance with the intensity of light and using a hierarchical alarm technique against his enemy [13].

In this paper a computer model to simulate the bicycle rider’s behavior in a virtual riding system is built. At first we propose a virtual riding speed calculation method for a realistic riding behavior of the virtual rider and then the Behavior-tree system is adopted to design the virtual rider’s decision-making behavior. This method considers various riding factors that affect the virtual rider, such as the influence of the environmental factors on the physical energy consumption and recovery, residual physical energy, the ranking of the virtual riders and the distance ridden so far.

3. Calculation methods for the bicycle riding speed of a virtual rider

In this study, the physical energy of a virtual bicycle rider is designed. According to Newton’s second law, a method for calculating the riding speed of a virtual rider through the interaction between physical energy and velocity is proposed. The application of this method to virtual riding can improve the authenticity of the speed of the virtual rider.

3.1 Physical model of the virtual rider

Physical energy is an important winning factor for athletes participating in daily training and in competitions. The amount of physical exertion made by athletes in training and competition will also determine the level of exercise and the quality of athletic performance. The change of ambient temperature and humidity is the main factor affecting physical energy consumption and recovery.

3.1.1 Influence of temperature and humidity on physical energy

At present, only a few studies focus on the physical energy consumption of athletes in terms of temperature and humidity in the environment [15]. Those studies indicated that high or low ambient temperatures affect physical energy. Generally, a living environment above 35°C and a training environment above 32°C are called high-temperature environments [16]. An environment with relative humidity above 60% is called a high-humidity environment. Excessive or minimal environmental humidity has been confirmed to significantly influence the physical exertion of an athlete. The influence of temperature and humidity on physical energy is reflected in the recovery of physical energy and speed of consumption. In this paper, the thermal index calculation function was employed to describe the related meteorological factors, such as environmental temperature and relative humidity. This function was borrowed from the article [17] in Portuguese, which was originally employed to describe the comfort of chickens. We chose this thermal comfort equation because it considers more environmental factors and these factors do have an impact on real people.

\(\begin{array}{r} I d x=f(T, R H, V)=45.6026-2.3107 T-0.3683 R H+9.7092 V+ \\ 0.05492 T^{2}+0.00121 R H^{2}+0.66329 V^{2}+ \\ 0.0128968 T R H-0.300928 T V-0.05952 R H V \end{array}\)      (1)

where T is ambient temperature in Celsius; RH is environmental humidity; V is wind speed. 

If Idx is less than 24, then the current environment is optimal. 

If 24 < Idx < 27, then the current environment is suitable. 

If 27 < Idx < 30, then the environment is slightly unsuitable. 

If Idx is more than 30, then the current environment is extremely poor.

In equation 1, the wind speed (parameter V) is a combination of the wind and the rider speeds. In our system, the default direction of wind is opposite to the direction of cycling. Wind is always the resistance of cycling, and the direction is opposite to the direction of cycling. So the wind speed in this equation is the absolute value of the actual wind speed plus the absolute value of the cycling speed.

The thermal index [17] is expressed as a coefficient between [0,1], the plus sign represents clamping to a non-negative numbers.

\(I=\min \left(1, \max \left(0, \frac{I d x-27}{3}\right)\right)\)       (2)

3.1.2 Physical energy recovery model

The body has a self-recovery mechanism of physical energy. In this study, a physical energy recovery model is proposed.

\(T_{N} \leftarrow \min \left\{T_{N}+U_{T} \cdot \Delta t, 1\right\}\)       (3)

where TN is the physical energy parameter, which is in [0,1].

If TN is 0, then the riders are physically exhausted at this time, and if TN is 1, then the riders are maximally energetic at this time. UT determines the speed of physical recovery. For example, if UT=1/3h, then the physical energy of the athletes requires 3 hours to fully recover at this time. The body can become exhausted rapidly when people exercise vigorously. At this time, the physical energy is still recovering but will not return to the optimum condition. As the physical recovery is affected by the environment, even after several days rest, one will never regain full energy if the level ever falls below 0.8, so the above mentioned formula can be modified as follows:

\(T_{N} \leftarrow \min \left\{T_{N}+U_{T} \cdot \Delta t \cdot(1-I), 1\right\}, T_{N} \in(0.8,1]\)       (4)

\(T_{N} \leftarrow \min \left\{T_{N}+U_{T} \cdot \Delta t \cdot(1-I), 0.8\right\}, T_{N} \in[0,0.8]\)       (5)

The value of environmental change parameter I indicates that the environment worsens. The physical recovery rate accelerated after a certain time because riders drink sports drinks to regain their physical energy during cycling. For example, a rider can enable the lower body to restore its function after Δt for a period when a rider drinks a sports drink:

\(T_{N} \leftarrow \min \left\{T_{N}+U_{T} \cdot \Delta t \cdot(1-I) \cdot(1+\alpha), 1\right\}, T_{N} \in(0.8,1]\)       (6)

\(T_{N} \leftarrow \min \left\{T_{N}+U_{T} \cdot \Delta t \cdot(1-I) \cdot(1+\alpha), 0.8\right\}, T_{N} \in[0,0.8]\)       (7)

where α is a floating point number and α∈ (0,1), and the higher its value, the faster its physical recovery will be.

3.1.3 Physical energy consumption model

The speed of physical energy consumption is affected by riding speed, ambient temperature, and humidity. In this study, a physical consumption model is designed for a virtual rider. The initial physical base value of a rider is 1. The remaining amount of physical energy is obtained by calculating the ratio of energy consumed by riders to the total energy. The calculation formula of the physical parameter TN is as follows:

\(T_{N}=1-k(1+I) \frac{P \cdot \Delta t}{W_{S}}+T_{U}\)       (8)

where k is a constant used to regulate the conversion rate of the energy consumed by power; ; P·Δt is the energy consumed of the athletes; WS is the total energy of the athletes and TU is the physical recovery function, which is UT·Δt.

The reduction of physical energy will affect the speed of riders mainly in reducing the power of cycling. In this paper, a formula to describe the influence of physical energy on the rider power is proposed. The physical energy has no influence on riding when it is full. The rider power is reduced by a factor f (TN) when the physical energy is depleted. The range of function f (TN) is (0, 1].

\(f\left(T_{N}\right)=\left\{\begin{array}{ll} 1, & T_{N} \in[0.8,1] \\ q_{1}, & T_{N} \in[0.5,0.8) \\ q_{2}, & T_{N} \in[0.2,0.5) \\ q_{3}, & T_{N} \in[0,0.2) \end{array}\right.\)       (9)

3.2 Speed calculation model for virtual riders

According to Newton’s second law, the acceleration of a rider is calculated by analyzing the force of the rider, and the riding speed is changed in real time. The speed change of riders will affect the riding power of riders and affect the speed of physical energy consumption.

3.2.1 Force analysis

The two main sources of resistance for virtual riders are air resistance FW and climbing resistance Fd [18]. According to statistics, 90% of the energy is used to overcome air resistance at the speed of 40 km/h. The calculation formula of wind resistance is as follows:

\(F_{W}=\frac{1}{2} C \rho S V^{2}\)       (10)

where C is the air drag coefficient; ρ is air density; S is the windward area of the object and V is the relative velocity between the object and the air.

The climbing resistance is independent of velocity and only related to the slope angle. The force that affects bicycle speed is the component of gravity slope. Gravity decelerates the vehicle when uphill, and accelerates downhill. The formula is

Fd=(m+M)gsinθ       (11)

where m and M are the mass of athletes and bicycles, respectively, g is the acceleration of gravity, and θ is the angle of the slope.

The air and climbing resistances are the main resistance to bicycle riding and a lesser one is the rolling friction between the bicycle and the ground. Each track has its own coefficient of rolling friction given the different material of each track; thus, rolling friction is also different. The formula for calculating rolling friction is

Fg=μ(m+M)g       (12)

where μ is the friction coefficient, which is a constant and only related to the material and the roughness of ground at the location of bicycle riding.

3.2.2 Analysis of the influencing factors of riding speed

The riding speed of a rider is influenced by many factors. In addition to physical influence, ranking and riding distance can also affect the riding speed of the rider. Short-distance cycling training and competition require rapid start, track, and sprint. That is, athletes are required to have the ability of high speed in the entire race [19]. In long-distance cycling, strategies generally start slowly, then slowly accelerate and sprint at the end of the race. In addition, in cycling competitions, the ranking of riders will also slightly affect the riding speed of the players. In our system, the virtual opponent will increase speed when the player strives to catch up with it; the virtual opponent will then reduce its speed when it is reasonably far from the player. Thus, the training can stimulate the player to exercise.

3.2.3 Speed calculation of virtual riders

The speed of the virtual rider is determined by acceleration, and acceleration is determined by the driving force of the rider. The resultant force of the virtual rider is obtained through a force analysis of the virtual rider in accordance with Newton’s second law.

\(\frac{d v}{d t}=\frac{F}{m+M}\)       (13)

\(v(T)=v_{0}+\int_{0}^{T} \frac{d v}{d t} d t\)       (14)

The power to make a bicycle forward is determined by the force of the pedal, and the strength of a rider is not constant. So we add a random force to the power of a treadmill to conform to the real situation. The size of the random force is approximately 5% of the initial power, which means the power varies between 0.95*F and 1.05*F. Thereby the power is enabled to fluctuate slightly on the basis of the initial power. This coefficient is a random number with uniform distribution between 0.95 and 1.05. As a uniform distribution U(0.95,1.05), the mean, variance and standard deviation could be calculated easily.

\(\frac{d v}{d t}=\frac{F_{b}-F_{s}+\eta(t)}{m+M}\)       (15)

where Fb is the basic power for a rider to pedal, η(t) is a random force and Fs is the resistance of rider and bicycle, which is the sum of Fw, Fd and Fg.

In a long-distance bicycle race, the rider will use the strategy of a slow start and quick sprint; thus, the riding speed of the rider is related to the distance of riding, and the length of the riding distance ultimately affects the force of the rider. In this study, a proportional function is used to adjust the riding force of the rider on the basis of the basic force of riding.

\(\lambda_{1}=\alpha_{1} \frac{x}{l}\)       (16)

where x is the distance from the start of the race to the present, l is the total length of the track and α1 is a constant that is used to regulate the influence of the force.

The different ranking of riders has various effects on each rider. The degree of acceleration depends on the current ranking.

\(\lambda_{2}=\beta \frac{n}{N}\)      (17)

where n is the current rider’s ranking, N is the total number of riders and β is a constant that is used to regulate the magnitude of impact.

On the basis of the abovementioned factors, the acceleration of riders can be expressed as follows:

\(\frac{d v}{d t}=\frac{f\left(T_{N}\right) \cdot\left(1+\lambda_{1}+\lambda_{2}\right) F-F_{s}+\eta(t)}{m+M}\)       (18)

In operation of the system, the calculations of speed and acceleration are performed in every frame. There are 60 frames per second, so the speed of the virtual rider appears continuous.

4. Design of the virtual rider behavior tree

A virtual riding system must realize the function of a virtual rider in accordance with the environment, the rider’s own conditions, and the interaction between the virtual riders. Virtual riders adjust their riding behavior in accordance with the current environment and accelerate or decelerate under certain conditions. Their physical energy is also an important parameter for adjusting their speed. Virtual riders will decide when to decelerate and when to stop to supplement physical energy depending on the remaining amount of physical energy. The riders will chase each other when the virtual rider’s perception of the other team’s riders triggers the interaction between the virtual riders. An excellent rider will succeed in chasing the leading rider or will dump the hindmost rider, whereas a mediocre rider will surrender the pursuit considering the lack of energy and will be surpassed by the hindmost rider.

In accordance with the description of the virtual rider function, the idea of the behavior tree is to perceive the environment at the time of riding, analyze the functions of the current state and provide the corresponding feedback. First, the rider must be given a perception to observe the other riders in the range of perception and adjust the riding speed in accordance with the current environment when the environment changes. The rider can change his or her chase strategy in accordance with the character when pursuing with other riders. If no other riders are present in the area, then several strategies for riding speed will be created in accordance with the shape of the current track.

4.1 Observation behavior

A virtual rider will find his opponent by observing when a rider is riding. Then, the rider will decide in accordance with the current state, which is catching up or not catching up, after observing the opponent. Other riders who are unaware will continue to ride with speeds determined by equations (13) through (18).

Observation behavior is finding other riders and search paths. When the system starts running, each the rider begins to observe the surroundings and decide on the riding style. The observation node has three other nodes, namely, moving path node, eyes node and selection node. The moving path node will execute the path-finding algorithm of the virtual rider and ride along the track in accordance with the path-finding algorithm. The eyes node will establish a perception to enable the virtual rider to observe and monitor the surroundings. The selection node is subsequent to the upper eyes node. It selects the corresponding execution behavior by feedback from the perception of the eyes node.

4.2 Moving behavior

The moving node is the riding node of the virtual rider under normal conditions. That is, no other riders interfere.

The type of moving node is a parallel node. This node will consequently execute all the next sub-nodes, regardless of the return value of child nodes. Moving nodes will change their riding behavior in accordance with the distance to the other riders on the racetrack and the condition of the rider. First, the rider executes the forward node and then the moving node below in accordance with the planned route. Furthermore, the rider uses the path-finding algorithm to ride until the end in all circumstances. Then, the acceleration node is performed. The rider will perform the acceleration of the behavior node and increase the speed to improve the performance of the game when the half distance or half of a time limit of the race course is satisfied. Finally, the deceleration node is accomplished. The rider will perform a behavioral node deceleration to save physical energy and slow down physical exertion when the condition of low physical energy is satisfied. The corresponding behavior node will not be executed when the judgment condition of the acceleration or deceleration node is not satisfied. However, the moving node is repeated and continues to ride along the track.

4.3 Overtaking behavior

Overtaking behavior is the main behavior of the rider and other riders in the system, which can reflect the difference in character and physical ability between riders. The virtual rider assumes the overtaking behavior when he finds the opponent in front. Overtaking has two consequences, namely, catching up or not catching up. In the course of overtaking, the character of each rider can be reflected. This competitive behavior can enhance the realism of the riding system, and the users can stimulate their own potential and improve the interest of the virtual riding system.

The overtaking nodes have two sub-nodes, namely, overtaking node and fatigue node. The overtaking node will decide whether to overtake in accordance with the judgement of the rider node in front. If the physical energy of the rider is below 20%, then the fatigue node will be performed. A random node is established under the fatigue contact point, and different decisions will be created in accordance with the various characters of the virtual rider.

4.4 Decision behavior

Decision-making is the behavior of a rider to select the optimum option in the current situation in accordance with his surroundings and his own condition.

The decision node will first decide whether to accelerate or decelerate in accordance with the macro judgement of the current track of the rider. If numerous curved roads are present in the current and subsequent tracks, the behavior tree will use the deceleration node of the bend. If the current track and the long track ahead are straight, then the behavior tree will invoke the speedway acceleration node. The rider will slightly accelerate to obtain good race results when the straight section is sufficiently long. In the physical energy strategy node, we first maintain the riding speed node and a condition node that determines if the physical energy is sufficient. If the physical capacity is satisfied, then the subsequent behavior nodes are completed to maintain the speed, and the physical policy node is withdrawn; conversely, the deceleration strategy node is used. Drinking sport drinks and deceleration nodes are under the deceleration strategy node. The current state of the rider will be judged under the drinking water node. If the condition node must supplement the physical energy, and if the condition is established, then the rider will stop to drink a sports drink to supplement the physical energy and then withdraw the deceleration strategy node to continue the decision node

5. Experimental prototype and analysis

The client and server implementations of this system are completed on the Unity3D platform. The code is written in the Mono Develop development environment, and the script is written in the C# language. The computer hardware used in the simulation is Intel (R) Core (TM) i5-7400 CPU @ 3.00 GHz, 8 GB memory, NVIDIA GeForce GTX 1050Ti.

Several typical cases are used to analyze the experimental data after numerous experiments. Fig. 1 illustrates the riding diagram of virtual riders in indoor venues, West Lake and around the island. Under the optimum environment (T=25℃, RH=50%) and a poor environment (T=35℃, RH=70%), several tests are conducted. The results are divided into six groups of data, and the virtual riders are read in real time during each test. The current physical residual values and instantaneous speeds are depicted in Fig. 2 and Fig. 3.

E1KOBZ_2020_v14n3_1026_f0001.png 이미지

Fig. 1. Riding diagram of virtual riders in three scenarios under various ambient temperature and humidity

E1KOBZ_2020_v14n3_1026_f0002.png 이미지

Fig. 2. Physical energy and speed changes of virtual riders in the optimum environment

E1KOBZ_2020_v14n3_1026_f0003.png 이미지

Fig. 3. Physical energy and speed changes of virtual riders in the poor environment

The design of each parameter in the riding speed calculation formula for the virtual rider is based on the riding speed of athletes in a professional bicycle competition. The speed of the virtual rider is close to the speed of professional athletes, and an effective formula is finally obtained through the influence parameters in the micro adjustment formula. Fig. 2 demonstrates the physical energy consumption and speed of the rider in the optimum environment. First consider in the indoor stadium. There, the rider starts to accelerate and then reach its peak speed of 55 km/h after a period of cycling. As a result of the decline of physical energy, the riding speed gradually decreases, and the rider sprints at the end of the race; thus, the speed increases suddenly. In our system the racetrack of the complete indoor stadium takes approximately 5 minutes. Outdoor raceways either make a loop around West Lake or are found on the island. In the outdoor raceways, players drink energy drinks to supplement water and energy. In the experiment, water points are placed along the route in the outdoor scenes, and virtual riders will supplement their physical energy after reaching the water point. For example, at the beginning of the race, the rider accelerates to a certain degree. The virtual rider stops to drink water after reaching the drinking point; thus, the speed of the rider drops to 0, and the physical energy of the rider recovers slightly, as shown on the energy change curve, then the rider accelerates to normal speed. The average riding speed of the virtual riders in the West Lake rim is approximately 38 km/h. From the physical energy curve, the rider supplements the water three times in total, and the value of the physical energy decreased, except for a short period of time after the supplement of water. From the speed curve, the average speed of the rider showed a downward trend, thus indicating that the change in physical energy affects the speed, and the rider will still accelerate at the end of the sprint. In the island race, the length of the island race is approximately 23.5 km and twice that of the West Lake race track. The speed curve of the comparison around the West Lake race shows that the average speed of the virtual rider at the island race is slightly lower than its speed in the ring in the West Lake race.

One can change the ambient temperature and humidity, to make environment disadvantageous to normal athletes. In the experiment, the changes in the physical energy and speed of the rider are measured as demonstrated in Fig. 3. The curves on both sides are nearly the same as the optimum sports environment, but the average riding speed of the virtual rider is slightly lower than with the optimum temperature and humidity. At the end of the race, the riders adopt an accelerated sprint and spend more time in each track than in the optimum environment. The changes in the ambient temperature and humidity are not particularly important for the indoor venues. However, in the two outdoor races, the physical exertion of the virtual rider is intense and constantly riding in a low physical form in the second half of the ride given its low energy. The speed is also maintained at a lower level.

The comparison of several tests indicates that the speed of the rider increases from the starting acceleration to the maximum riding speed, stabilizes at a lower speed, drops gradually and sprints at the end of the ride. Environmental changes significantly affect virtual riders. When the environment changes from optimal to poor, the average riding speed of a rider will gradually decrease and the time to complete the race will also be lengthened accordingly.

The comparison of riding data in an actual bicycle race denotes that the average speed of each day in the period is approximately 40 km/h, and the average speed of the leading athletes will reach approximately 50 km/h [20]. The 2018 Tour de France concluded the 5th stage of the 204.5 km race from Lorient to Campel. Sagan, the rider, won the championship in 4 hours, 48 minutes and 06 seconds [22]. V. Bačík and M. Klobučník [21] show the speed data of cyclists in the Tour de France by data visualization. The average speed varies depending on road, mileage, wind direction, weather and even fleet tactics. The speed of leading athletes can frequently reach more than 70 km/h during the sprint but this typically lasts for only a few seconds. The average speed of the virtual rider in this study increases with the difficulty level. In the highest difficulty level, the maximum sprint speed of the virtual rider is approximately 60–70 km/h, and the average speed is approximately 50 km/h, which is nearly the same as that of the excellent athletes in the Tour de France. The average speed of the virtual rider in the lowest difficulty level can reach 35 km/h, which is also close to the actual race data. The real average speed of the athlete is generally higher in actual indoor competition than in the outdoors. The average speed of the rider in an actual indoor stadium is approximately 50–60 km/h. The riding speed of the virtual rider in the virtual stadium is approximately 55 km/h in the optimum environment. The riding speed is approximately 50 km/h in the non-optimal environment, which is close to the actual racing speed.

The virtual rider rides along the track automatically in accordance with its path-finding algorithm when no other riders are in the range of perception. The rider will be subjected to centripetal force when the decision node is completed through the multiple bend section. At this time, the rider power plays a role in reducing the centripetal force. The centripetal force of the rider is calculated as (m+M)v2 /r, after calculating the turning radius r in accordance with the control point. The rider power decreases, and the rider reduces the speed to pass the curve. If the decision node is not set, then the virtual rider will ride through a multi-bend or sharp bend at the speed of the straight path, which is inconsistent with the actual situation. In a lengthy straight road segment, the virtual rider slightly improves the riding speed to obtain favorable results. According to the match data of the professional sports staff in the Tour de France, the average speed is 40 km/h and accelerates to approximately 50–60 km/h in a straight path acceleration; thus, the riding speed of the virtual rider will increase by approximately 20%−40% in a straight lane, and the specific value will depend on the condition of the virtual rider. The acceleration of the virtual riders will increase with the skill level. When the virtual riders ride on the outdoor track, the temperature of the test environment is 25°C, the relative humidity is 50%, and the current riding speed of the virtual rider is output once per second. The experiment tested the data of 10 groups of virtual riders in West Lake and 10 sets of data in the island competition, and Fig. 4 shows average of the ten sets of speed data. Fig. 4 (a) displays a chart of the speed of a virtual rider that traverses a bend and passes through a road in a ring in the West Lake and island race scenes. Apparently, the rider passes through the bend when the speed is reduced, and the rider is slightly faster than the average speed at a later time when the rider traverses the lengthy straight path.

E1KOBZ_2020_v14n3_1026_f0004.png 이미지

Fig. 4. Speed curve of a virtual rider in a section of the West Lake round and Round Island competition.

The overtaking node will be executed at this time, and the rider will decide in accordance with the situation when the virtual rider perceives through the observation node that other riders are present in the range. A rider (A) will catch up with another rider (B) by increasing his speed when he finds the rider B is in front of him. At this point, if the physical value of the rider is abundant, then the rider will continue to chase the leading rider to catch up or keep chasing. The rider breaks up or gives up the chase and decelerates when the physical value slightly drops.

Now we describe the user interface. The main function of the login interface of the system is to allow users to enter the login name and password of their accounts to log on to the virtual riding system. The login interface is controlled by the following two C# scripts: (1) the script to send the request instructions and to send instructions to the server and (2) the control script of the UI to read the user input information. The script for the function of the scene starts after the user clicks on the Enter button.

E1KOBZ_2020_v14n3_1026_f0005.png 이미지

Fig. 5. Client login interface

The game start interface requires a button to create new training and allows the user to establish a virtual training system, including the volume adjustment and the customisation of the virtual character model and equipment. The game start interface is displayed in Fig. 6. The user enters the training rule selection and the track selection interface directly when this user selects the free-riding mode. The user can enter the selection interface when this user selects the network competition mode. The user can adjust the screen resolution, the volume of the game and the color of the equipment. The client sends a request to the server to disconnect and exit the system when the exit button is clicked.

E1KOBZ_2020_v14n3_1026_f0006.png 이미지

Fig. 6. Game start interface

The system skips to the single-person training mode interface after the user clicks on the free-riding mode, as presented in Fig. 7. At this time, the user must manually select the game map, the difficulty of the virtual rider and the number of virtual riders. The upper limit of the number of competitors in this software is 8; thus, the number of virtual riders is selected in the range of 1–7. The confirmation to jump directly to the corresponding virtual track is clicked to complete a single-person training mode when the user selects finish. In Fig. 8, the player is racing with other virtual riders in the free-riding mode.

E1KOBZ_2020_v14n3_1026_f0007.png 이미지

Fig. 7. Single-person training mode interface

E1KOBZ_2020_v14n3_1026_f0008.png 이미지

Fig. 8. Single player training mode in each track

5. Conclusion

In this paper, we build a computer model for simulating a bicycle rider’s behavior in a virtual riding system. To design the model, the force of the rider was analyzed in accordance with the actual situation. On the basis of Newton’s second law, the speed and acceleration of the rider can be obtained. On the basis of the thermal index, the physical model of a rider is proposed. The consumption of physical energy is influenced by the riding speed, riding length, and environmental factors. The physical energy will affect the maximum and average riding speeds of the rider. Other external factors, such as ranking of riders and riding distance, can also affect riding speed. The behavior tree method is applied to the decision system of the rider. Generally, the virtual rider model that we proposed is close to the reality. For exercise and training, the game difficulty can be changed to suit different levels of players.

There are variety of factors can affect the riding speed, status and strategy. In this study, we consider the ambient temperature, humidity, ranking and riding distance. Based on these factors we proposed the physical model and speed calculation model of the virtual rider and designed the behavior tree for a virtual rider to simulate the rider’s behavior. In future works, several other factors, such as weather conditions, backlighting, and environment noise could be considered to make the virtual rider model more like a real rider.

참고문헌

  1. Yang Haitao, "Research on virtual environment of bicycle movement," Ph.D. dissertation, Huazhong University of Science and Technology, China, 2009.
  2. Wang Zhenyu, "Research and implementation of intelligent role behavior in computer games," Ph.D. dissertation, Hunan Normal University, China, 2010.
  3. Jacquelyn. Erdman. MSLS, "Reference in a 3-D Virtual World: Preliminary Observations on Library Outreach in "Second Life," Reference Librarian, vol. 47, no.2, pp. 29-39, 2007. https://doi.org/10.1300/J120v47n98_04
  4. Luger. G. F, "Artificial Intelligence:Structures and Strategies for Complex Problem Solving: International Version, CourseSmart eTextbook, 6/E," Addison-Wesley Publishing Company, vol. 9, no.3, 2008.
  5. Li Bo, "Research on key technology of game artificial intelligence," Ph.D. dissertation, Shanghai Jiao Tong University, China, 2011.
  6. Yang Pei, Wang Hao, Luo Wenjie et al, "The structure design of NPC in the first person shooter game," computer science, vol. 35, no. 11, pp. 290-292, 2008. https://doi.org/10.3969/j.issn.1002-137X.2008.11.079
  7. Deng Yongjian, "Design and implementation of AI behavior tree for mobile phone network games," Ph.D. dissertation, Sun Yat-sen University, China, 2014.
  8. A. Kalai, E. Kalai, "Cooperation in Strategic Games Revisited*," Quarterly Journal of Economics, vol. 128, no. 2, pp. 917-966, 2013. https://doi.org/10.1093/qje/qjs074
  9. Jiang Wenjun, "The research and application of artificial intelligence in network games," Ph.D. dissertation, Shanghai Jiao Tong University, China, 2013.
  10. Zhang Yukong, "Artificial intelligence in computer games," Scientific and technological information: academic research, no. 18, pp. 244-245, 2007.
  11. M. Ochs, N. Sabouret, "Simulation of the dynamics of virtual characters' emotions and social relations" in Proc. of International Conference on Affective Computing and Intelligent Interaction and Workshops. IEEE, pp.1-6, 2009.
  12. Liu Zhen, He Shaohua, Chai Yanjie, "An emotional cognitive evaluation model of virtual roles," Pattern recognition and artificial intelligence, vol. 24, no. 2, pp. 160-167, 2011. https://doi.org/10.3969/j.issn.1003-6059.2011.02.002
  13. S. Rabin, Game AI Pro: Collected Wisdom of Game AI Professionals, A. K. Peters, Ltd, New York, 2013.
  14. Cervelin B H, Conti D, Diniz-Ehrhardt M A et al, "A computer model for particle-like simulation in broiler houses," Computers & Electronics in Agriculture, vol. 141, pp. 1-14, 2017. https://doi.org/10.1016/j.compag.2017.07.002
  15. Qiu Man, Wu Jianmin, Chang Shaoyong, "Mechanism of human sweat regulation under different environmental temperature and different intensity of activity," Chinese Journal of Applied Physiology, vol. 21, no. 1, pp. 90-94, 2005. https://doi.org/10.3969/j.issn.1000-6834.2005.01.019
  16. Xue Tao, "Effects of different temperature and humidity environment on Judo Athletes' physiological and biochemical indexes." Ph.D. dissertation, Soochow University, China, 2010.
  17. Carlos M. Medeiros, Fernando da C. Baeta, Rita F. M. de Oliveira et al, "Indice termico ambiental de produtividade para frangos de corte Environmental thermal index of productivity for broiler chickens," Revista Brasileira de Engenharia Agricola e Ambiental - Agriambi, vol. 9, no. 4, pp. 660-665, 2005. https://doi.org/10.1590/S1415-43662005000400033
  18. S. Pflugi, S. Roujol, M. Akcakaya et al, "Accelerated cardiac MR stress perfusion with radial sampling after physical exercise with an MR-compatible supine bicycle ergometer," Magnetic Resonance in Medicine, vol. 74, no. 2, pp. 384-395, 2015. https://doi.org/10.1002/mrm.25405
  19. Chen Xiaoping, Liu Aijie, "Some theoretical reflections on the practice of basic training of competitive sports in China," Sports science, vol. 29, no. 2, pp. 8-14, 2009.
  20. Ma Xiaoming, Song Wei, "A comparative study of the tour de France and the cycling around Qinghai Lake," Journal of Guangdong Polytechnic Normal University, no. 3, pp. 1-4, 2008.
  21. V. Bacik and M. Klobucnik, "Possibilities of using selected visualization methods for historical analysis of sporting event - an example of stage cycling race Tour de France," Quaestiones Geographicae, vol. 37, no. 3, pp. 5-22, 2018. https://doi.org/10.2478/quageo-2018-0022
  22. Yu Chen, "Review of the 2018 Tour de France Cycling Race," Chinese Bicycle, no. 9, pp. 94-101, 2018.