# The proper AI method for modeling to predict road crashes and safety surrogate measures

I intend to use an AI method for modeling to predict road crashes and safety sorrogate measures. The dependent variables are crash frequency and other measures that are nonnegative integers. The independent variables are characteristics of road such as lane width, shoulder width, radius of horizontal curves, etc. I searched through the review articles that investigated various AI methods for prediction. I found two articles that were about predicting the energy use of buildings. In those review articles it was concluded that the best prediction method is the hybrid of SVM an swarm intelligence methods. Does anybody know whether I can utilize this method for my research or not? Thanks.

I'm not an expert at SVM but I'm doing some stuff with SI (as a hobby) so take this with a grain of salt.

Swarm Intelligence is basically having a lot of small and stupid things work together with a set of simple rules to create complex behaviors.

You can model your drivers with some simple rules like:

if (car in front):
slow down;
if (red light):
80% chance to stop;
speed = max_speed;
while 7pm..7am:
try to be at home;


You can make a set of rules modeled after what you assume driver would do in traffic. If the drivers in your area drive like mad men, increase the chance of not_stop_at_red_light. If you want to test roundabouts, give the cars some rules to follow when near a roundabout. Once you've made your rules and assumption, throw them in a few hundred/thousand cars/drivers, put them in your test environment and watch what happens. The drivers should act according to their personal (local/private) goals, their surrounding traffic (local groups/peer-to-peer communication), the time of day and weather (global variables), etc.

Watching traffic simulations live and checking your logs can tell you things like:

• This intersection gets unexpectedly high traffic flow.
• After I replace this intersection with a roundabout, traffic flow increased by 10% and accident rates decreased by 20%.
• This highway doesn't get used a lot. May be we shouldn't build it.

Traffic is a study of large numbers of moving objects and their interactions. SI is a study of lots of little things doing simple things. Both have lots of objects that are dumb individually but show some emergent patterns and intelligence when looked at as a whole. You just observe your little idiots as they do their things and watch for emerging patterns. Simulating traffic as swarms can give you insight into how your drivers interact and spot accident-prone spots before they happen, check how certain variables like lane width affect traffic flow, make predictions as to whether or not you should build certain roads, etc. You wouldn't know how exactly traffic would flow until you've put a few hundred/thousand on a road, and you want to test it on virtual traffic before real traffic.

New contributor
John Zhau is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Prediction models can be created in sourcecode directly or as data-driven simulation. In the sourcecode version an equation is created: $$crash probability = lanewidth * shoulderwidth * curveradius$$ To calculate the probability, the software asks for the parameters at runtime and estimates the ratio. This technique is similar to what a physics engine is doing. It simulates the reality with a mathematical equations.

The other option is called data-driven simulation. Here is the idea, that no equation is available but a database with cases from the past. To calculate the current crash probability, the algorithm sends a sql-query to the database and is searching for a similar situation. If the existing data-entry doesn't fit exactly to the new situation it will interpolated by a mathematical algorithm, for example with spline interpolation.

To determine which method is superior, it's important to know, that data-driven simulation is a recent idea. Since around 2005 the number of projects with that technique are growing together with the upraising of machine learning and deeplearning. The other option which is a direct equation created from scratch by a programmer is the classical form which was used before the year 2005 in the literature quite often. The reason was, that in the past no large database storage was available. If an embedded car controller has only 10 kb of RAM, it is not possible to put a database with 10 GB rawdata into that memory.