Development of a car racing simulator game using artificial intelligence techniques

development of a car racing simulator game using artificial intelligence techniques

Introduction Games have become an integral part of everyday life for many people.For controlling the car, the system of conditional monitoring was adopted instead of developing the nonlinear mathematical functions.Sorry, a shareable link is not currently available for this article.In order to play player versus enemy mode, an artificial intelligence AI is needed for directing non-player character NPC who acts as the opponent.Yoon, K.Park, J.Full Text: PDF.Manslow, J.Related Papers.Some features of the site may not work correctly.Hence, the developer can use the waypoint system instead of more traditional AI search techniques in determining a path for the race car on the track.Pathfinding will use waypoint system and raycasting to accomplish it.
Adaptive AI in a racing simulator: a challenging and fun environment for any user | SpringerLink

Development of a Car Racing Simulator Game Using Artificial Intelligence Techniques – DeNero and D.AI Game Programming Wisdom.In racing game, the AI requires the use of movement algorithm and decision making system.The game software system reads this list of waypoints as input and then iterates through the list until all the waypoints have been passed by the game-controlled car.Bennett and D.

Racing simulators require Artificial Intelligence in order to create a competitive environment for the player.

However these engines always seem to be created in a strict manner, leading to what can be a repetitive, predictable or frustrating system.Difficulty levels are often set in stone and do not suit every player.Development of an adaptive racing AI engine could eradicate the need for difficulty levels and provide a competitive and entertaining racing environment for any user.This paper will discuss the current techniques used in racing simulators, research into adaptive AI, and describe approaches used towards the development of an Adaptive Engine.

This is a preview of subscription content, access via your institution.Rent this article via DeepDyve.Avery, P.Book Google Scholar.Biassillo, G.In Rabin, S.AI Game Programming Wisdom.Buckland, M.Programming Game Al by Example.Butz, M.Cardamone, L.Google Scholar.DelaOssa, L.Ebner, M.Jimenez, E.Al Game Programming Wisdom 2.Loiacono, D.

Manslow, J.Games Technol.Yoon, K.Park, J.Lee, and K.Notes Comput.Notes Artif.Notes Bioinformatics , vol.Multi-Conference Appl.Informatics , vol.Claypool, K.Claypool, and F.

Bennett and D.Birmingham: Packt Publishing, Graham, H.McCabe, and S.Texas: Wordware Publishing, Inc.New York: McGraw-Hill, User Username Password Remember me.Language Select Language English Indonesian.

Access options

To ensure that this objective can be accomplished, the game incorporates artificial intelligence (AI) techniques, which enable the cars to be controlled in.a car racing simulator game using artificial intelligence techniques and Therefore, games development needs a comprehensive ideal path including.paper will discuss the current techniques used in racing simulators, research into adaptive AI, and describe approaches used towards the development of an.

How to use:

  1. Gamifying intelligent environments.
  2. In racing game, the AI requires the use of movement algorithm and decision making system.
  3. The game Racer is a contemporary video game, and its objective is to offer the player a challenging and enjoyable experience in a car race against a game-controlled car.
  4. Notes Comput.
  5. Figure 6.
Self-Driving AI Car Simulation in Python, time: 11:52

Adaptive AI in a racing simulator: a challenging and fun environment for any user

This is a preview of subscription content, access via your institution.Rent this article via DeepDyve.Avery, P.Book Google Scholar.Biassillo, G.In Rabin, S.AI Game Programming Wisdom.Buckland, M.Programming Game Al by Example.Butz, M.Cardamone, L.Google Scholar.DelaOssa, L.Ebner, M.Jimenez, E.Al Game Programming Wisdom 2.Loiacono, D.Manslow, J.Fast and Efficient Approximation of Racing Lines, pp — Onieva, E et al.

Perez, D.Thang Ho, D.Wymann, B.When this happens, the AI controller script is informed so that it would slightly adjust its control of the car.The environment module consists of two submodules: i the racetrack and ii the waypoints system.The racetrack is the road within the game environment on which the cars race, and the waypoints system represents the key positions around the racetrack.The latter enables the game-controlled cars to navigate around the racetrack.

The player needs to finish three laps of the racetrack in order to win.Figure 5 shows the start screen of the game.Figure 6 shows the Racer game during gameplay.Development of the game system was made easier because of the implementation tools.The Unity game engine supports effective development of the game system of Racer with its high-level abstraction programming tools and intuitive user interface.

