'ewil' is the name of the player in our case, and 'name' is used for boxes containing letters of the names of opponents.
![nfsu 2 pcsx2 nfsu 2 pcsx2](https://cdromance.com/wp-content/uploads/2015/05/need-for-speed-underground-2-screenshot-3.jpg)
The labels '0' to '9' are used for the respective integers while 'void' is used to show that this box does not contain any information. We have highlighted the boxes of the first row in the figure below:Įach box belongs to one of the following classes: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '-', 'void', 'ewil' and 'name'. In the following, we will refer to these images as boxes. As a consequence, we will further cut out five images of each row. To reduce the number of classes that arise, we separate each row further. Thus, they are the ones that will be inserted into the initial neural network. The three rows are the ones where we get our information from. We take each image of a frame and crop out the part where the leads are displayed (the red bordered table in the top right corner):Īs we can see, there are four rows in said table: the bottom one where the name of the player (Ewil) is displayed and three with the leads over the opponents. For the training, we therfore take out the segment of the video where the racing is done and examine each frame. At this moment, we are only interested in the parts where he drives a race of the category 'Circuit', 'Sprint', 'Street X' or 'Underground Racing Leauge' ('URL'). In this video, Ewil performs a so-called speedrun of the game, in which he tries to finish the game as quickly as possible. It is trained by 'feeding' it a large (~6h) video of the YouTuber EwilCZ. As stated above, we will employ a neural network for this task. Ingame, these leads are displayed in seconds with.
![nfsu 2 pcsx2 nfsu 2 pcsx2](https://i.ytimg.com/vi/XjH5hggsHc8/maxresdefault.jpg)
The very first goal is to obtain information about the distance that other racers are behind or in front of us. We observe that the optimal way of driving in this mode is different compared to all other modes since the focus lies on drifting.
![nfsu 2 pcsx2 nfsu 2 pcsx2](https://i.imgur.com/DniVoTz.png)
For drift races, the goal is to perform drifts to obtain points. In addition, there is no information about leads available on the screen. In the case of drag races, the player has to shift gears manually and is only informed on its over all position on the leaderboard. Moreover, they are easier to handle since in other ones, there are additional 'rules'. The reason behind the limitation of racing modes is that here, the leads are constantly displayed in seconds. These inputs will be used to determine the most optimal button presses (outputs) to gain the largest lead. The current plan is to utilise a (deep) neural network that uses the whole window of the game and the lead over enemies as inputs for the network. Hence, we will use reinforcment learning in order to train the AI. With the help of this information, we can reward the AI for being in front of the other racers or punish it otherwise. To achieve this, we will develop a neural network to determine the lead over other opponents. The initial idea of the project is to create an AI for Need For Speed Underground 2 that is able to beat the ingame opponents on easiest difficulty in one race in the modes 'Circuit', 'Sprint', 'Street X' and / or 'Underground Racing Leauge' ('URL'). This motivates us to not only become first, but also win by the largest margin possible. A larger lead at the end of the race yields more reputation. In the career mode on which we will focus, a player can also earn reputation. To win a race, the player has to become first in each race. Need For Speed Underground 2 is a racing game, made by EA and published in 2004 in which the player mainly competes in races against other racers.
![nfsu 2 pcsx2 nfsu 2 pcsx2](https://i.ytimg.com/vi/OnnvgLYkh8g/maxresdefault.jpg)
In addition, at least the steering and the retrieval of the pixels will be done in a similar fashion as it was done by the YouTuber sentdex (see also here). This project is inspired by the work of the DeepMind team using the raw pixels to train a deep neural network to play Atari games. In order to achieve this task, we will use reinforcment learning in combination with neural networks. The goal of this project is to let a neural network drive cars and win races in the racing game Need for Speed: Underground 2.