A Simple Solution to The Devastating AI issues in MADNESS Engine, A Little Message to Developers

Discussion in 'Automobilista 2 - General Discussion' started by Hany Youssef, Jun 12, 2023.

  1. Hany Youssef

    Hany Youssef New Member

    Joined:
    Jan 6, 2023
    Messages:
    8
    Likes Received:
    0
    Hello Every One,
    This is my first post in the forum, and as a brief intro, I have every other sim racing title including AMS2 with all DLCs released so far, and I truly believe that AMS2 has the potential to be best sim-racing title ever.

    As you may notice, poorly calibrated AI in AMS2 has been inherited from PC2 and its MADNESS engine, it is a problem that makes single player experience within AMS2 not a very pleasant one. As we know, the AI in AMS2 (like many other sim-racing titles) runs on a simplified physics engine different from the more advanced physics engine which run the players' cars. In this case the AI has to run on presets of lap times depending on MANY FACTORS including but not limited to car/track combinations, weather conditions (dry/rain/snow/etc,) player skills, car setups, and many other factors.

    Considering that AMS2 has more than 150 cars and 50 tracks, this means that there will be 7500 different car/track combinations multiplied by at least (4) dry/light rain/heavy rain/snow variables, resulting in 30,000 different car/track/weather combinations. Meaning with every slight modification to the physics engine, REIZA has to go through at least 30,000 different possibilities to adjust/calibrate AI to reasonable difficulties. Considering other factors that my affect lat time outcomes and also by adding more cars and tracks to the title through future DLCs will exponentially increase previously mentioned number to > 100,000.

    So, what is the solution? Well, we can simply say they can just use AI that runs on the same physics engine as player (like ACC), but this is impossible given the MADNESS engine limitations. If so, what is the solution then. IMHO, I think AMS2 developers have to begin with removing the limitations they put on AI difficulty settings, so instead of having AI difficulty ranging from 70 to 120, the AI difficulty range should be expanded to for example a true 30 to 150 putting the user in the developer's seat calibrating the AI difficulty to his own skill and to other factors affecting the lap time outcomes including race/car/weather combinations, this feature should also be available in unranked online and LAN multiplayer and the future career mode if there ever will be one.

    The other option that should be included in AMS2 to overcome the current problematic AI, is the adaptive AI strategy as in RRE, where the game automatically calculate the user's average/minimal/best lap time in a certain scenario and put this value as the median lap time value for the AI opponents. I think if the developers implement the above mentioned simple strategies i.e. expanding AI difficulty (like in RF2) and adding the adaptive AI calculations (like in RRE), they will not have to spend so much time tuning and calibrating the AI in more than 100,000 different scenarios i.e. car/track/weather combinations with every single physics upgrade to put in the game engine not to mention having a dedicated threads in the forum reports AI bugs in certain car/track/weather combinations.
     
    • Disagree Disagree x 3
  2. CrimsonEminence

    CrimsonEminence Administrator Staff Member AMS2 Club Member

    Joined:
    Nov 4, 2018
    Messages:
    9,622
    Likes Received:
    9,507
    Also an AI that runs on the same physics like the player doesn't warrant easier or fitting calibration (and is proven to be no cure for pace variance). That's not that simple at all.

    Sorry, but the way things work aren't as easy to solve by the suggestions. Increasing AI difficulty setting range would btw. also provide new difficulties because the scaling would be completely off and dependent functionality being skewed - this would now lead to wholesale revisions on their own. It doesn't simplify things, it adds clutter and workload.

    An adaptive system has some advantages but requires base calibration per track and class aswell.

    The current ongoing revision of all classes physics includes AI calibration.
    One of the most "simple" solutions are to calibrate classes by a fitting default in all matters and revising track specific AI characteristics + behavioural issues.
     
    • Like Like x 1
  3. Hany Youssef

    Hany Youssef New Member

    Joined:
    Jan 6, 2023
    Messages:
    8
    Likes Received:
    0
    While I agree that running AI on the same physics engine does not warrant PACE VARIANCE, it also leads to higher CPU usage and poor optimizations. On the other hand, it warrants easier determination of the minimal/median/average/maximal lap times at any time given any set of variables (Car/track/wet, dry conditions). For example, yesterday, after the last update, while it was mentioned that all AI should be calibrated for dry conditions, I went ahead and used an unusual car/track combo and drove a kart on an oval track and set AI difficulty/aggression to minimal and after the 1st lab all AI driven karts bypassed my kart as one piece. If these karts were simply limited by the same engine that would have never happened.






    I completely agree, but the purpose of the forum to have bug reporting and new suggestions that may direct the developer’s attention to other solutions and options especially those present in other titles that my help fix the current AI problems in AMS2


    I do not think it adds any clutter or workload, because that will be done at the user level, the user will simply have the option to adjust AI to his preference according to any variables he chooses in his current race session, any car/track/weather combo. In RF2, users have the option to adjust AI from Absolute zero to 100, where zero is a barely moving AI driven cars. I don’s ask to go this extreme, but in the current poorly calibrated AI within AMS2, the user should be able to increase AI difficulty in track where it feels so sluggish, it also should be able to lower the AI difficulty in WET situations where AI cars can extraordinarily complete 2 laps while the user driven car is spinning in rain, and its speed is very limited by wet physics. In fact the way the AI behaves in wet scenarios in AMS2 destroys any single user experience including single races, championships or even the multiplayer experience when AI cars is used to fill empty spots.


    It don’t believe it does, as it is usually based on the user’s lap time in practice/qualifying sessions, so the game automatically obtain minimal/median/average/maximal lap times for the user given same variables car/track/weather variables, so when the race kicks in, the AI has been already well-calibrated




    AMS2 has been released in 3/31/2020 i.e. more than 3 years, yet, the titles still suffers from a poorly calibrated AI despite multiple threads here and in other forums reporting AI calibration issues in various car/track combo, not the mention the currently unplayable AI in wet conditions using any car/track combo. The current traditional method of AI calibration by going through every single possibility (more than 30,000 possibilities of car/track/weather combos as I mentioned in my first post) has failed to fix the devastating AI issues in the MADNESS engine for 6 years since the release of project cars 2 by SMS in 2017 or at least for more than 3 years since AMS2 release in 2020 by REIZA.[/QUOTE]
     
    • Disagree Disagree x 3
  4. CrimsonEminence

    CrimsonEminence Administrator Staff Member AMS2 Club Member

    Joined:
    Nov 4, 2018
    Messages:
    9,622
    Likes Received:
    9,507
    This was for all so far revised classes and not all classes in the game.

    Kart AI is due for rebalancing after revision has been completed on them.
     
    • Informative Informative x 1
    • Optimistic Optimistic x 1
  5. CrimsonEminence

    CrimsonEminence Administrator Staff Member AMS2 Club Member

    Joined:
    Nov 4, 2018
    Messages:
    9,622
    Likes Received:
    9,507
    It's not based on assumptions what i explained.

    If you really think that AMS2 AI is at the same level like pCars2 i'm honestly not sure what to say.

    Thanks for your suggestions, we'll see how things move on.
     
    • Like Like x 2
  6. Scar666

    Scar666 Zum Glück bin ich verrückt

    Joined:
    Jul 1, 2020
    Messages:
    1,232
    Likes Received:
    1,378
    With the bar for the player physics constantly moving expecting the AI to be calibrated anywhere near their final form this early in a development cycle is very optimistic...

    As the player physics have evolved in sim racing the average PC can't handle the AI on the same physics... Most would crumble at 5 AI on track with them...

    Even AC which is very simple in comparison to rF2 and AMS2 has poorly calibrated AI...

    AMS2s AI has a long way to go, it does a lot of things well, and I get the excitement to want to have it now... But until the player side physics aren't having major updates you can't expect the AI to be perfectly calibrated...
     
    • Optimistic Optimistic x 1
  7. Mazdaspeed

    Mazdaspeed Well-Known Member AMS2 Club Member

    Joined:
    Aug 25, 2022
    Messages:
    1,402
    Likes Received:
    727
    [/QUOTE]

    While you do have some valid points, I have to disagree in the wet AI, I have been having some rather nice races in the wet with the F-Vintages, Lancer Cup, Formula Trainer, Vee, and some others, so there are many classes that are fine.

    Also the only things PC2 AI does better is the pack racing, AI to AI overtaking and they are not tanks when colliding with the player. Aside from that they are worse in every way, specially in wheel to wheel with the player.

    My biggest gripe with the AI aside from the already reported many times by many people pack racing and overtaking deficiencies, is the weird lines they take and how they go crazy when stuck behind slower cars, just did a race at Silverstone 91 with the Classic G4 and they are pretty bad there, unable to overtake and bouncing all over the kerbs.

    Aside from those issues the AI in the game is rather good and better than most of the current sims...
     
    • Agree Agree x 2
  8. Hany Youssef

    Hany Youssef New Member

    Joined:
    Jan 6, 2023
    Messages:
    8
    Likes Received:
    0
    AI and player driven cars run on the same physics engine in ACC not AC. Both original AC and rF2 use a simplified physics engine for AI like AMS2, the only difference is that both titles give the user the freedom to adjust AI difficulty/aggression from absolute zero to 100% to compensate for the poorly calibrated AI for official cars/tracks and also to make the added (never-caliberated) modded cars/tracks more playable, while both ACC (same engine for AI/player) and AMS2 limit AI difficulty range below and above certain limits, and only RRE uses the adaptive AI strategy.

    In a sim racing title that is continuously being evolved by active developers like in AMS2, major updates to physics are expected at any time, as evidenced by the current situation, we are more than 3 years from the release date and developers are still putting a great effort to update the player side physics engine (which is a very welcomed step btw), and that was actually my point in the original post, to give the user the option to change the AI difficulty to any degree, and free the developer from the need to calibrate/recalibrate the AI with every physics engine upgrade.

    It has mentioned previously that developers may want to implant modded cars, tracks and a career mode in the game at some point. If so, implementing modded uncaliberated cars/tracks in unranked multiplayer will absolutely require the option to freely adjust the AI difficulty by the player (when using AI fill in multiplayer). Career mode/championship will also require something similar to adaptive AI to keep things more interesting.
     
  9. Scar666

    Scar666 Zum Glück bin ich verrückt

    Joined:
    Jul 1, 2020
    Messages:
    1,232
    Likes Received:
    1,378
    And ACC is the least sophisticated in the physics department... Connection is there...

    Both rF2 and AC have had more than a decade of development either by developers or by the community... And whilst the AI in rF2 is decent, the AI in AC is just plain terrible...

    Multiplayer needs an overhaul in a lot of areas... AI on any server is only good for the host... Everyone else is almost invisible to the AI... So as soon as I see AI on a server I'm out unless I really want to race the car/track combination...

    I've suggested a similar "simple" solution of raising the difficulty, but as said in this thread it's not an easy task that requires a lot more work to it... The AI in a lot of cases are just too slow for me, but the AI were always just a stepping stone to real competitions online...

    Just like the career mode, it's way too early in the development cycle for these things to get nailed down when there's so many variables that change things...

    Realistically Reiza is the first company to work on this engine with the intention of making a sim racing title, not just marketing one and making a quick cash grab, and have just got to the bottom of a major tyre bug within the engine which hasn't been fully rolled out onto the sim yet... So despite all the content we are still very very early in the development cycle of the Madness engine...
     
    • Friendly Friendly x 1
  10. CrimsonEminence

    CrimsonEminence Administrator Staff Member AMS2 Club Member

    Joined:
    Nov 4, 2018
    Messages:
    9,622
    Likes Received:
    9,507
    The suggestion initially here was to widen the strength setting scale. The largest issue with that is, that various variables depending on that scale (if changed) would be out of whack or wouldn't change anything for the user either because you basically "add more notches" but you don't magically actually make them faster at a 150 strength setting.

    At the end you would change nothing for the user or the development effort (except actually adding even more things to revise) the way this calibration works (which btw. is similar to how AMS1 did it).

    Each single class in the game will receive further AI calibration and various tracks that skew results of base calibration are on the list aswell. Same for wet weather calibration and so on. This happens first when a class has been revised on physics though, otherwise it would make no sense.

    There is a better grasp on a few things now, but it becomes a tad grating and annoying when you have to read about the AI being at "devastating" state similar to pCars2 which (factually) had a completely different configuration and not much to do with the AI in AMS2 anymore.

    AI in AMS2 has less of a long way to go than some aspects AMS1 had - frankly said. No frivolous statement.

    The calibration consistency is one of the biggest problems to solve amongst all the simulators on the market and it's clear that it's one of the most struggles to get it right obviously. Same for overtaking behaviour and track usage.

    PS.: if you test Karts (additionally with an unsuit track type) i can pretty much understand a lot of complaints though - there are behavioural issues and tweaks to base calibration that indeed need a lot more polish, but it's not a universal sample you can apply on any combination in the program.

    PPS.: Wet calibration belongs to the revisions aswell. There is awareness for it being still off the dry calibration, this can be tuned in a more consistent manner also because player tires will gain more consistency in behaviour after the revisions. A lot of moving parts here.

    We'll see more improvements likely.
     
    • Informative Informative x 6
    • Optimistic Optimistic x 1
  11. CrimsonEminence

    CrimsonEminence Administrator Staff Member AMS2 Club Member

    Joined:
    Nov 4, 2018
    Messages:
    9,622
    Likes Received:
    9,507
    To elaborate a bit on that: AI isn't tuned by "moving a slider" that tells them "go faster" - instead it's a combination of things like how they use throttle, how their tire grip is configured, how they act on the brakes, what track state is there (and what track to begin with, how their lines are etc.) and what wear and fuel level they're working with (they also have management of resources), even suspension rates of the cars can change results.

    It deals with many prioritizations of things happening at once depending on conditions.

    A few things here have been explored further recently and i'm confident to say that it's also noticeable with the revised classes already.
     
    • Informative Informative x 3
  12. Scar666

    Scar666 Zum Glück bin ich verrückt

    Joined:
    Jul 1, 2020
    Messages:
    1,232
    Likes Received:
    1,378
    I made my similar suggestion ages ago before I started digging into the files and understanding the engine better...

    Now that I've been toying with the physics and seeing the results with the AI I know it's a lot more detailed under the hood, and that simply making them faster is a lot more complicated than it seems on the surface...

    All sorts of calculations seem to be going on for how they attack the corners that can get thrown out by making the car physics go faster, which means there's some calibration in a file somewhere that has to counter what has been done in the chassis or engine files to make the cars faster in order for the AI to know how to drive the car...
     
    • Like Like x 1
  13. PaulA

    PaulA Active Member AMS2 Club Member

    Joined:
    Jul 4, 2022
    Messages:
    185
    Likes Received:
    84
    Yep.
    If you compare the F-USA 23 , to some other cars in the game. the AI is so much better in that revised class.
     
    • Like Like x 1
  14. ayzr0451

    ayzr0451 Member

    Joined:
    Oct 5, 2019
    Messages:
    30
    Likes Received:
    8
    I can see some comparing to the pcars 2 ai in ams2. Racing in trains, being unaffected by collision or wet road, driving on grass without spin or lose speed, erratic behavior, inconsistent from corner to straight, inconsistent from car to track, bad strategy, and many of same bugs overall. It has many of the flaws but all the games do. Ai have not dramatically improved for a long time. Even ai in shooting games is dumb. Play the newest far cry and it is sad. If making ai be equal affected by grass or contact or puddles is impossible, it would be nice to be able to adjust ai within a race session. Having to quit the race or qualify to change the setting is tedious. You cannot use the same number for all car or all track or all session or all weather. Always am having to quit and restart to change a setting
     
  15. Marius H

    Marius H Internal Beta Tester Staff Member AMS2 Club Member

    Joined:
    Mar 24, 2016
    Messages:
    5,753
    Likes Received:
    2,442
    Thing about adaptive AI is that it never makes you improve your racecraft because you're always doing a front pack / pole race. It can even stagnate the progress.
     
  16. Kurupt CDN

    Kurupt CDN Active Member AMS2 Club Member

    Joined:
    Mar 11, 2016
    Messages:
    282
    Likes Received:
    78
    Once the physics meet a stable state, releasing optimized ai combinations each build like iRacing, start with the championship mode combinations.
     
  17. FS7

    FS7 controller filters off please AMS2 Club Member

    Joined:
    Oct 23, 2016
    Messages:
    1,657
    Likes Received:
    956
    Not sure how difficult this is to implement, but I'd love to have some system that would suggest a proper AI difficulty level for a car/track combo.
    For instance, I do laps with the Stock Car 2019 at Silverstone GP in dry weather in practice mode, the game would look at my fastest lap times and fuel load and suggest an AI difficulty level where the fastest AI does similar lap times to mine (or maybe a difficulty level range eg: "based on your laptimes we suggest AI difficulty between 100-105 for this car/track combo"). That would save some time whenever I'm trying to setup a race.
    Seeing as how ideal AI difficulty can vary considerably depending on car, track, and weather conditions, this would be a great option to have if it's possible to implement.
     
    • Agree Agree x 2
    • Creative Creative x 1
  18. tpw

    tpw Well-Known Member AMS2 Club Member

    Joined:
    Mar 8, 2016
    Messages:
    621
    Likes Received:
    428
    Per car and per track difficulty sliders worked beautifully in AMS and would be a great stopgap while waiting for full calibration. There are clearly car classes that are overpowered (F Jr) or underpowered relative to the player, and there are clearly tracks (eg Oulton) where the ai are just too fast.
     
  19. Mazdaspeed

    Mazdaspeed Well-Known Member AMS2 Club Member

    Joined:
    Aug 25, 2022
    Messages:
    1,402
    Likes Received:
    727
    I actually feel that the AI in the updated classes is too easy on the wet now :confused:. In the Juniors I am 1.5 to 4 seconds faster at Hockenheim historic depending on the amount of puddles(100% difficulty).
    It's great that they slow down more when going through the puddles now, but it would be better if they could try to actually evade them when possible.

    Not trying to be an ass and demand too much, but that's kind of a big issue because it would be a pain to balance the AI in the wet if they slow down too much on the puddles that the players can evade easily.
     
  20. CrimsonEminence

    CrimsonEminence Administrator Staff Member AMS2 Club Member

    Joined:
    Nov 4, 2018
    Messages:
    9,622
    Likes Received:
    9,507
    I guess you see, why the puddles situation is a very difficult one. Yes these discussions were done also internally actually for testing. There are differences between tracks that can really cause discrepancies and it's a process of refinement that takes time.
     
    • Informative Informative x 4
    • Agree Agree x 1

Share This Page