These features support developers in implementation of AI concepts so that they can focus on the game logic and ignore lower level development details such as graphics rendering and physics calculations.The combined tools of MonoDevelop and Unity support the implementation processes because MonoDevelop consists of autocorrection features for many libraries and SDKs used in Unity.For example, the combined tools support the developer in implementation of the waypoint system because the Unity engine supports positioning waypoints in 3D space.

Hence, the developer can use the waypoint system instead of more traditional AI search techniques in determining a path for the race car on the track.Compared to traditional AI search techniques, the waypoint system in the Unity platform enables the car racing system of the game to be more efficiently developed.If the Unity platform was not used, the racetrack would be mapped to a set of coordinates or nodes, which represent the 3D search space that covers the track.

Then the path that the race car follows on the racetrack can be determined using either a blind or heuristic search algorithm, which identifies the nodes to be included in the path in the 3D space of the racetrack.In a blind search, the car will proceed to the next node in either a breadth-first or depth-first manner, and the node chosen as the subsequent node at each step will be the one that advances the car furthest along the track.

In a heuristic search method such as the search algorithm, the next node will be determined with an evaluation function that combines the length of the path traversed and the length of the path that has yet to be taken.

Since the path traversed is not of interest for the race car, the evaluation function can consist of only the length of the path that has yet to be taken, which will move the car farthest along the track in a direction towards the destination.In other words, the path should neither include any sharp turns nor float above or below the track, for a race car is expected to cruise along the racetrack smoothly.

This would require substantial calculation of the angle between two succeeding nodes on the path so that, for example, the car would not be seen to be following a zigzagging path along the track.The car also needs to travel on top of the track and any zigzagging along the – axis would also be unacceptable.Moreover, since this is a racing game, determining the path has to be fast.

The Unity platform provides built-in components that can satisfy these requirements of a smooth path along the track and its fast determination.Instead of representing the racetrack as a set of nodes, through which the race car searches for a smooth path, the Unity platform supports the developer in defining the waypoints at key positions along the 3D racetrack so that the race car can follow that path of waypoints.

This path of waypoints is indicated with the red spheres shown in Figure 1.This substantially reduces the search space and effort.Unity has a default gravity function to ensure the car would travel on the road and that the car does not zigzag along the – axis.

It also provides functions that support vector calculations between two nodes along a path so that the race car can avoid sharp turns on its path.With the waypoint system and the built-in gravity and vector calculation functions, the development effort involved in implementing the race cars that could mimic human driving and traverse the racetrack smoothly was substantially minimized.

Other features of Unity also support the development effort.For controlling the car, the system of conditional monitoring was adopted instead of developing the nonlinear mathematical functions.In terms of collision prevention, the trigger detection technique was used instead of ray-casting for artificial environment perception, because the former is more effective than the latter in that the technique of ray-casting only supports artificial environment perception in one single direction per casted ray.

By comparison, the trigger detection technique allows for simultaneous perception in all directions surrounding the car.The Unity engine has built-in high-level abstractions for trigger detection, which also reduced implementation efforts.

Racer was tested by over twenty users, who all reported that they thoroughly enjoyed the game.It was observed that there was approximately equal number of players who were able to win the race against the game-controlled cars.This suggests that not only did the game provide an entertaining gaming experience, it also provided a reasonably engaging and challenging gameplay.

In general, it can be concluded that the Unity platform supported efficient development of the race car game.Future work would involve incorporating other path finding techniques into the existing game system so that it can be more exciting.This would make it more difficult for the human players to predict the behavior of the game-controlled cars.

This unpredictable behavior would mean a more challenging gameplay for the user.Furthermore, while this game was designed for entertainment, the software can be extended to become a driver simulator for educational purposes.By modifying some of the parameter values of the car, such as the braking coefficients and torque values, and by modifying the game environment to resemble that of a municipal road system, Racer can be adapted to become a simulation software for learner-level drivers or for familiarizing drivers with the roadway layouts and traffic laws of foreign or unknown cities.

The authors declare that there is no conflict of interests regarding the publication of this paper.Chan et al.This is an open access article distributed under the Creative Commons Attribution License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.Article of the Year Award: Outstanding research contributions of , as selected by our Chief Editors.Read the winning articles.Journal overview.

