AI Improvement Plugin by JR

Plugins AI Improvement Plugin by JR 1.2

Login or Register an account to download this content
MJQT submitted a new resource:

AI Improvement Plugin by JR - AI improvement plugin for rF1 providing better blue flags, fuel strategy, HUD widgets

README COPIED FROM RFACTORCENTRAL

- YOU NEED RFACTOR 1.255g

- PLAY RFACTOR IN WINDOWED MODE

- adds a cool performance HUD-widget (click View->Performance)

- adds other HUD-widgets (click View->...)

- adds blue flag behaviour to AI

- adds a fuel strategy to each AI

- should drastically improve the AIs collision detection (car vs car) and overtaking. AI performance still depends on the...

Read more about this resource...
 
You think this could be translated to GTR2?

Does it solve the issue of the AI letting you/others, get away?
My AI keeps giving some distance when he fears passing you/others instead of keep pushing, get drafted and maybe take a chance to make a pass.
Is like.. why are they letting off the trottle?
I try a lot, but I think is hardcoded. So this solves that?
 
Last edited:
You think this could be translated to GTR2 somehow?
I simply don't have the expertise to say, honestly. Regardless, I have made sure to share this with people like Iron Wolf, and they may or may not choose to devote their effort to digging through this plugin and trying to implement similar fixes for GTR2. If that's even possible. Given both games are ISI-based, though, I have no reason to think it's entirely impossible. But it's up to them and where they want to devote their effort!
 
Last edited:
MJQT submitted a new resource:

AI Improvement Plugin by JR - AI improvement plugin for rF1 providing better blue flags, fuel strategy, HUD widgets



Read more about this resource...

Thanks for sharing! But could you pls. shed some further light on the exact use of the "race.ini" file?

My experience so far:
I think I got the plugin working somehow as I can see the performance widget like shown in your screenshot - all the other widgets are blank though. I also found the "race.ini" file (on my PC the location is "C:\ProgramData\rFactor_JR\" and additional folders following this structure "player name\Performance\RFM name\class name\track name\teamname.perf".
Unfortunately the most desired (at least by me) part, the blue flag behaviour, does not seem to work. Testing with the "BES 2012 SP1.2" mod at the original RF track "Brianza GP" (Monza) - the leading AI cars are not able to lap the backmarkers and just keep being stuck behind them.
Even putting in some really high values like "PenaltyMassBlueflagKg=950" had absolutely no effect. Flag rules on/off - no effect. Aggression high/low - no effect.
So I assume the plugin IS working but I must be doing something fundamentally wrong...

Any help would be highly appreciated.
Thanks W.
 
Happy to try to help troubleshoot and hopefully learn more about the plugin in the process! :) FYI I am no expert about the plugin and have no documentation other than the RFCentral readme I copied on the "Overview" page. So this is a learning opportunity for me too.

