SHO Competition AI

SHO Competition AI V14

Login or Register an account to download this content
Version 14 (2022-06-20..2023-06-11)
  • [Tracks] Re-tuned Imola GP 2004 as it was too difficult to pass.
  • [Tracks] Re-tuned some tracks that had suspicious AIW RaceRatio < 1.0 values (probably due to mis-copy&paste from spreadsheet). Tracks tuned included: Barcelona GP 2003, Oschersleben 2003, Magny-Cours National, Anderstorp South
  • [Game] Aggression is now free for users to change according to preference in-game. This was the PLR AI Realism parameter.
  • [Talent] Reset Talent RCD RaceColdBrainMin back to original values and RaceColdBrainTime to 45 (seconds). This was to alleviate the issue where AI don't act like they have cold tires like you right off the start and just act like they're at 100% performance instantly. This also returns a little bit more personality back to the AI as retaining as much AI personality as possible is an important goal of this mod.
  • [README] Removed instructions to set tuned AI Realism (Aggression) value. No need to have a tuned value here anymore. Users can set their own Aggression according to their own preference.
  • [README] Fixed incorrect Composure value in the manual installation step 2b for Composure. Not a problem if you never used the manual install steps.
  • [MOD] Renamed MODS\SHO Competition AI\Release Notes.txt to Releases.txt
Here's another example of how the AI behave in a 20min race. I even mess up around the 12:25 mark and lose a number of spots so you'll be able to see AI take advantage and then what it takes to pass those guys again.

I feel like I'm narrowing the gap from what the original AI were to what they should be given the limitations in GTR2.

It feels like future changes will be more and more subtle. I know some tracks are difficult to gain positions on and need RaceRatio tweaking and I have other plans but they're all more subtle than the changes up til now.

Version 13 (2022-06-16..2022-06-20)
  • [MOD] V13 combines and finalizes V13-test1 and V13-test2 changes. If you have V13-test2 you don't need V13.
  • [Testing] Further testing to confirm my confidence in the changes on more cars and track and to finalize V13 and prepare to move on to V14
  • [MOD] Corrected accidental copy&paste references to "SHO GTR2 XD Style SimHub Overlays"
  • Like
Reactions: Zemlanin
I've updated the demonstration video in the Overview and README to a V13-test2 20min race. I passed a few more AI than I think is realistic but I think it turned out well overall.

Bonus: It also features the next release of SHO XD Style SimHub Overlays V15

Version 13-test2 (2022-04-15..2022-06-16)
  • [RaceRatio] Finalized a solution that makes V12's RaceRatio tuning and V13-test1's Composure tuning work together nicely.
  • [License] Added Creative Commons Attribution Non-Commercial License. README updated. License details:
  • [MOD] Split out README Plans section to MODS\SHO Competition AI\Plans.txt
After letting V13-test1 sit for some time and space I, of course, realized I had made a dumb mistake.

Namely, I was effectively undoing the huge amount of effort that went into customizing each track's AIW RaceRatio.

The solution was still elegant, though, still a universal value applied to each track's RaceRatio but it *adjusted* rather than replaced each track's V12 custom RaceRatio by a fixed but proportional amount and so retains all the V12 work.

I've run through the 4 main car class tests, each a different car on a different track, and the results are back to the quality of V12, I feel.

I'll upload the release soon.
The next release will be licensed under Creative Commons Attribution-NonCommercial 4.0 International.

View the full license here: http://creativecommons.org/licenses/by-nc/4.0/

This license allows users to distribute, remix, adapt, and build upon the material in any medium or format, for noncommercial purposes only.

It simply requires that users give credit to the creator.

There's no drama that precipitated the license but as mods grow the risk of abuse goes up so I thought I'd figure this out now.

I think this provides clarity to mods (no need to contact the author for legitimate uses!) and is a nice compromise that maintains modding freedom while protecting the people that made them from losing credit to their work and against losing out when someone tries to make money from it.
  • Like
Reactions: Zemlanin
For the record, I recommend V12 to anyone not interested in testing out uncertain things, as is the case with the latest V13-test1 release.

As for status, I'm currently frustrated as some tracks performance were really thrown off by the tweaks I had to make in V13-test1.

Just currently letting it sit and hoping for energy and inspiration to get back at it.
  • Like
