# Evolving the Controller of Automated Steering of a Car in Slippery Road Conditions
## 2 Materials and Methods
### Evolving the Steering Controller via GP
#### 2.5.2 Fitness Evaluation
We view the trajectories shown in Figure 6 as Case 1 and Case 2 as suboptimal, as they represent either a too-slow (Case 1), or a too-quick, oscillating return (Case 3), respectively. Indeed, a too-slow return would be unable to either follow adequately the center of the lane on cornering or to return to it in a case of deviating from it due to skidding on slippery roads. On the other hand, a too-quick return would imply an inherently oscillating trajectory of the recovery. In order to formally express the defined criteria of optimality of the SAF-induced steering, we defined the fitness function \(F\) as a weighed sum of the following two components: (i) the area \(A_{T}\) under the trajectory of the car around the center of the lane (as an integral of the absolute value of the lateral deviation \(e\)) and (ii) the average of the lateral velocity \(V_{L\_AVR}\) (as an integral of the lateral acceleration \(a\)) of the car:  
\[F=A_{T}+C_{V}\,V_{L\_AVR}. \tag{7}\]  
The lower fitness values correspond to a better quality of steering, and, ultimately, the desired trajectory (Figure 6, Case 3) would feature an optimal trade-off between the values of the two components that result in a minimal fitness value. Indeed, the suboptimal trajectories would be subjected to a detrimental selection pressure by the GP either due to the too-wide area \(A_{T}\) under the trajectory (Figure 2, Case 1) or a too-high lateral velocity \(V_{L\_AVR}\) (Figure 2, Case 2). We verified experimentally that the value 0.5 of the weight coefficient \(C_{V}\) in Equation (7) results in an optimal tradeoff between the values of the two additive components of the fitness function. We would like to note that, for different steering tasks, we might need to keep the values of both components of the fitness of the evolved SAF separately (and to implement a two-objective optimization [31]) instead of fusing both these components into a single scalar value. This would allow us to obtain a set of Pareto-optimal SAFs that feature different combinations of the values of (i) the area under the trajectory of the car and (ii) the average of its lateral velocity. An SAF featuring a wide area under the trajectory might be needed in a slow and comfortable lane change on a low-traffic highway. On the other hand, an SAF that results in somehow oscillating trajectories with higher lateral accelerations might be needed to safely circumnavigate suddenly appearing obstacles. One of the major drawbacks of such a multi-objective approach is that the real-time selection of the appropriate SAF from the set of a priori obtained (valid) SAFs could be rather challenging. For the given task,  
Figure 6: The three main cases of the trajectory of the car during the fitness trial: the preferred trajectory (Case 3) of the car would feature both a quick (i.e., with a narrow area under the trajectory) and oscillation-free (with a low average lateral velocity) return to the center of the lane. Case 1 and Case 2 illustrate a too-slow and a too-quick (oscillating) return to the center of the line, respectively. however, we assumed that the proposed single-valued evaluation of the fitness of the evolved SAF is sufficient.