I think I got the plugin working somehow as I can see the performance widget like shown in your screenshot - all the other widgets are blank though. I also found the "race.ini" file (on my PC the location is "C:\ProgramData\rFactor_JR\" and additional folders following this structure "player name\Performance\RFM name\class name\track name\teamname.perf".
It's a good sign that the widget shows up! Means the plugin must be active (at least to some extent). I think most of the widgets are broken at this point – and given the existence of tools like SimHub nowadays, it's no great loss IMO. Although it does make me worry that other functionality in the plugin "under the hood" might be broken as well...

Unfortunately the most desired (at least by me) part, the blue flag behaviour, does not seem to work. Testing with the "BES 2012 SP1.2" mod at the original RF track "Brianza GP" (Monza) - the leading AI cars are not able to lap the backmarkers and just keep being stuck behind them.
Even putting in some really high values like "PenaltyMassBlueflagKg=950" had absolutely no effect. Flag rules on/off - no effect. Aggression high/low - no effect.
So I assume the plugin IS working but I must be doing something fundamentally wrong...
That's a real shame! Sorry to hear that it's not working as expected.

SOME THOUGHTS

You're using the 2012 Blancpain Series mod, which is just GT3 cars, right? Not multiclass? This might be important. So far, I have not tested the plugin in races long enough to see whether it helps leading cars pass backmarker cars of the same class (which are therefore roughly the same speed in a straight line). I have, however, tested the plugin in multiclass racing – for example, ALMS 2007 cars at VLM Sebring using the Enduracers Endurance Series mod – and the plugin clearly helps the prototypes pass GTs in a way that is rather human-like and so much better than the default behaviour in rFactor. To see these improvements, by the way, I did not have to change anything AI plugin-related from default settings.

The original multiclass issue in rF1 and GTR2, where faster classes would slow down and "get stuck" behind slower class cars in a straight line, was sometimes referred to as the "blue flag bug". So maybe the "PenaltyMassBlueflagKg" parameter is involved with fixing this specific bug. Whereas what you are hoping to see is somewhat different (e.g. backmarker cars of the same class might stay to one side and get out of the leader's way, like F1 blue flags) and maybe the plugin does not help with that?

Another possibility is that maybe the kind of "blue flag" behaviour you are hoping for was implemented by the plugin, but is broken, just like many of the widgets. Or, at a minimum, whatever functionality is controlled by the "PenaltyMassBlueflagKg" parameter is broken. This would be sad, if true.

Also, in my testing, I did notice that when the plugin was active, sometimes weird behaviour would occur with two cars in the same class on the same lap trying to race each other. One car would consistently pull out to try to overtake at a sweeping corner (e.g. Sebring Turn 1), get side-by-side, then "get scared" for seemingly little reason and drop back in behind... even though they appeared faster than the car ahead. Have not done enough testing to confirm if this "inability to pass" bug is consistently produced by the plugin. If it is a big issue with the plugin, it could explain your difficulties.

Let me know your thoughts, and if you see anything further in your testing! :)
 
Last edited:
Many thanks for your reply!

Indeed the 'stuck behind backmarker while trying to lap' problem only occurs with single class mods. With the aforementionend example BES 2012 SP1.2 mod at Brianza GP I find the front runners not being able to pass on the very long straight. You'd think that with e.g. "PenaltyMassBlueflagKg=950" a car should be slowed down significantly to let the frontrunner go by easily - so I really think something doesn't work here... Maybe you could try to replicate that and tell me if it's any better in your case.

Or maybe I simply expected too much from this plugin...

On the other hand no problem here with multi class mods - LMP1 cars easily passing LMP2 and GT cars. But this has never really been an issue beforehand and I'm not really sure whether this has improved with the plugin. Is there anything special in the AI behaviour I should monitor in order to be able to judge whether it does something here or not?

Another thought apart from this plugin: quite often the AI tend to initiate their overtaking manoeuvres rather late in the braking zone while they could have gone by easily on the straight. There is an entry in the tracks' .aiw file "AIDraftStickiness=(4.0)" which is said to determine that behaviour. Changing that value to 0.1 or even -1.0 didn't seem to have any effect, though. Maybe you'd like to test this as well.

Cheers W.
 
Many thanks for your reply!
My pleasure! Glad to have a conversation going about the plugin @Weber44 :)

Currently away from my gaming computer for a few days, but will test these things when I get back to it. If I don't post again in this thread by the end of the week, be sure to remind me :p

Indeed the 'stuck behind backmarker while trying to lap' problem only occurs with single class mods. With the aforementionend example BES 2012 SP1.2 mod at Brianza GP I find the front runners not being able to pass on the very long straight. You'd think that with e.g. "PenaltyMassBlueflagKg=950" a car should be slowed down significantly to let the frontrunner go by easily - so I really think something doesn't work here... Maybe you could try to replicate that and tell me if it's any better in your case.
So sounds like the Blue Flag penalties are not working. That's a shame.

By the way... I've been told the "stuck behind on a straight" bug was nearly eliminated in Automobilista 1 versions prior to 1.50 – but was then re-introduced later (including in the final version of AMS1). Have not verified this myself. But, if you have the hard drive space for an additional AMS install, might be worth trying. Especially since I believe AMS1 also has built-in blue flag 'slowdowns' for lapped cars (though I'm not sure which version those were first shipped).

On the other hand no problem here with multi class mods - LMP1 cars easily passing LMP2 and GT cars. But this has never really been an issue beforehand and I'm not really sure whether this has improved with the plugin. Is there anything special in the AI behaviour I should monitor in order to be able to judge whether it does something here or not?
What I've done in the past (in rFactor, GTR2, AMS... even RaceRoom and rFactor 2) is set up a multiclass race with the AI, drive the first couple corners then quit, switch view to ride with a top class car, accelerate time until they catch traffic, then watch them try to navigate it.

From what I remember, with the plugin enabled in rF1, they should usually make rather human-like decisions and be able to pull out and drive by slow-class cars – even on a long straight (e.g. the back straight at Sebring). Whereas in my experience, without the plugin, they would get "stuck behind". With the plugin, they still do hesitate sometimes, and the decision-making isn't perfect... but it seemed much improved to me compared to the vanilla AI.