Reactions: Zemlanin and Andor
Version 13-test1:

  • [Test Release] This is a test release as testing each track really slows things down. I've modified all tracks but haven't tested them all. Hoping if there are still issues that people will point them out.
  • [Talent RCD Composure] Increased Composure to ensure AI don't lose too much confidence for too long after being passed. This was resulting in AI falling too far behind and not providing a good enough race level pressure from behind for the player. AI Composure was a universal value so it was just a universal change and this helps ensure that AI personality are kept intact.
  • [Location AIW RaceRatio] Re-tuned Location AIW RaceRatio's after discovering that increasing Composure also generally increased AI performance and I could no longer keep up. After testing a few tracks, I think I found a simple, universal change I could make to ease the burden of development: Default RaceRatio +2.5% seems to work well with the new Composure. You can still pass about 5 AI give or take a few but eventually it gets harder and harder to pass AI (as it should be) so the V12 style of tuning seems to be intact.
  • Like
Reactions: Zemlanin
My experiments with Composure were spot on and really improved the experience of AI keeping up the pressure from behind.

But I realize now that, in comparison to default Composure, the AI are now more confident, more of the time, and so on average faster: That means it changed AI performance levels not just confidence, and that means having to retune RaceRatio all over again.

I'm still trying to figure out if there's a single calculation that could be applied to all RaceRatio's (like half the difference of the previous change to slow them down, for example) but haven't quite figured it out yet - if there is anything to figure out. It might require tuning from the ground up again for each track. Bleh. I hope not.
I have always disliked the behaviour of AI to drive faster (more confident) when ahead of you versus drive slower (less confident) when behind you (or, more correctly, once passed). This results in cars behind you falling way too far behind and you can lose that rear pressure that can make real racing so intense.

I finally got around to experimenting with the Talent RCD Composure parameter and it's looking very promising for solving this exact issue.

I wasn't even sure which parameter would work but I guessed it was Composure based on the name and some web searching. After documenting the effects of min/max'ing I was pretty sure it was the right one.

I still have to test with other tracks and cars but my 20min sprint race with Porsches and Ferraris at Valencia National resulted in an intense race from start to finish, qualified 4th, passed 3 within 9 laps, couldn't pass the leader (good actually) but I got up along side him in some corners but he stuck it out and kept ahead, he never got beyond striking distance (<2sec) and often I caught up, but it was actually good to see him drive aggressively and end up winning.

That experience is completely different from a stock experience, even with V12 of this mod, where you would end up with no cars around you very quickly, cars ahead would tend to pull away, and cars behind would tend to fall away. With no one around you it just feels like hot-lapping.

There are other parameters that keep a grid close together but in my mind they're kind of hacks, they kind of force the behaviour by altering performance, rather than dealing with the root cause of this particular issue.

Also, good thing about using this parameter is that its default value is a single value across all Talent RCD files so I can make a universal change, avoiding combination explosion, while retaining the personality of the AI drivers that makes GTR2 unique.

What is Composure

Here's the only real description I could find and it's for rFactor 2 and the value range is different but it was helpful:


"Composure:
The lower the number, the higher the frequency of "intentional" mistakes. (if AI Mistakes is > 0 in the playerfile) If AI Mistakes in the playerfile is set to 0.0, then the AI drivers never make mistakes. *cough* Well, mistakes that the programmer planned. "intentional" mistakes are things like, taking a turn too wide, or missing a breaking point.
Increasing composure also decreases the time between bad driving zones.
(also affected by the playerfile variable AI Limiter, see MinRacingSkill below)"


The GTR2 range appears to be 0.0 to 1.0 with lower values increasing the chance of mistakes. Mistakes do seem to be things like break points and going wide.

When an AI gets passed by the Player the AI, in my observation, "loses confidence" for a while (ie. drives slow or error prone for a few laps/sectors) - I think this is what I observe as AI falling way too far behind when you pass them.

Ignore strikethroughs which GTR2 doesn't have.

The MinRacingSkill comment looks interesting. That might come in handy in the future.
I uploaded a video and added it to the description to illustrate AI behaviour with the mod. There's only so much persuasion in text :)

  • Like
