Hello Everyone!! It's me again, spamming my creation. For whatever reason I forgot about this forum and have already started my new AI series. As I'm quite lazy myself, I think there's no issue This time, I'm using a few of the same drivers + additional from 2 viewers (Ari and Celinio) A brief, and probably incomplete, information about the series: I'm giving all the drivers the same config parameters on the 1st training session. Based on how they perform, I load the data in my PPO-SAC algorithm to output parameters for the next training session. This has proven a bit of a overwhelming architecture for little to no data, so I'm currently working on using random outputs for every 5 training sessions before giving to the algorithm. Anyway, I have already completed races for 2 classes (A and B) on a single map, which are already available on YT. If you would like to follow/watch/criticize or anything else, leave a comment here or on YT. Here's the link for the Playlist as adding all the videos doesn't work for the long run: https://youtube.com/playlist?list=PLnMrlXteV65GUlV8urIS768v2EhXZrF-b Here is the latest standings of the championship: Thank you and hope to hear from you all.
Hello my fellow BeamNG enthusiasts. It has been a while since I don't post here, or even open the forum. However, since I did, I'm updating this thread with information no one asked The algorithm for the AI I use to make these races has been updated since my last post. Using PPO-SAC was a bit overwhelming to my computer and was bring little to no return since the volume of data was very small. I updated the ML algorithm to start using RandomForest as it's decision tree, on initial tests, were very promising. And from the Class C races at the East Coast map, the AI has been using this algorithm. The learning of the AI has improved quite a bit, thus making their performance more reliable and requiring less manual (mine) input during training sessions. By switching the algorithm, from PPO-SAC mixed to RandomForest, I managed to increase the number of training sessions for all the drivers, which resulted in the better performance aforementioned. The data I'm using is a combination of BeamNG original parameters with my own creations. They are: risk (original) - also known as aggression in the code. Determines the risk-taking of the AI driver vision (original) - also known as lookAheadKv in the code. *Vision is a name I gave to it as it is not seen anywhere in the code. Determines how far down the AI will steering the wheel for a turn. Also used to determined how far the AI will look down the road, based on the car speed. awareness (original) - also known as awarenessForce in the code. Determines the strength of the Bubble around the car for collision avoidance. turnForceCoef (original) - Determines how the AI naturally cut corners springForceIntegratorDispLim (original) - Determines how much the AI's path can be laterally displaced. (i.e. the AI drive in the center of the road and this determines how far from this center line the AI can go) safetyDistance (my own) - Controls the following distance the AI can reach to another car in a racing context and acts as a behavioral parameter for overtake. My own AI updates. Doesn't work well. lateralOffsetRange (my own) - Defines the maximum lateral "corridor" the AI is allowed to use, as a percentage of the total road width. lateralOffsetScale (my own) - Determines how aggressively the AI uses the available corridor defined by lateralOffsetRange. shortestPathBias (my own) - Influences the racing line calculation. It's a bias between taking the geometrically shortest path versus a path that might be longer, but allows for a better corner exit speed Obs: My own parameters are related to the strategy, path definition. While the original parameters are related to the execution of the strategy. Using the above, I managed to complete a few races with about 20 training sessions for each. Starting in the next class, Class B for the Jungle Rock Island, the AI will start using new data on their training, which can potentially be a more accurate driving with more risks and unexpected track utilization. The extra data that I gave to the ML are the output of the UI Log Vehicle Stats (car telemetry). The data points are: brake, pitch, reverse, roll, rpm, steeringWheelPosition, throttle, time, vehicle x-position, vehicle y-position, vehicle z-position, velocity, yaw. The telemetry data allows the ML algorithm to "see" the track by analyzing the behavior of the car and the inputs the AI makes. On top of that, I exported the JSON files from the tracks I created in the World View, with checkpoints and all, to place the cars in an Virtual 3D map (environment), so the algorithm can also understand "where" the car is, how high, how low, if the car is going uphill and so on. Using the combination of the environment and telemetry data, I could calculate for each track the following features: corner_severity, elevation_change, is_crest, cliff_danger_score, segment_length. These are initial features and they help me, specially the corner_severity and segment_length. These features help the AI decide better on parameters values, impacting on the speed they attain and how they "tackle" a turn. However, this environmental feature was added mid-training session (session 10 onwards) for the Class B at the Jungle Rock Island map. With all this data, the ML algorithm can predict a potentially better combination of all the parameters list above for a better time in the track. It did help them, to be honest. And how is the ML setup? I have 3 pillars, with only 2 in execution. Pillar 1 (Used) - this is the driver perspective. The output produced here is how the AI "feels" it should drive in the next training session. Basically the current state of the driver. Pillar 2 (Used) - this is the coach perspective. The output produced is an adjustment to the above where the coach push or pull the driver on a per checkpoint basis (within the track). Pillar 3 (Not Used) - this is the sponsor perspective. Not yet developed, but its intention is to create constrains in the driver. I want it to look at external factors (positions in the championship, damage to the car, creation of highlight) to the table. With all this data, the output is the value for each parameters listed above for each checkpoint in the track. Some tracks have 7 checkpoints (before telemetry, this worked ok) to 23 (add new checkpoints for telemetry data). The higher the number of checkpoints, I believe the better the AI will behave. And I'll tell that, from the session number 15, I started seeing some drifts close to the hill edge at the JRI map. I hope they do it during races as well. With this non-requested update, I want to let you all know that the races for the Class A at the Jungle Rock Island are about to finish, with only the last 3 drivers to finish. You can check them in the YT playlist I shared in my OP. For the Class B, it is still at the editing phase, so expect a few more week to be uploaded. I set a schedule that every Thursday a new episode will come out. The next episode is the conclusion of Class A, scheduled for November 06th. If all goes well during editing, on November 13th, the Class B will be available already. Thank you for reading my ramblings ;D PS: I don't have a discord, but I do have a Telegram Channel. I reckon that Telegram isn't the best, but Discord is too much for me at the moment. Maybe in the future, so you can either contact me here or PM requesting my Telegram Group.