Special Issues.Chan, 1 Christine W.Academic Editor: Manuel M.Received 29 Jun Revised 30 Sep Accepted 08 Oct Published 16 Nov Abstract This paper presents a car racing simulator game called Racer , in which the human player races a car against three game-controlled cars in a three-dimensional environment.Introduction Games have become an integral part of everyday life for many people.Background Literature There has been substantial research work that focuses on developing AI-controlled components of game systems, which can approximate or emulate human game playing styles.

Game System Design The design of the Racer game software involved three contemporary game AI concepts and techniques, which are presented as follows.

Waypoint System with Vector Calculations The first technique used was the simple waypoint system used for controlling the car.Figure 1.Waypoints at key positions on the racetrack are shown as red spheres.Figure 2.The race car and its associated trigger detection area are highlighted in the green wireframe mesh.

Figure 3.Figure 4.Figure 5.Figure 6.Figure 7.The game interface with indicators of the game components.References K.Salen and E.Liu, T.Alexandrova, and T.View at: Google Scholar L.

Wood and T.Kommers, T.Issa, and P.Isaias, Eds.View at: Google Scholar M.Gibson, C.Aldrich, and M.Prensky, Eds.View at: Google Scholar A.DeNero and D.Khoo and R.Tatai and R.

However these engines always seem to be created in a strict manner, leading to what can be a repetitive, predictable or frustrating system.Lee, and K.

– properties

  • This is a preview of subscription content, access via your institution.
  • The wheels of the car contain wheel colliders, which enable the wheels to make contact with the road and drive the car forward.
  • Development of an adaptive racing AI engine could eradicate the need for difficulty levels and provide a competitive and entertaining racing environment for any user.
  • View 1 excerpt, cites methods.
  • An example of this type of game is the popular multiplayer first person shooter game Counter-Strike [ 8 ], in which the objective is to eliminate all players on the enemy or opponent team.
  • Figure 5 shows the start screen of the game.
  • Kommers, T.
  • Prensky, Eds.

International Journal of Computer Games Technology

Khoo and Zubek discussed their use of a behavior-based action selection technique in the software development kit SDK of Flexbot for developing an AI-controlled bot, called Groo [ 10 ].Fast and Efficient Approximation of Racing Lines, pp—

  • AI Game Programming Wisdom.
  • Download other formats More.
  • Similarly, Tatai and Gudwin [ 11 ] discussed the use of semiotics in their development of a bot, which can assist or attack the human player in the game of Counter-Strike.
  • DeNero and D.
  • With this addition of the trigger area, the game system is able to control the car so that it can navigate the track satisfactorily.

What Is Semantic Scholar?

Lee, and K.Notes Comput.Notes Artif.Notes Bioinformatics , vol.Multi-Conference Appl.Informatics , vol.Claypool, K.Claypool, and F.

Bennett and D.Birmingham: Packt Publishing, Graham, H.McCabe, and S.Texas: Wordware Publishing, Inc.New York: McGraw-Hill, User Username Password Remember me.

Language Select Language English Indonesian.Current Issue.Keywords racing game, Unity, non-player character NPC , waypoint system, raycasting, decision tree.Full Text: PDF.This system was used by many early car racing games because of its effectiveness and simplicity.In Racer , waypoints are stored as a sorted list of positions in 3D space using the List generic class from the System.Generic namespace [ 12 ].The game software system reads this list of waypoints as input and then iterates through the list until all the waypoints have been passed by the game-controlled car.

The game system only iterates to the next waypoint in the list when it detects that the game-controlled car is within a specified distance from its current waypoint.The red spheres along the racetrack in Figure 1 indicate the waypoints at key positions on the track.

In order to turn the car towards its current waypoint, the game system performs a series of vector calculations, which determine the amount of steering the game system needs to provide to the car.

These calculations are based on an initial vector created by both the position of the current waypoint and the current position of the car itself.This series of calculations produces an output vector, which provides the bases for the steering and braking output levels of the car.

However, during development of the game, it was found that using only the method of waypoints with vector calculations was ineffective in controlling the car.Due to the nonlinear relationship between the input and output vectors, the car could not be controlled using this method alone, and, therefore, the conditional monitoring system was adopted to augment the method of waypoints with vector calculations.