Reactions: Zemlanin
Version 12:
  • All tracks and their variations have now been tuned for more accurate race performance from AI relative to their Qualifying laptimes. It will be MUCH more difficult to keep up and to overtake in order to be more realistic. There is a "fun factor" balance in this tuning. I wasn't 100% realistic, it's still nice to pass a few but it was designed so that you'll eventually hit a wall in passing where AI are just too fast for you, as it is in real-life unless you qualified first.
  • Continued tuning Location AIW "RaceRatio" to improve AI performance so that their Race performance is more closely related to their Qualifying performance. Previously, AI who qualified better than you acted much worse in a race, resulting in passing too many and not providing good hard battles.
    • All tracks are now tuned including all variations
      • Tracks tuned:
        • Spa GP 2004
        • Valencia National
        • Valencia Long
    • Again, the key change that you will notice on track is that it is MUCH more difficult to pass. Remember to just maintain position for the first lap (to avoid abusing slow starting AI) and then push on Lap 2. If there's a gap, take it, don't be "nice" to them but don't abuse poor AI logic, either. Don't ram them, don't make risky passes you wouldn't make on a human, etc. Read Section 3 "How To Play Against AI" for more details about how to have a good, immersive race using this mod.
  • Plenty more ideas of what to do next (See Section 9 Plans) so this isn't the end probably not by far
  • Like
Reactions: Studz and gturismo
Version 11:
  • Continued tuning Location AIW "RaceRatio" to improve AI performance so that their Race performance is more closely related to their Qualifying performance. Previously, AI who qualified better than you acted much worse in a race, resulting in passing too many and not providing good hard battles.
    • All locations are represented but not all track variations such as some track years, or National, Short, etc. variations. I'm now working my way through those.
    • Tracks tuned:
      • Monza GP 2003
      • Monza Junior
      • Oschersleben GP 2004
      • Oschersleben B Course
    • Again, the key change that you will notice on track is that it is MUCH more difficult to pass. Remember to just maintain position for the first lap (to avoid abusing slow starting AI) and then push on Lap 2. If there's a gap, take it, don't be "nice" to them but don't abuse poor AI logic, either. Don't ram them, don't make risky passes you wouldn't make on a human, etc. Read Section 3 "How To Play Against AI" for more details about how to have a good, immersive race using this mod.
Version 10:

  • Continued tuning Location AIW "RaceRatio" to improve AI performance so that their Race performance is more closely related to their Qualifying performance. Previously, AI who qualified better than you acted much worse in a race, resulting in passing too many and not providing good hard battles.
    • All locations are represented but not all track variations such as some track years, or National, Short, etc. variations. I'm now working my way through those.
    • Tracks tuned:
      • Dubai Club
      • Dubai International
      • Dubai National
      • Magny-Cours GP 2003
      • Magny-Cours National
    • Again, the key change that you will notice on track is that it is MUCH more difficult to pass. Remember to just maintain position for the first lap (to avoid abusing slow starting AI) and then push on Lap 2. If there's a gap, take it, don't be "nice" to them but don't abuse poor AI logic, either. Don't ram them, don't make risky passes you wouldn't make on a human, etc. Read Section 3 "How To Play Against AI" for more details about how to have a good, immersive race using this mod.
Version 9:

  • Continued tuning Location AIW "RaceRatio" to improve AI performance so that their Race performance is more closely related to their Qualifying performance. Previously, AI who qualified better than you acted much worse in a race, resulting in passing too many and not providing good hard battles.
    • All locations are represented but not all track variations such as some track years, or National, Short, etc. variations. I'm now working my way through those.
    • Tracks tuned:
      • Anderstorp South
      • Barcelona National
      • Brno GP 2003
      • Donington GP 2004
      • Donington National
    • Again, the key change that you will notice on track is that it is MUCH more difficult to pass. Remember to just maintain position for the first lap (to avoid abusing slow starting AI) and then push on Lap 2. If there's a gap, take it, don't be "nice" to them but don't abuse poor AI logic, either. Don't ram them, don't make risky passes you wouldn't make on a human, etc. Read Section 3 "How To Play Against AI" for more details about how to have a good, immersive race using this mod.
  • Like
