The way to solve(?) AI vehicles' sudden overtaking behaviour

Das Forum befindet sich im reduzierten Betrieb. Die Addon- und Supportforen bleiben weiterhin verfügbar.
Bitte beachte, dass OMSI nicht mehr weiterentwickelt wird. Ein Teil der Entwickler widmet sich inzwischen der Entwicklung eines neuen Simulators. Weitere Informationen zum LOTUS-Simulator findest Du hier.
  • *** ALSO POSTED AT STEAM COMMUNITY ***


    =========================

    English version

    =========================

    First of all, I feel sorry for my bad English.


    Many players have encountered AI vehicles that suddenly brake and then slowly change lanes (overtaking), leading to collisions with the bus you’re driving. In urban environments with slow traffic, it might still be possible to stop in time, but in highway maps where you’re driving at high speeds, there’s often not enough time to react before a collision occurs. In the past, players have discussed the lane-changing (overtaking) behaviour of AI vehicles, including setting "overtaking prohib." in the Editor or disabling vehicle collisions, but these measures don’t truly solve the problem.


    The overtaking behaviour of AI vehicles can generally be broken down into 4 steps:


    1. Sudden braking

    2. Changing lanes slowly

    3. Braking again

    4. Acceleration


    Image before fixing: Google Drive Image 1


    The above 4 steps are often completed within a very short distance (about 10-20 meters). Generally, the problem is thought to stem from the second step, and attempts have been made to find ways to extend the distance and time for changing lanes, but to no avail.


    Perhaps we should reconsider. What if we solve the braking issue first?


    So, I opened "AI_constfile.txt" and found the parameter related to braking, "AI_F_brems_max" (Actually, I asked Bing AI). I gradually adjusted this parameter with many tests, and changed it from "10000" to "1200-3000". The overtaking behaviour of AI vehicles indeed changed!


    Image after fixing: Google Drive Image 2


    Video: facebook video



    However, although the overtaking behaviour has changed, other "side effects" can be observed from the video:


    1. AI vehicles cross into the adjacent lane after overtaking.

    2. After the traffic light changes, AI vehicles may fail to stop within the designated path, leading to "run a red light".

    3. Some AI vehicles may collide with the vehicle in front due to insufficient braking.


    Regardless, individually modifying the script of AI vehicles may be the simplest and temporarily effective solution, so I’ve decided to share this research with everyone. If anyone has new findings or solutions to address these "side effects", hope we can study and discuss them together.


    Finally, here’s the link to the AI vehicles I’ve created and adjusted for reference, so that you no need to change any original files before you test:

    AI vehicles link


    =========================

    Cantonese verson

    =========================

    關於AI vehicles硬CUT嘅解決方法研究



    好多玩家都試過玩玩下果陣前面架AI車突然急煞,然後龜速cut過隔離線,你揸緊果架巴士就撞咗埋去。喺城市慢速嘅環境或者都停得切車,但如果你喺公路高速行緊,通常你都炒硬。

    過去好多玩家都討論過AI車CUT線嘅問題,諗過好多解決辦法,不論係Editor嘅「overtaking prohib.」定係閂咗車輛碰撞其實都解決唔到問題,前者唔work,後者治標唔治本。

    小弟呢早日揸車無意中諗起AI車成個硬cut嘅流程,似乎有D位可以搞一搞。


    首先成個硬cut流程大致可以分成四個步驟:

    1. 突然急煞

    2. 慢動作cut線

    3. (驚你唔撞)再急煞

    4. 踩油走人


    參考圖片:

    Google Drive Image 1


    呢四個步驟往往喺大約10-20米內完成,距離極短。一般而言大家都會認為問題出自第二步,所以都會從距離著手,諗下點拉長cut線嘅距離,但一直都無結果,同埋都解決唔到急煞呢個問題。


    如果,我地先處理煞車呢?


    解鈴還須繫鈴人,AI車有問題就緊係要問返AI本人。於是小弟打開Bing,問下AI大神到底AI煞車可以點set。同AI傾偈好困難,搞完一輪佢終於答到我,喺「AI_constfile.txt」入面有個參數叫「AI_F_brems_max」係同煞車有關,經過係咁改同入game測試,個參數由「10000」調整至「1200-3000」之間,AI車嘅cut線行為果然唔同咗!


    參考圖片:

    Google Drive Image 2


    參考影片:

    facebook video


    不過咁,雖然行為係改變咗,大家無咁易炒埋去,但就發現咗其他「副作用」(可以睇睇上面條link嘅片):

    1. Cut線幅度大咗,會cut多半條線先返嚟,當然呢個只係馬路炸彈嘅日常

    2. 紅綠燈轉燈後AI車有機停唔切,當佢過咗set燈嘅path嘅話佢就會直接「衝燈」。唔……其實都係馬路炸彈嘅日常嚟

    3. 部份AI車會因為煞車setting個數低咗,收掣不及zip咗入去前面架車度


    無論如何,逐個改AI車嘅script檔或者暫時係最簡單同有效嘅方法,似乎解決咗十幾年嚟都解決唔到嘅問題(定係只係我搵唔到答案,其實大家都知?)。如果大家有其他新發現,或者對「副作用」有解決辦法,希望都可以喺度一齊傾下分享下。


    最後附上小弟自行製作嘅AI車,入面已經調整咗個script可以做參考:

    AI vehicles link

  • Neu erstellte Beiträge unterliegen der Moderation und werden erst sichtbar, wenn sie durch einen Moderator geprüft und freigeschaltet wurden.

    Maximale Anzahl an Dateianhängen: 10
    Maximale Dateigröße: 100 kB
    Erlaubte Dateiendungen: pdf, txt