Due to the nonlinear relationship between the input and output vectors, the steering and braking output levels of the game-controlled car could not be determined solely from the calculated output vector in the waypoints system.It was necessary for the game system to also employ a conditional monitoring system that can further refine the steering and braking output levels applied to the car.When the foundational waypoint system was enhanced with the conditional monitoring system, the car was able to traverse the track with satisfactory results.

Instead of adding the conditional monitoring system, the alternative design of deriving and incorporating a nonlinear mathematical function into the game system was also considered.Since this may require complex mathematical manipulations or modeling of the mathematical function using techniques like artificial neural networks, this alternative was abandoned.

The second method that the game system employs in controlling the car is the use of trigger detection and artificial environment perception.Trigger detection is a popular mechanism used in contemporary video games, and it supports detecting a specific game object when it is within the vicinity of another game object.This method can determine if the game-controlled car may run into some object such as a wall.

To prevent the collision from happening, the game system can adjust the steering and braking output levels applied to the car.The mechanism that supports this feature is the trigger area added to the car.If a wall enters into this trigger area, the game system becomes aware of where the wall is with respect to the car and it would adjust the output levels accordingly so as to steer the car away from the wall.

With this addition of the trigger area, the game system is able to control the car so that it can navigate the track satisfactorily.The car in the middle of Figure 2 highlighted in the green wireframe mesh has a trigger detection area defined as the green rectangle around it.

When an obstacle or another car enters into the trigger detection area, the output levels of the highlighted car will be adjusted so as to steer the highlighted car away from the obstacle.

An alternative technique considered for implementing this environment perception component of the game was the ray-casting technique.

Ray-casting is a mechanism commonly used in contemporary video games, which involves drawing a ray or line from an object towards a specified direction, which, in the Racer game, would be the direction the car is heading.This drawn line would be used to determine if the car is about to collide with another object.

However, the ray-casting mechanism is inadequate in that it can only detect collisions in one direction while the trigger detection mechanism can detect collisions in all directions.The component technologies that function as the higher-level abstraction programming tools and implemented the design of the game system described in the previous section are presented as follows.

Unity is a game development engine combined with an integrated development environment IDE that is capable of creating applications for Windows, Mac OS X, Linux, and other mobile platforms [ 13 ].

The Unity game engine can perform graphical rendering and physics calculations, thereby enabling game developers to focus on the creation and development of the game software.Using the Unity engine, developers can position, scale, and add realistic physics to objects in the game system.

The left panel shows a list of defined game objects, the middle visualization shows the game objects in the 3D space of the racetrack, the right panel shows the attributes of a selected game object, and the bottom panel consists of icons of the scripts, each of which defines the behavior of a game object.The Unity game engine works in conjunction with MonoDevelop for controlling the behavior of objects.

MonoDevelop is an open source Integrated Development Environment or IDE developed by Xamarin and the Mono community [ 14 ], which is primarily used for development in the C programming language.

With MonoDevelop, developers are able to write scripts in C , JavaScript, or Boo and attach them to objects in the Unity engine; these scripts enable developers to control the logic and behaviors of objects within the Unity environment [ 13 ].

In this way, the combined tools of Unity and MonoDevelop enable developers to focus on the development of the AI components of the game rather than on issues related to 3D graphics rendering and physics calculations.Figure 4 shows the script inside one of the icons shown on the bottom panel of the Unity editor; development of the script was supported by the MonoDevelop IDE.

The primary programming language used for writing the scripts to control the behaviors of objects was C.C was chosen because it is object-oriented and class-based.

Also, it has a variety of libraries and frameworks built specifically for development with Unity, which contain many generic classes and interfaces such as the List, Stack, and Dictionary [ 13 ].These built-in classes have been optimized and are accessible with online documentation.For example, the List generic class from the System.The player-controlled car module consists of four submodules: i the body, ii the wheels, iii the heads-up-display HUD , and iv the player controller script.

The body of the car is the 3D model that the player sees in the game environment; this submodule also contains the colliders, which enable the car to collide with objects in the game environment.The wheels of the car contain wheel colliders, which enable the wheels to make contact with the road and drive the car forward.

The wheels submodule also contains a script which animates the rotation of the wheels as the car moves.Lastly, the submodule of the player-controller script, called PlayerCarController.The game-controlled car or the AI-controlled car consists of four submodules: i the body, ii the wheels, iii the trigger area, and iv the AI controller script.

