Ram-happy AI

Discussion in 'Technical Archives' started by Guineapiggy, Jan 11, 2012.

  1. DriverN1

    DriverN1 Registered

    Joined:
    Oct 11, 2010
    Messages:
    62
    Likes Received:
    0
    Lightanglel
    Keep calm :) your avatar is so lovely... this picture takes me to my dreams
     
  2. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    Well this is gonna be harder than previously thought, had two races with AI at 100% Aggresion & Strength and not one "Ramming" incident to report! I have found a few things out in just those two races and only one new "bad" thing about the AI, I'll get videos posted up when I can in a new thread.
     
  3. MikeZ

    MikeZ Registered

    Joined:
    Oct 11, 2010
    Messages:
    94
    Likes Received:
    1
    hey guys I'm the AI programmer. Thanks for the work and videos... it's helped me uncover a couple bugs. The next update will bring fixes.

    Let me tell you a little bit about the bug, so you know what you're looking at. At it's simplest, each AI is trying to follow a path ...a path that often sweeps from one side of the track to the other. They are also trying to avoid any cars on this path....they prioritize the cars around them, and then make adjustments to their chosen path to avoid these cars. BUT their rate of change off their line inside or outside can not be too abrupt...that rate is limited by current grip levels. So in some cases, when the human player is driving a path that is radically different than the one the AI is following (say...if the player is driving straight down the middle through a corner, while the AI sweeps wide out and then all the way back in) the AI knows the player is there, but is unable to move off HIS line fast enough to avoid the player. (that's why it looks like he swerves right into you)

    The other main problem I see is brought about by the AI's strong desire to keep on the road...so much so that if human and AI enter a corner side-by-side (AI on the inside) the AI might see his drive-able surface quickly disappearing and swerve into the player's car so as to not be forced off road. (this calculation is oversensitive....which might not make sense until you look at a track like Monaco, where I'd much rather the cars error a couple of inches on track than a couple of inches through a barrier)

    I've just made adjustments to both these routines, so I expect you'll see improvements in the next update.
     
  4. DriverN1

    DriverN1 Registered

    Joined:
    Oct 11, 2010
    Messages:
    62
    Likes Received:
    0
    to MarcG
    I suppose this thread is about problems with ramming, hitting and similar problems which have rf2 players with racing against AI. If you have not this type of problem then, ok, enjoy racing against AI or create other thread for your type of problems. But please don't annoy people who has real problems with collisions AI
     
  5. DriverN1

    DriverN1 Registered

    Joined:
    Oct 11, 2010
    Messages:
    62
    Likes Received:
    0
    Thanks very much for your answer!
     
  6. Guineapiggy

    Guineapiggy Registered

    Joined:
    Apr 22, 2011
    Messages:
    535
    Likes Received:
    0
    It seems the issue is, as much as anything else, that the AI are incapable of taking more dramatic avoiding action - they seem to be the kind that are ever looking for a way to move forward at the same time as avoiding carnage. Indeed, major avoiding action seems to be totally missing from their vocabulary as evidenced by the fact they attempt to drive through a stricken car as if there were no other way. I have no idea how you'd code something as complex as that, of course, I just hope you can come up with something.
     
  7. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    Thanks Mike much appreciated, honestly thought AI would be brushed aside until the main clitches of the Beta got fixed but happy to know you're on the case. In the racing I've done this evening I've seen more cases of the AI being scared of the Grass and thus knocking me into a Spin, but overall I've had so much fun this evening with them and half the time think they're Human!

    I have a ton of questions related to AI in general so if you wanna hear them and have time to respond just shout, if not dont worry I know you guys must be very busy. (I'll start a new thread so as not to disrupt the locals too much...!)

    yes and I have (see above) now come across more of these cases as I have been driving this evening, my last post was a mere update so keep your pants on dear and together we'll help MikeZ make RF2 AI the best it can possibly be ;)

    Thats the problem with me, I've got all these fanatical ideas in my head about what the AI should or should not be doing but I have no idea about coding/programming! One example is I'd like the AI to fully move over under Blue Flags and signal they are doing sow with a quick flash of their headlights, probably insanely difficult to code or not that hard for all I know :p
     
  8. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    *double post*
     
  9. CdnRacer

    CdnRacer Banned

    Joined:
    Feb 4, 2011
    Messages:
    1,894
    Likes Received:
    31
    Is it my imagination or is the AI more ram happy in the megane than they are in the 60s series?
     
  10. Guy Moulton

    Guy Moulton Registered

    Joined:
    Jan 12, 2012
    Messages:
    2,310
    Likes Received:
    16
    The AI isn't very raceable yet, but on a good note- I like how the different AI will driver different lines. I was behind one AI driving good textbook lines and then I passed him and I got behind another who was driving a more defensive line. This was at Mills Inner C. Then one of them caught me up and rammed me off :mad: and it seems all my AI races end that way.
     
  11. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234

    What cars/track combo and settings are you using for the AI? I've mainly raced against them in the meganes at Malaysia north loop and had some quality races, quite often forgetting they are AI! 100 strength with varying aggression.
    They do seem a bit different in the open Wheelers although I've not done a lot of racing with them yet.
     
  12. LightAngel

    LightAngel Registered

    Joined:
    Jan 15, 2012
    Messages:
    9
    Likes Received:
    0
    confirm. I've tested a plenty of races against AI today. Unfortunately I must say it's undriveable :mad: If I drive faster than AI then I have no problems but keep in mind I tested defense: I tried to drive a little slower than AI in order to watch how AI could behave. It's awful. I must always think about AI, always keep main racing line, always give AI a lot of space but even all these things don't help to have completely full race without AI foolishness .. I try to play gtr2 and even very old f1c and it's much better. I can keep defense in these games and AI very rarely ram or hit into me..
    another video with crazy AI
    http://youtu.be/5fW76FazvrU
     
  13. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    Read what MikeZ says above, that particular incident should be fixed in the next Beta Build. Also try racing with them at your race pace, I get very little incidents when I have them just right for me and have more when I make them too fast as well.
     
  14. TonyRickard

    TonyRickard Registered

    Joined:
    Jun 5, 2011
    Messages:
    184
    Likes Received:
    38
    It must vary between cars and maybe tracks, the F2s at Spa are very raceable. Best fun I have ever had racing AI in fact, so there appears great potential. Well done Mike!
     
  15. LightAngel

    LightAngel Registered

    Joined:
    Jan 15, 2012
    Messages:
    9
    Likes Received:
    0
    if I can not keep defense I'm not interested in "Single player" mode.. I think about racing with different classes of vehicles. For example F1: I have Sauber and I'm ahead Ferrari, of course Ferrari is faster, so I'll not be able to keep defense a long time and soon my car will get kick from AI. Thus this AI behaviour dissatisfies me at all.
     
  16. salvasirignano

    salvasirignano Registered

    Joined:
    Jan 3, 2012
    Messages:
    22
    Likes Received:
    8
    Hello Mike :)
    First let me say that the AI is much improved over RF1, so well done, but as you acknowledge there is still some way to go.

    I was wondering if you've ever played GP4? :)
    It has probably the best AI of any race sim ever released, and is getting on for ten years old now. I have uploaded a few videos of their behaviour, which hopefully you'll have a look at, there are some very realistic behaviours that i think really must be implemented if the AI in rF2 is to be realistic.

    In the first video, you'll see that the AI properly uses the slipstream of the car in front, without lifting off the gas at all (unlike in every other race sim since!) Although perhaps they could stay in the tow maybe a fraction longer and only pull out when a metre or so behind the preceding car?




    The next one shows very very well implemented AI blocking, Panis trying to overtake Irvine but doesn't quite have the power, so he gets back in the slipstream, pulls out again, but Irvine blocks him off.



    The third one shows a pass where Morbidelli easily breezes past Magnussen, then gets back onto the racing line to take the next corner.



    I think I've played every racing sim released since the mid nineties, yet barely any have managed convincing, challenging AI.
    That must mean it's a difficult task to pull off, but there's no point in having a race if faster AI behind you won't overtake, or if they lift off on the straights or fail to slipstream properly.

    If you could get the AI to overtake like above, as well as block and defend, then rF2 will surely be the most immersive offline sim ever created.

    Thanks for reading this.


     
  17. BYF

    BYF Registered

    Joined:
    Jan 14, 2012
    Messages:
    34
    Likes Received:
    0
    GP4 still has the best AI in any sim I've played to this day, the only game where I've had memorable battles with the AI, I remember an epic one at Montreal with Barrichello where we kept passing and repassing each other for lap after lap. It's not perfect but nothing else has come close to it since its release.
     
  18. LightAngel

    LightAngel Registered

    Joined:
    Jan 15, 2012
    Messages:
    9
    Likes Received:
    0
    good videos but I think it is useless, because gp4 has absolutely different engine from gmotor. It needs a huge reworking of AI engine in rfactor in order to make all these things which your videos show. Nobody can do it

    Personally I beg only about one - creating AI what will not ram my car. I will be very happy only from this one thing :p
     
    Last edited by a moderator: Jan 20, 2012
  19. F2kSel

    F2kSel Registered

    Joined:
    May 28, 2011
    Messages:
    139
    Likes Received:
    4
    One thing that still seems like a left over from rF1 is that when you pass the car you've chased down lap after lap as soon as you pass him he seems to fall back a 100 meters or so very quickly.

    I think it's one reason I haven't had any good battles yet.
     
  20. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    yeah I've noticed this too, although one small mistake on my part and he's right there behind and threatening which in rF1 was rare. Its the Slipstreaming area of the AI that needs to be sorted, get that just right and it'll help with battles along the way.
     

Share This Page