Another thought apart from this plugin: quite often the AI tend to initiate their overtaking manoeuvres rather late in the braking zone while they could have gone by easily on the straight. There is an entry in the tracks' .aiw file "AIDraftStickiness=(4.0)" which is said to determine that behaviour. Changing that value to 0.1 or even -1.0 didn't seem to have any effect, though. Maybe you'd like to test this as well.
So... this is a can of worms you're opening :laugh: AIW settings tweaking is an art unto itself, and many of us who play ISImotor-based sims like GTR2, RACE 07, rFactor, and AMS have been trying to figure it out recently :)

In my experience, lower values (e.g. 0.96) mean that AI pull out of the draft sooner. It'd be interesting to know if the plugin means this setting doesn't do anything. Given how the plugin seems to directly improve the pathfinding and collision detection in rFactor, this wouldn't be surprising to me.

HOWEVER... one last thing. I gotta bring up a bug that plagues most of sim racing.

The weird thing with ISImotor AI is: they do not know how to slipstream, and more or less cannot pass in a straight line. This is a bug in any ISImotor-based title – GTR2, RACE 07, rFactor, or AMS. A lower AIDraftStickiness parameter means AI pull out of the draft sooner BUT they let off the throttle and fall back into line because they don't know how to drive by another car in a straight line. (There are hit-and-miss ways to trick them into driving past you if you pull way over to the side or slow down a ton, but that's it) The ISI AI code seems to only allow overtaking by outbraking into a corner.

So it means the AIDraftStickiness parameter tweaks don't help much. I've silently been hoping the AI plugin would help force cars to drive by when they "have a run" on a straight, but sounds like that's not the case.

It gets weirder, though. The inability to slipstream persists into rF2, actually. Despite the other improvements ISI made to the game engine. And in Assetto Corsa... its AI can be even worse than in ISImotor in terms of "getting stuck in a straight line". Check out this video from Mike at SimRacing604, for example. Slow on the racing line, and the AI will slow with you :roflmao: So strange this bug has persisted for so long, even across game engines.
 
Last edited:
HOWEVER... one last thing. I gotta bring up a bug that plagues most of sim racing.

The weird thing with ISImotor AI is: they do not know how to slipstream, and more or less cannot pass in a straight line. This is a bug in any ISImotor-based title – GTR2, RACE 07, rFactor, or AMS. A lower AIDraftStickiness parameter means AI pull out of the draft sooner BUT they let off the throttle and fall back into line because they don't know how to drive by another car in a straight line. (There are hit-and-miss ways to trick them into driving past you if you pull way over to the side or slow down a ton, but that's it) The ISI AI code seems to only allow overtaking by outbraking into a corner.

So it means the AIDraftStickiness parameter tweaks don't help much. I've silently been hoping the AI plugin would help force cars to drive by when they "have a run" on a straight, but sounds like that's not the case.

It gets weirder, though. The inability to slipstream persists into rF2, actually. Despite the other improvements ISI made to the game engine. And in Assetto Corsa... its AI can be even worse than in ISImotor in terms of "getting stuck in a straight line". Check out this video from Mike at SimRacing604, for example. Slow on the racing line, and the AI will slow with you :roflmao: So strange this bug has persisted for so long, even across game engines.

Interesting, didn't know this was such a general issue...

Will continue testing, still haven't given up on getting this to work. Btw. my Java install is v. 1.8.0_271-b09 32 bit so that should be ok.

Maybe some other users will join in and share their knowledge/experience as well.
 
