unorthodox-paradox / omsi_2_csb_ai_enhancements

AI enhancements for CSB vehicles
1 stars 0 forks source link

AI perception under rainy (+ windy) conditions is unreliable #4

Open unorthodox-paradox opened 5 years ago

unorthodox-paradox commented 5 years ago

Symptoms

Under environmental conditions that are rainy, and more so when additionally windy, AI vehicles may perpetually “cycle” (loop between two or more states / settings) the state of some or all of those functions / components / subsystems that depend on precipitation perception. For example vehicles may activate their fog lights when above a certain velocity, switch them off when happening to be driving slowly for some amount of time, and so on and so forth, in a never-ending cycle.

Identified causes and resolution progress

The primitive precipitation rate exposed by OMSI is, besides the chosen rain/snow intensity setting, dependent on velocity and wind direction (and consequently vehicle orientation) and speed. A proper resolution of this issue would entail somehow obtaining a normalized, stable precipitation rate representation. Sadly OMSI does not at present expose those variables to scripts, nor documents their relationship, effectively precluding resolution.

Our present workaround is to simply have the AI acknowledge precipitation increase (much) faster than decrease, to somewhat limit cycling occurrence potential / frequency.

User-level workarounds

No real workarounds available – besides, of course, the Ostrich algorithm (“sticking your head in the sand and pretending there’s no problem”).

unorthodox-paradox commented 4 years ago

It turns out that there actually is a system PrecipType / PrecipRate pair in addition to the problematic local one relied on thus far. As opposed to the latter, the former indeed corresponds to the chosen weather settings, and is independent of the factors (velocity etc.) referred to above.

Once #15 has been addressed, the following changes should take place: