AI Aggression

Discussion in 'General Discussion' started by Rhino_WJB, Feb 24, 2016.

  1. fufsgfen

    fufsgfen Active Member

    Joined:
    Jan 9, 2019
    Ratings:
    +29 / 0 / -0
    It was what made first Battlefield game fun, max out number of AI bots, then as CPU was not enough they just were twitching on place and did not shoot back or if they did, they did not hit anything and finally I had chance to win 2 out of 10 battles :)

    Monza with maximum number of opponents:
    upload_2019-1-27_11-35-10.png
    upload_2019-1-27_11-36-19.png
    I had no wheel plugged in, so did not test driving, it might not hold 60fps at first corner, seeing that was maxing out already, despite it was holding steady 60fps as AI cars started.

    Looks like this game uses 8 threads at maximum (It can be that only 7, one can be more of OS related or maybe UI as load happens when I quit the game), majority of work is done in 6 threads and one is which maxes out, as it runs so high even when paused, I would make random guess that it is indeed graphics related which maxes out, but to actually know it would need more testing.
    On top row 2nd thread from left, that gets higher as start lights go green, AI/sound related?

    With DX9, afaik you don't thread graphics much, mixed class should also be then much worse if that is graphics that maxes out.

    If graphics is what maxes out CPU core, then AI is not so likely to glitch out.

    Only way modern CPU can keep modern GPU fed is when batching makes job easier, CPU power has not progressed that much in 4+ years and DX9 is not helping.

    Still I'm not sure if it is possible to get AI glitch out with current CPU power, might need somewhat weaker CPU for that and reduced graphics.
     
  2. DaniloE31

    DaniloE31 Well-Known Member

    Joined:
    Dec 14, 2015
    Ratings:
    +73 / 0 / -0
    It's not just a theory.
    @Alex Hodgkinson himself stated somewhere, that once the AI cars exceed a given amount (which I unfortunately don't remember, something like 40 (?) comes to my mind) the Game starts to use some simplified algorithm to not overload the CPU.
     
    • Informative Informative x 1
  3. DaniloE31

    DaniloE31 Well-Known Member

    Joined:
    Dec 14, 2015
    Ratings:
    +73 / 0 / -0
    BTW, if you really think I was the one who caused the accident, then I am glad there is no Ban Feature in the online Lobbies... ;)
     
  4. fufsgfen

    fufsgfen Active Member

    Joined:
    Jan 9, 2019
    Ratings:
    +29 / 0 / -0
    No that is not what I meant, what I meant was that you could of prevented it. Same as

    Remember, it does not matter who is right / who has right of way, race is ruined either way, but quite often with different action whole situation can be avoided and avoiding accident situation from happening is more important than who causes the accident.

    In such close racing situation optimal line is not the fastest line, leaving so much room is guaranteed to make someone put his car where it does not belong to.

    So it is much better practice in such situations to not leave room for stupid moves, no matter how much you would be in right if you take faster line and someone puts his car to where it does not belong to.

    Especially with AI one has to kinda help them to pick their spot by such line choices that don't leave too much room for inside.

    AI is kinda like noob online racer, it needs help from more skilled human player, then racing is quite good.

    I think pretty much same as MattStone, you take different line and there is no problem.
     
  5. MattStone

    MattStone Well-Known Member

    Joined:
    Mar 6, 2016
    Ratings:
    +169 / 0 / -0
    @fufsgfen
    You inspired me to look into this a little further to check out what my cpu and graphics card was doing and the results were interesting

    So I set up a test at Spa which is notorious for pushing my system to the max after the first corner
    Below is the CPU and GPU utilisation for the first 40 seconds of the race. Basically from start to the bottom of the hill.

    This test is with 36 cars with me starting last (went down below 60ps causing stutter as I use vsync)
    [​IMG]

    ..and this is what happened with 12 cars (stayed above 60fps) and it ran smooth as silk
    [​IMG]

    GPU utilisation was similar for both so I don't think that was my problem

    but you can see in the 32 car picture the core with the red arrow is where I lost frames.
    In the 12 car picture that core was never stressed and the game ran smoothly. The core to the left of the red arrow in both tests maxed out so that core wasn't effecting the frame rates.

    • So whilst the game does use multiple cores for its tasks, to me it looks like what ever task is assigned to the core that has the red arrow is the limiting factor or bottle neck

    This below picture is my CPU utilisation with 36 cars at low graphics but with 36 cars visible to make an even comparison
    It ran smooth as silk but dang it looks like crap LOL
    [​IMG]
    So looking at these 3 scenarios my guess is that
    • the logical processors 10 and 11 are processing the graphics
    • Processor 1 was similar across all three test but I think is still doing some graphics tasks.
    • Processor 12 was used more in the low graphics!!! That was interesting and I'm not sure what to read into that LOL
    So my final conclusion is that processing the AI behaviour doesn't push the CPU. But sending all those glorious AI pixels to the GPU causes the CPU bottle neck.

    So mr game developers of R3E; is there anything you can do to share the load of logical processor number 11 with those other 8 underutilised logical cores

    Actually when you think about it it looks like (and logically so) that the game is designed to run on only a 4 core processor. Those other 8 cores are probably just doing some windows processing stuff.

    I should add that this testis done with my triple 1080p system
     
    Last edited: Jan 27, 2019
  6. GregoryLeo

    GregoryLeo Well-Known Member

    Joined:
    Feb 22, 2015
    Ratings:
    +360 / 0 / -0
    The more ai you have the harder it is for your main processor to keep track of and control. And they will make more mistakes. And react more slowly. I’ve found that for me 20 is max.
    And some food for thought. While large grids are fun. If the ai are adapted well enough to my skill level. I find that I end up racing in the pack against the same 3 or 4 cars throughout the race. So if you want smarter tighter racers, fewer is better. I’ve had some really amazing tight battles against only 10 cars. But I like 20 incase I screw up and end up in the back of the pack. :rolleyes:
     
    • Agree Agree x 1
  7. Not Lifting Off

    Not Lifting Off Well-Known Member

    Joined:
    Dec 5, 2015
    Ratings:
    +368 / 0 / -0
    The ai use a simplified physics model over a certain number cant remember what that number is but 20 dosnt sound too far off the mark, would explain the lower cpu occupancy with a larger grid!
     
  8. DaniloE31

    DaniloE31 Well-Known Member

    Joined:
    Dec 14, 2015
    Ratings:
    +73 / 0 / -0
    I dare to disagree. This of you is indeed just academic dissertation...

    Eventually we didn't hit each other side by side in that turn, he just hit me in the back ;)
    And I am not saying that the AI is crazy or impossible to handle. I just wanted to show, he makes once in a while bloody lousy mistakes, which are hard to explain...
    After all I went through that turn in the trafic at least for 20 laps before that event. AI could handle me, I could handle him. :)
     
  9. Andi Goodwin

    Andi Goodwin Moderator Beta tester

    Joined:
    Jan 16, 2015
    Ratings:
    +791 / 0 / -0
    the 25ish Ai that are closest too you are more intelligent , so it doesnt matter if you run higher in numbers in my experience , as the ones you are racing are the most intelligent (if only multiplayer was like this )we only have a few tracks where you have more than 40 slots so rarely does it bug , if you wish to use more cars and take some pressure of the gpu/cpu , dont load there cockpits , i have everything maxed out , except motion blur etc , and 56 cars visible, only track were i cant do this is nords , if i go above 70 cars , im always over 60fps ; i dont use vsync

    Andi
     
  10. ravey1981

    ravey1981 Well-Known Member Beta tester

    Joined:
    Apr 15, 2018
    Ratings:
    +873 / 0 / -0
    @MattStone how do I get activity monitor to display cpu activity like that...I just get one big graph, like an overview. Would be interesting to see if some of the individual ones are overloading to help with my graphics problems.....
     
  11. Not Lifting Off

    Not Lifting Off Well-Known Member

    Joined:
    Dec 5, 2015
    Ratings:
    +368 / 0 / -0
    Right click the cpu graph, select change graph to, select logical processors.
     
    • Informative Informative x 1