Better AI and more racing

Discussion in 'Ideas and Suggestions' started by Unster, Jan 23, 2018.

  1. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    469
    I'm a big fan of this game. But one thing that would make it even better is if the AI was better at driving at high speeds instead of frequently touching the brakes and changing its mind about where to turn.

    And it would be awesome if the time trials had the option of adding an AI car to race against. Racing against my own time isn't that exciting.
     
  2. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    I guess AI is still bit WIP as well as some maps have AI paths quite rough.

    Sorry devs, I can't resist, this AI crowd just is so funny at times:


    I think that there is not really racing AI implemented, it is chased or chasing only, kind of wrecking AI.

    When there are no intersection for AI to get confused about it works bit better, for anyone wanting to race AI I could recommend few mod maps where AI is bit more useful:
    https://www.beamng.com/resources/tail-of-the-dragon-deals-gap.2702/

    https://www.beamng.com/resources/trial-mountain.285/

    Sometimes AI tends to want to change direction of travel though and that kind of spoils the race.
     
  3. DuneWulff

    DuneWulff
    Expand Collapse

    Joined:
    Apr 25, 2016
    Messages:
    1,034
    One-way decal roads fix that... to a certain extent. If they wreck, they try to continue along the same direction they were heading instead of deciding to double back on themselves. The issues arise when the AI seemingly ignore it and go backwards for a little before they realize they should be going in the other direction.
     
  4. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Another challenging place seems to be under the bridge, they try to drive under the bridge direction of road on the bridge.

    West Coast race track is horrible in this regard, but I think AI is not quite tuned there yet because it's behavior is quite poor there.

    Maybe at some point we could choose which path we want AI to use so that AI don't make unwanted turns at intersections.
     
  5. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    469
    Thanks for the suggestion. I may try some of those linear maps. But it would be nice to not have the AI frequently slow down on the typical maps, especially before intersections, only to decide to keep going in the same direction. It makes the AI too easy to catch up to. And the chasing AI is even worse. It's easy to outrun. But the AI is pretty good on small, twisting roads. The problem is on highways where it seems the AI is afraid to go too fast and it pointlessly slows down before intersections.
    --- Post updated ---
    I haven't had a chance to test the AI much on West Coast USA, as any time I spawn a 2nd car I get a terrible FPS drop. I know this is a known issue.
     
  6. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    469
    The Trial Mountain is pretty nice, and the AI doesn't do the silly slowdowns due to the lack of intersections, but it's still overly cautious on most of the turns and easy to beat, even when I use a slower vehicle. The Tail of the Dragon is OK but a bit too vegetation-heavy, causing lower frame rates.
     
  7. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    3,289
    The AI now brakes to avoid some collisions (can adjust if it stops in time, play with AI settings).
    AI will overtake safely in future versions as-per Developers.
    One way road support only by manual destination and mapper's workmanship obviously.

    AI will randomly hit brakes especially around hilly terrain if you don't use enough nodes in the decal road (the road itself) inside the editor (as a mapper, not as a player).

    AI gets confused around bridges if the road above and the road below are too close in z-height. On my map this isn't really an issue in Roane County as the bridges are pretty high (So-Cal and Nevada too except one spot in Nevada). Use the NAVGRAPH debug in the AI control app to see if it's happened, if it's in an official map, submit as bug. Take a picture when submitting a bug with the NAVGRAPH on.
    This happens due to AUTO JUNCTION code.
     
    #7 bob.blunderton, Jan 25, 2018
    Last edited: Jan 25, 2018
  8. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    469
    I don't see any AI settings in the options. There's only chase, flee, random and stop in the AI controls. Flee is sometimes a little faster than random (on some maps, not all).
     
  9. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Click here:
    upload_2018-1-26_18-32-40.png

    Then click plus sign and from this list you can find AIControl:
    upload_2018-1-26_18-34-33.png

    From there you can select Span, which chooses target quite bit forward and AI is trying to get there, you can also control how aggressive or how fast AI drives etc. Span works nicely, but it could use next target selection bit earlier than when reaching target, so it would not slow down for target position, but would instead keep going at full blast.
     
  10. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    469
    Thanks for the tip. I tested the span mode but I feel it's basically the same as random, except the AI eventually stops at its destination for a second before picking another one. The slowing before intersections even when going straight seems to happen mostly in the flee mode and rarely in random. Random may be a tad slower than flee (not really sure), but it sure seems more steady.

    I also played with the risk settings, and yes the AI goes faster at higher risk values, but is also more likely to crash or spin out, so it doesn't really help. I think the AI just needs further tweaking by the devs. It's not bad in the current state, but once you get good at this game it could be faster & more competitive, especially on the highways.
     
  11. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    It also seems to be that different vehicles act very differently, Sunburst Police RS or Bolide seems to be better for AI than ETK 3000, also maps differ, West coast USA is terrible, you have to turn risk down near minimum to stop AI from crashing, where East Coast USA you can have risk at default or even bit higher. With Bolide AI is actually keeping quite good pace.

    I'm not sure what Random does, I though it would just choose between flee and chase.

    East Coast with Bolide 350, AI did not seem to brake too much at intersections, flee mode is still horrible, but at West Coast, AI seems just to find nearest hard object and accelerate hard towards it. Maybe that is bit WIP though.

    Route planning for AI span mode should be like route planning in GPS, you just calculate route and few alternatives, then randomly pick one, while getting on route, you calculate new target before reaching old target, if there is intersection to turn within 100 meters of vehicle position with new route, turning from intersection should be denied or if route is not found turn around after intersection.
    It just needs look ahead / more ahead planning to improve usefulness a lot.
     
  12. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    469
    Random AI is kind of like flee but it's not trying to get away from you on purpose, just making random decisions where to turn and still driving pretty fast.
     
  13. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Oh, that is quite nice mode indeed, another thing I found out was that AI actually did stop for an obstacle in that mode.

    Here I was driving Ludicrous electric Sunburst, cop car drove against me, then I floored and after a short while lost control. Then after a minute or maybe bit less Cop car comes again same direction, probably drove just some loop, then gently stopped there without any drama or skidding:
    upload_2018-1-28_18-58-6.png upload_2018-1-28_19-23-13.png

    Same kind of decision making for flee or chase mode might be quite nice.

    Also I was thinking that maybe there could be mode that would like random, but if AI car is closer than for example 30 meters it would go to chase mode? Now what that would allow would be cop chases, you could add variables like if player car speed is over X and player closer than Y, then chasemode=true or something like that.

    NFS hot pursuit, but a lot better, kind of and I don't think that would really be huge work amount to get such to work.
     
    #13 fufsgfen, Jan 28, 2018
    Last edited: Jan 28, 2018
  14. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    469
    Are you talking about the old NFS Hot Pursuit (NFS 3)? That one had pretty awesome police chases, much better than the more recent NFS. And I love police chases (or any chases for that matter) in BeamNG, especially with the realistic damage and physics. What would make it even better is to have some occasional traffic (I know the # of cars is limited in BeamNG) that even pulls over for the police lights. That would make the chases even more realistic due to the higher risk of collision.
     
  15. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    I know only about old NFS when it was all new stuff they made, then they started recycling.

    Anyway at East Coast Usa, if AI could be limited to certain road, it would perhaps give better traffic as with only 6 cars spreading cars out over all roads is causing them rarely to be seen.

    However when you speed along those roads and that cop car comes from opposite direction it does give you desired effect :D
     
  16. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    3,289
    OLD NFS.... memories *sings a tune*
    Yes, old NFS, oh, like LGR on Youtube puts it... that was cream of the crop of racing enjoyment, now it's "cream of the ...." *expletive like crop but with one letter changed*...

    So yes, totally get you there. The risk factor will also change how much it brakes and how soon it stops. So that it can possibly hit slightly or will stop in time for an object. Good for crash re-creation but not bug-free.

    There AI is VERY WiP right now and being heavily modified. Works best on official maps and maps where lots of nodes are used in Decal Roads and such, Like my So-Cal Interstate (a little laggy) and Nevada Interstate. Those should be fully working 100% sans one-way roads (they don't exist as far as the AI is concerned).

    So, do expect better, but you can always put suggestions.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice