# Mining Road Traffic Rules with Signal Temporal Logic and Grammar-Based Genetic Programming
## 6 Experimental Evaluation
### Results
#### 6.3.2 RQ2: Specifications that are Readable and Interpretable for a Human  
As far as readability is concerned, we found the mined specifications to be readable and interpretable by a human. To provide deeper insights, Figure 7 plots the histogram for the frequency distribution of the operators (see Section 5.3) and the attributes (see Section 6.2) in our grammar. By manually inspecting the best individuals and visualizing the aggregate frequencies with Figure 7, we found that all the attributes are present, with a slight overabundance of E and W that are, respectively, the distance from the front neighbor and the distance from the rear neighbor. Moreover, evolution prefers the \(\wedge\) and \(\
eg\) operators over the temporal operators (of which there is approximately one per formula). This finding is in line with our expectations since temporal operators are likely to be the least interpretable for a human (as confirmed for mathematical expressions in [23]). \begin{table}
\begin{tabular}{c c c} \hline \hline \(f\) & \(|\varphi|\) & **Time [s]** \\ \hline
0.063 \(\pm\) 0.009 & 52.5 \(\pm\) 6.5 & 3876.6 \(\pm\) 426.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Fitness \(f\), solution (derivation tree) size \(|\varphi|\) for the best individuals found in each run, and evolution time in seconds. Reported as median \(\pm\) standard deviation. Figure 6: Median \(\pm\) standard deviation (across the 10 evolutionary runs) over the evolution. In the following, we transcribe some instances of best individuals. For ease of understanding, the numeric constants that appear in the formulas below have been denormalized by multiplying by the attribute range and summing the attribute minimum value. For example,  
\[(\mathrm{O}_{[15,78]}32.85<\texttt{SE}<182.38)\wedge(\
eg((\texttt{SE}<133.13) \wedge(\texttt{SW}>177.77)))\]  
dictates a reasonable distance from the southeast neighbor (i.e., between 32.85 ft and 182.38 ft) at least once in the \([15,78]\) past temporal window; at the same time, such a distance must not be lower than 133.13 ft and the distance from the southwest neighbor higher than 177.77 ft at the same time, showing that distances from neighbors must be, in general, balanced. Similarly, this other example:  
\[(\mathrm{O}_{[1,87]}\texttt{SE}>41.23)\wedge(\
eg((\texttt{E}<158.36)\wedge( \texttt{N}>42.48)))\]  
dictates to stay farther than 41.23 ft from the southeast neighbor, while staying not closer than 42.48 ft to the north one and not farther than 158.36 ft from the east one. An example with Historically is:  
\[(\
eg(\texttt{W}<129.48))\wedge(\mathrm{H}_{[41,81]}\texttt{N}<71.41)\wedge( \texttt{SE}<88.87)\]  
which tells it to stay farther than 129.48 ft from the west neighbor, while keeping closer than 88.87 ft from the southeast neighbor and continuously over \([41,81]\) closer than 71.41 ft from the northern neighbor. An example without temporal operators is:  
\[(\texttt{S}<69.59)\wedge(\texttt{E}>25.12)\wedge(\
eg(\texttt{NW}<104.98)) \wedge(\texttt{vel}<37.93)\]  
which tells it to drive slower than 37.93 ft/s while keeping not too far away from the southern neighbor and reasonably far from the east and northwest neighbors. Finally,  
\[(35.03<\texttt{NW}<136.51)\wedge(\texttt{SE}>82.69)\wedge(\
eg(\texttt{SW}<28 6.96))\]  
compactly dictates to stay at a distance that is neither too far away nor too close to the northwest, southeast, and southwest neighbors. From the examples above, we draw one very important conclusion. Recalling Section 6.1 and Figure 3, the dataset used here was collected on a very trafficked highway. The mined specifications follow a common pattern of the ruling:  
Figure 7: Number of occurrences of operators and attributes for the best individual of each evolutionary run. 1. to poise the distances from the neighbors, and 2. to drive neither too fast nor too slow. The former point is crucial, as keeping too far from one neighbor implies coming very close to the neighbors on the opposite side.