One further result from my testing is that improved multiclass behaviour seems to not be universal. Since it was Le Mans week, I tried out this track with this improved AI file with the Enduracers Endurance Series mod, and was shocked how faster classes were continually stuck behind slower classes while the plugin was active. Even on the Mulsanne Straight sometimes. So that was a big surprise, to say the least. :(
 
Last edited:
One further result from my testing is that improved multiclass behaviour seems to not be universal. Since it was Le Mans week, I tried out this track with this improved AI file with the Enduracers Endurance Series mod, and was shocked how faster classes were continually stuck behind slower classes while the plugin was active. Even on the Mulsanne Straight sometimes. So that was a big surprise, to say the least. :(
That's really funny. I had the same idea, same track/aiw but different mod (WEC15-16). The AI did quite well. Very rarely they stayed behind the slower cars on the straight but then at least passed under breaking. Plugin was active but can't tell whether the AI behaviour would've been worse without it...
 
That's really funny. I had the same idea, same track/aiw but different mod (WEC15-16). The AI did quite well. Very rarely they stayed behind the slower cars on the straight but then at least passed under breaking.
:roflmao::roflmao: Hmm. So maybe the improvements from the plugin are mod dependent? Interesting.

Plugin was active but can't tell whether the AI behaviour would've been worse without it...
I mean, if you have some time, I'd love it if you temporarily removed the plugin from your rFactor install and try the same cars/track combo. If the AI behaviour is the same, we might think the plugin is not doing much. Whereas if the AI behaves noticeably worse, then it's helping!
 
Firstly hello.
I have done a lot of testing with the AI in Race 07 , and I read your discussion with great interest.
I notice something about your comments on AIDraftStickiness. I understand that the AI has no programming to follow each other, and the field AIDraftStickiness is a cheap and nasty method to get them to appear to all follow in a line. They will tend to stick to the racing line more if you raise the value. Low values place some variability in the line and make them appear to go off the line more often. This is the cause of the old weaving car problem in GTLegends. I also notice that the faster cars have these problems much less.
So I guess I'm trying to say that just because an AI appears to be pulling out to pass, he may, in fact, just be weaving offline.
 
I mean, if you have some time, I'd love it if you temporarily removed the plugin from your rFactor install and try the same cars/track combo. If the AI behaviour is the same, we might think the plugin is not doing much. Whereas if the AI behaves noticeably worse, then it's helping!

OK, I did just that and I'm really under the impression it was no different w/o the plugin. LMP1 doing quite okay with overtaking slower cars, but sometimes still get stuck behind them just as they do with the plugin activated. So still I don't know whether it's working at all or just not that effective...
 
OK, I did just that and I'm really under the impression it was no different w/o the plugin. LMP1 doing quite okay with overtaking slower cars, but sometimes still get stuck behind them just as they do with the plugin activated. So still I don't know whether it's working at all or just not that effective...
Thanks for trying that out! Interesting. Currently away from my gaming PC, but when I get back, I'll try the car+track combos that made me think the plugin was making a difference in multiclass both with and without the plugin.

FYI the one where I remember being most impressed was Enduracers Endurance (ALMS 2007 cars specifically) at VLM Sebring – because unlike the usual rFactor behaivour, the AI LMPs could overtake GTs without hesitation in a straight line (e.g. on the straight before Sunset corner).
 
How did you manage the get the plugin to work?

I unzipped the files to my root folder and unblocked the .DLL file, but I get a CTD shortly after I boot rF (in windowed). The CTD is just before the intro movie loads prior to the UI

Any suggestions on what I'm doing wrong? Running rF on windows 10
 
How did you manage the get the plugin to work?

I unzipped the files to my root folder and unblocked the .DLL file, but I get a CTD shortly after I boot rF (in windowed). The CTD is just before the intro movie loads prior to the UI

Any suggestions on what I'm doing wrong? Running rF on windows 10
First, make sure your issue isn't caused by Java Runtime Environments. To get it working, you have to make sure a few different things are true. I wrote this up in the mod description as well. I've copied and reformatted that below.

Install a recent 32-bit Java Runtime Environment (i.e. any Version 8 such as jre-8u321-windows-i586) if it is not on your PC already. A 64-bit JRE is not recognized by the plugin: you need a 32-bit JRE.

Place the rFJRPlugin folder and rFJRPlugin.dll in your Plugins folder.

Be sure to uninstall any Java Runtime Environment version 6 you might have installed on your system (e.g. to run GID or dynHUD with rF1) otherwise your game will crash on launch once the JR plugin is installed.


Hopefully, one of these three conditions failing is what's causing your problem. If it still causes a CTD, though, let me know, and we can keep troubleshooting. :)

NOTE: I also feel obligated to mention that I'm unconvinced that the plugin is still, in 2022, having the desired effect on AI behaviour. I do think I perceive differences in some situations, but I can't rule out a placebo effect.
 
Thanks for the reply. You're right, it was a conflict with Java RE version 6. It seems to be working now.
Yay, glad to hear it! :)

I'm most interested in the changes to AI fuel strategy
If you're willing to experiment a bit and try to test to see if AI fuel strategy is working, that would be great. Genuinely unsure how you could do this, though! :rolleyes: One thing that could help you to get at least some info about AI is Nibo's Log Analyzer – intended for rF2, but also works with rF1 and AMS1. Can't remember if it stores data on how much fuel AI are carrying... it might.

If you do some experimentation and notice anything interesting, please do report back here! In fact, regardless, I'd be interested in hearing about your AI racing experience with the plugin.
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top