Reactions: gturismo
  • Continued tuning Location AIW "RaceRatio" to improve AI performance so that their Race performance is more closely related to their Qualifying performance. Previously, AI who qualified better than you acted much worse in a race, resulting in passing too many and not providing good hard battles.
    • All locations are now represented but I still need to tune all track variations. For example, I might have tuned the 2003 version but not the 2004 version, or vice versa, and I have so far skipped non-GP tracks (eg. National, Short, etc. variations). I plan to tune all of these eventually.
    • Tracks tuned:
      • Dubai GP 2004
      • Spa GP 2003
      • Enna GP 2003
      • Oschersleben GP 2003
      • Estoril GP 2003
      • Monza GP 2004
      • Imola GP 2004
      • Magny-Cours GP 2004
    • Again, the key change that you will notice on track is that it is MUCH more difficult to pass. Remember to just maintain position for the first lap (to avoid abusing slow starting AI) and then push on Lap 2. If there's a gap, take it, don't be "nice" to them but don't abuse poor AI logic, either. Don't ram them, don't make risky passes you wouldn't make on a human, etc. Read Section 3 "How To Play Against AI" for more details about how to have a good, immersive race using this mod.
In the past few releases, if you've looked under \MODS\SHO Competition AI\ you would've found a spreadsheet, "SHO Competition AI Tuning.xlsx".

This is the spreadsheet where I've been putting my tuning for UserData PLR, Talent RCD, Location AIW, Car HDC, and presumably other file parameters in the future.

This is how I go about tuning, usually starting from default values, and I'll increase and decrease the value using a bisection search, which, put over-simply, attempts to hone in a optimal value by increasing or decreasing by half the previous searched amount. For example, 0, 100, 50, 25, 38, 31 is an example of a bisection search between 0 and 100. At each step, you make a decision about whether you want to go up or down and then you add or subtract half the previous step's add/subtract value.

You can use this spreadsheet and make your own in Excel or Google Sheets to do your own bisection search if you happen to want to have a systematic way to find the best value.

I hope this is an informative view into how I approach tuning parameters.

Here's a screenshot of tuning Location AIWs:

1638417764830.png


Notice the Notes column, and the use of + and > and < notation to indicate what I preferred (+/-) and whether the number should increase or decrease (>/<).
  • Continued tuning Location AIW "RaceRatio" to improve AI performance so that their Race performance is more closely related to their Qualifying performance. Previously, AI who qualified better than you acted much worse in a race, resulting in passing too many and not providing good hard battles.
    • Tracks tuned:
      • Barcelona GP 2003
      • Zuhai GP 2004
      • Brno GP 2003
    • Again, the key change that you will notice on track is that it is MUCH more difficult to pass. Remember to just maintain position for the first lap (to avoid abusing slow starting AI) and then push on Lap 2. If there's a gap, take it, don't be "nice" to them but don't abuse poor AI logic, either. Don't ram them, don't make risky passes you wouldn't make on a human, etc. Read Section 3 "How To Play Against AI" for more details about how to have a good, immersive race using this mod.
  • Investigated UserData PLR AIMaxLoad but no changes yet. Still, discovered a possible avenue for future AI tuning regarding "chance to attempt passing" behaviour.
- Tuned Location AIW "RaceRatio" to improve AI performance so that their Race performance is more closely related to their Qualifying performance. Previously, AI who qualified better than you acted much worse in a race, resulting in passing too many and not providing good hard battles.

- Tracks tuned:

- Anderstorp GP 2003

- Valencia GP 2004

- Donington GP 2003

- This change only affects 3 tracks for now. I plan to do all the original content tracks but it will take a few versions as testing is rather intensive and I haven't yet found a universal change that could be applied to all tracks at once. So, it's a track-by-track process right now.

- The key change that you will notice on track is that it is MUCH more difficult to pass. Remember to just maintain position for the first lap (to avoid abusing slow starting AI) and then push on Lap 2. If there's a gap, take it, don't be "nice" to them but don't abuse poor AI logic, either. Don't ram them, don't make risky passes you wouldn't make on a human, etc. You should have a good, immersive race if you follow those guidelines.
  • Like
Reactions: Speednut357

Latest News

Online or Offline racing?

  • 100% online racing

    Votes: 76 7.2%
  • 75% online 25% offline

    Votes: 112 10.7%
  • 50% online 50% offline

    Votes: 151 14.4%
  • 25% online 75% offline

    Votes: 288 27.5%
  • 100% offline racing

    Votes: 418 39.8%
  • Something else, explain in comment

    Votes: 4 0.4%
Back
Top