# Navigation of Autonomous Tug via Evolutionary Algorithms with Radar Plot Fitness Evaluation
## 4 Results  
The described algorithm was tested on four navigation situations, taking place in restricted waters, in the presence of both static and dynamic constraints. In the case of all maps presented in this chapter, north is at the top of the figure. The parameters of the distances covered and course changes are presented in Tables 1 and 2 placed at the end of the chapter.  
Figure 3: Principle of calculating fitness values based on the radar chart surface.  
The research presented in this chapter uses the proprietary marine navigation environment simulator. The simulator environment uses cooperating programs written in C++, the first one is used to prepare and introduce changes to existing navigation situations, the second program performs calculations related to the evolutionary algorithm being studied and the movement of dynamic objects. The last element of the environment is a simulator enabling full simulation of ship movement during the situation designed in the first program. The simulation includes the dynamics of the movement of all ships related to their physical dimensions, weight, draft, as well as hydrometeorological disturbances affecting the hull related to waves, wind and sea current, described by their: speed, course, and variability in time.  
The marine navigation environment simulator enables the collection of data on the movement of each unit during the simulation. In the presented research, the screenshots visible in Figures 4, 6, 8 and 10 come from the program preparing the navigation situation. The green shapes visible on them are static navigational restrictions--land, while free space is a body of water available for free navigation.  
The second program used in this study was used to perform calculations according to the algorithm presented in Algorithm 2, and also to visualize the results, which resulted in screenshots visible in Figures 5, 7, 9 and 11, as well as data in Table 1. The visualization has an analogous color scheme, only replacing the icon of the initial position of the own ship with a green square, and the target position with a red square. The route resulting from the calculations, represented by the best-adapted individual, is presented with a thick broken line in black.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Situation, Algorithm** & **Waypoint No.** & **Distance (nm)** & **Course (deg)** \\ \hline Situation 1, classic fitness method & 0 & 2.67 & 8.6 \\  & 1 & 1.08 & 27.5 \\  & 2 & 5.28 & 47.6 \\ \hline Situation 1, radar fitness method & 0 & 4.00 & 51.1 \\  & 1 & 4.95 & 19.8 \\ \hline Situation 2, classic fitness method & 0 & 3.53 & 57.5 \\  & 1 & 3.58 & 14.4 \\  & 2 & 1.87 & 20.0 \\ \hline Situation 2, radar fitness method & 0 & 1.92 & 69.9 \\  & 1 & 7.00 & 22.7 \\ \hline Situation 3, classic fitness method & 0 & 4.17 & 33.3 \\  & 1 & 3.14 & 15.0 \\ \hline Situation 3, radar fitness method & 0 & 4.65 & 29.7 \\  & 1 & 2.59 & 17.7 \\ \hline Situation 4, classic fitness method & 0 & 2.59 & 124.6 \\  & 1 & 1.69 & 98.5 \\  & 2 & 1.97 & 47.3 \\  & 3 & 0.66 & 30.1 \\  & 4 & 0.99 & 54.1 \\  & 5 & 3.25 & 57.7 \\ \hline \hline Situation 4, radar fitness method & 0 & 2.88 & 126.7 \\  & 1 & 1.51 & 86.2 \\  & 2 & 2.35 & 36.5 \\  & 3 & 4.49 & 60.2 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Navigational data for the presented situations.  
The program performing calculations related to evolutionary algorithms and visualizing their work has the ability to switch between the tested algorithms, in this case between the algorithms described in Algorithm 1 and Algorithm 2, which allowed for a comparison of their work.