The body and wheels of the game-controlled car are identical to the body and wheel components of the player-controlled car.The trigger area component of the car is controlled by the CarSensor.When this happens, the AI controller script is informed so that it would slightly adjust its control of the car.

The environment module consists of two submodules: i the racetrack and ii the waypoints system.The racetrack is the road within the game environment on which the cars race, and the waypoints system represents the key positions around the racetrack.

The latter enables the game-controlled cars to navigate around the racetrack.The player needs to finish three laps of the racetrack in order to win.

Figure 5 shows the start screen of the game.Figure 6 shows the Racer game during gameplay.Development of the game system was made easier because of the implementation tools.The Unity game engine supports effective development of the game system of Racer with its high-level abstraction programming tools and intuitive user interface.These features support developers in implementation of AI concepts so that they can focus on the game logic and ignore lower level development details such as graphics rendering and physics calculations.

The combined tools of MonoDevelop and Unity support the implementation processes because MonoDevelop consists of autocorrection features for many libraries and SDKs used in Unity.

For example, the combined tools support the developer in implementation of the waypoint system because the Unity engine supports positioning waypoints in 3D space.Hence, the developer can use the waypoint system instead of more traditional AI search techniques in determining a path for the race car on the track.

Compared to traditional AI search techniques, the waypoint system in the Unity platform enables the car racing system of the game to be more efficiently developed.If the Unity platform was not used, the racetrack would be mapped to a set of coordinates or nodes, which represent the 3D search space that covers the track.Then the path that the race car follows on the racetrack can be determined using either a blind or heuristic search algorithm, which identifies the nodes to be included in the path in the 3D space of the racetrack.

In a blind search, the car will proceed to the next node in either a breadth-first or depth-first manner, and the node chosen as the subsequent node at each step will be the one that advances the car furthest along the track.In a heuristic search method such as the search algorithm, the next node will be determined with an evaluation function that combines the length of the path traversed and the length of the path that has yet to be taken.

Since the path traversed is not of interest for the race car, the evaluation function can consist of only the length of the path that has yet to be taken, which will move the car farthest along the track in a direction towards the destination.In other words, the path should neither include any sharp turns nor float above or below the track, for a race car is expected to cruise along the racetrack smoothly.

This would require substantial calculation of the angle between two succeeding nodes on the path so that, for example, the car would not be seen to be following a zigzagging path along the track.The car also needs to travel on top of the track and any zigzagging along the – axis would also be unacceptable.Moreover, since this is a racing game, determining the path has to be fast.

The Unity platform provides built-in components that can satisfy these requirements of a smooth path along the track and its fast determination.Instead of representing the racetrack as a set of nodes, through which the race car searches for a smooth path, the Unity platform supports the developer in defining the waypoints at key positions along the 3D racetrack so that the race car can follow that path of waypoints.This path of waypoints is indicated with the red spheres shown in Figure 1.

This substantially reduces the search space and effort.Unity has a default gravity function to ensure the car would travel on the road and that the car does not zigzag along the – axis.It also provides functions that support vector calculations between two nodes along a path so that the race car can avoid sharp turns on its path.

With the waypoint system and the built-in gravity and vector calculation functions, the development effort involved in implementing the race cars that could mimic human driving and traverse the racetrack smoothly was substantially minimized.Other features of Unity also support the development effort.For controlling the car, the system of conditional monitoring was adopted instead of developing the nonlinear mathematical functions.In terms of collision prevention, the trigger detection technique was used instead of ray-casting for artificial environment perception, because the former is more effective than the latter in that the technique of ray-casting only supports artificial environment perception in one single direction per casted ray.

By comparison, the trigger detection technique allows for simultaneous perception in all directions surrounding the car.The Unity engine has built-in high-level abstractions for trigger detection, which also reduced implementation efforts.

Racer was tested by over twenty users, who all reported that they thoroughly enjoyed the game.It was observed that there was approximately equal number of players who were able to win the race against the game-controlled cars.

.New York: McGraw-Hill, This would require substantial calculation of the angle between two succeeding nodes on the path so that, for example, the car would not be seen to be following a zigzagging path along the track.

Deep Learning Cars, time: 3:19
Rate article
Roblox Exploits & Scripts
Add a comment