Automated cars.

Discussion in 'Ideas and Suggestions' started by Garebear, Jun 8, 2013.

  1. Dr.Bullshit

    Dr.Bullshit
    Expand Collapse

    Joined:
    Jun 9, 2013
    Messages:
    105
    But are those cars smart enough to actually know where other objects are or are they so focused on ramming you that they just keep accelerating into walls and stuff?
    If it'd work as you guys (and I) want it to work it would kick infinite amount of *rse!

    (Woho, first post xD)
     
  2. gabester

    gabester
    Expand Collapse
    Vehicle Director
    BeamNG Team

    Joined:
    Jun 6, 2012
    Messages:
    2,653
    Sadly they're not aware of any obstacles; they'll just crash into walls. They are smart enough to know when they're stuck and to back up, though.
     
  3. Garebear

    Garebear
    Expand Collapse

    Joined:
    Apr 25, 2013
    Messages:
    176
    If I have a vast open map, and I swerved or turned around can the AI car also swerve or U-turn?

    - - - Updated - - -

    Also, could you set a force field zone around the corners of buildings or objects that causes the car to know to avoid said objects?

    You know, what you are giving us is already sooo much, and even though there are very many features I would add. I will be more than ecstatic with whatever you bring me.
     
  4. Rocking_Star

    Rocking_Star
    Expand Collapse

    Joined:
    Jan 15, 2013
    Messages:
    282
    Ain't that the truth!
    Can't wait to see an AI pit gabe ;)

    To Garebear: I'm guessing they probably can.
    I wonder if they can do hand-brake spins :eek:
     
  5. gabester

    gabester
    Expand Collapse
    Vehicle Director
    BeamNG Team

    Joined:
    Jun 6, 2012
    Messages:
    2,653
    Yep, they know when you're directly behind them (and too far away to back into) and stop and turn around.

    Theoretically possible. Though it'd be more like driving by feel rather than preemptively avoiding obstacles.
     
  6. VeyronEB

    VeyronEB
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,537
    It would be a much better idea to have something like this. Roads should use splines like most games and collision models could define the AI obstacles.
     
  7. luke198

    luke198
    Expand Collapse

    Joined:
    Jan 15, 2013
    Messages:
    334
    Murderous AI would make an excellent addition to BeamNG in my opinion.;)
     
  8. Kamil_

    Kamil_
    Expand Collapse

    Joined:
    Mar 17, 2013
    Messages:
    691
    Yup, and you should show it in the next video ^^
     
  9. Garebear

    Garebear
    Expand Collapse

    Joined:
    Apr 25, 2013
    Messages:
    176
    If your car were to be driving off road in the middle of the woods where there are no woods, couldn't you code a negitive to negitive magnetic force to keep those cars from hitting the trees?
     
  10. Lightwader

    Lightwader
    Expand Collapse

    Joined:
    May 18, 2013
    Messages:
    3
    Will there be an event in the career where you have to get away from a car with this so called murderous AI implented or something? For people wondering, it's been mentioned a career mode is planned in this thread.
     
    #30 Lightwader, Jun 10, 2013
    Last edited: Jun 10, 2013
  11. Hati

    Hati
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,388
    There's a way to code AI that I happen to love but I've only seen it in a 2D racing game a friend coded and ever since I've been trying to replicate it.

    The AI used a flow field to navigate, and everything with collision caused the flow field to direct away from it. The way he did it was that anything with collision such as a vehicle or cone or wall, and the edges of a defined road channeled the flow field into one direction, or if the object was small enough the flow field was allowed to diverge around the object then merge again on the other side. Think of it like how water would flow around an obstacle while being directed through a channel. My friend made the assumption that the AI behaved like a human and drove towards where it was 'looking'.

    From that assumption things got interesting. So there's this object in-front of the car, an entity that keeps a distance in-front of the car based on the car's speed. The faster the car, the further away the entity kept in a kind of logarithmic scale so there would be a kind of maximum distance that the AI could 'see' and plan for. This object acted like the eyesight of the driver and hunted out a path through the flow field vectors. So the entity was busy path finding and the car was chasing it. Together we had a system where the two things worked in tandem to allow the car to effectively see and navigate through an obstacle course. I don't know what you plan to use, probably something much more efficient but my friend's little experiment there is one of the reasons I aught to learn to code more complex things.
     
    #31 Hati, Jun 10, 2013
    Last edited: Jun 10, 2013
  12. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,083

    hmmmm, the middle of the woods where there are no woods, interesting, LOL
     
  13. Kamil_

    Kamil_
    Expand Collapse

    Joined:
    Mar 17, 2013
    Messages:
    691
    Recursive contour plotting? Sounds like what you're saying.
    I know one path finding method is A*, and you can have weighted paths there, so a path near a cone could be medium weighted, grass heavy and road lightest.
    Other one I know is using a "sensor" or ray-tracing and taking the distance to a object, and a cone could have a smaller effect, using more sensors is obviously more accurate. I'm not too knowledgeable with AI, but the last described method makes for something cool with some walking AI: http://www.youtube.com/watch?feature=player_embedded&v=9Etv7-3tFXM
     
    #33 Kamil_, Jun 10, 2013
    Last edited: Jun 10, 2013
  14. Hati

    Hati
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,388
    I think recursive contour plotting is something else entirely. What I'm on about usually ends up being visualized with a lot of little arrows.


    (imported from here)
     
  15. Garebear

    Garebear
    Expand Collapse

    Joined:
    Apr 25, 2013
    Messages:
    176
    I meant no roads xD
     
  16. Kamil_

    Kamil_
    Expand Collapse

    Joined:
    Mar 17, 2013
    Messages:
    691
    That's actually what it does, the car wants to stay in the hottest/highest path. The base of it is contour plotting, recursive is for generating it realtime.
    like this:
    contour_user_selected.jpg
    It would give the same effect, both methods are pretty costy though.
     
  17. eletricmano

    eletricmano
    Expand Collapse

    Joined:
    Mar 30, 2013
    Messages:
    408
    I just had an idea. How about pursuit mode? You start with a vehicle, and there's one police cruiser chasing you, after a while it calls for backup. When you least expect, you look behind yourself and there are 15 - 20 police cars, a helicopter, police vans, all after you with sirens and lights on. When you go back to normal vision, there are spike strips covering the whole road, and you try to dodge them, so you go off road sliding sideways through the dirt with no control over the car, brake and roll over 8 to 10 times coming to a terrible stop. Your car is totaled, the engine is smoking, the tires are shredded into pieces, and you're busted.
     
  18. Davidbc

    Davidbc
    Expand Collapse

    Joined:
    Mar 20, 2013
    Messages:
    1,333
    no .
     
  19. Kamil_

    Kamil_
    Expand Collapse

    Joined:
    Mar 17, 2013
    Messages:
    691
    I hope there is a separate gamemode for it, not in the career though. Something like NFS Most wanted.
     
  20. Garebear

    Garebear
    Expand Collapse

    Joined:
    Apr 25, 2013
    Messages:
    176
    Maybe even not having the cars know where they are supposed to go, but having them know where NOT to go.
     
  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