# Navigation of Autonomous Tug via Evolutionary Algorithms with Radar Plot Fitness Evaluation
## 2 Determining a Local Passage Route Using Evolutionary Algorithms
The first criterion is the number \(n\) of waypoints of the passage route, the second is the length of the route \(L_{r}\), the third is the total course change \(\theta_{k}\), the fourth is the time \(t_{t}\) required to  
Figure 1: Diagram of elements used to determine the passage route. cover the route, and the fifth criterion is the minimum approach distance to any of the static or dynamic constraints, calculated as a multiple of the minimum distance from a given constraint that must not be violated. Algorithm 2 presents a description of the individual steps for the evolutionary algorithm with the radar fitness evaluation method. ```
BEGIN  Load navigational data  Initialize random population, encode data on chromosomes  LOOP Iteration over set number of iterations  LOOP Calculate fitness of every individual: (a) Get number of route sections \(n\) for individual (b) Calculate length of route for indicidual according to Equation (1) (c) Calculate total course change \(\theta_{k}\) according to Equation (2) (d) Get speed for each route section, calculate route time \(t_{t}\) according to (3) (e) Find the minimal distances to static and dynamic constraints (e)  Calculate radar plot area with data from steps (a) to (e)  Select best individuals  Crossover best individuals  Apply Mutation operators  Update number of iterations, check if reached maximum  Return result solution END
```  
**Algorithm 2**Evolutionary Algorithm with Radar Plot Fitness Evaluation calculation steps  
Figure 2 shows the course of three hypothetical navigation routes, while Figure 3 shows the corresponding radar chart showing the degree of fitness of individuals corresponding to these routes. Figure 2: Examples of 3 individuals representing navigation routes subject to fitness assessment using the radar method. The presented radar chart using five criteria is only a basic chart. It is possible to extend the scope of optimization with additional parameters, e.g., change in the ship's speed or the impact of environmental conditions such as sea currents, wind, shallow waters, on the ship's motion resistance. The presented routes are marked with the colors: red, blue and green. The red route is characterized by the shortest distance to cover, but it contains many turning points and the associated change in course is also large. A large number of maneuvers led to the route covered the fastest, but at the expense of safety, because it runs quite close to navigational restrictions--land and one other ship. The second route, marked in blue, has fewer turning points, but they are performed at a large angle, which also resulted in an extension of the route and the time required to cover the route. The last route represented in green has only one turning point and despite a slightly longer route than the blue route, it does not have to perform an anti-collision maneuver with the other ship, because it leads from the other side of a static navigational obstacle--an island. Despite not having the shortest distance to cover, the route marked in green is characterized by the best degree of adaptation, due to the largest field on its radar chart. The blue route is characterized by a medium degree, and the red route by the smallest. This method of representation allows for a quick visual analysis of the results obtained when testing a selected set of rules that comprise a radar chart, which makes it possible to quickly compare several sets of rules and select the one that is characterized by the best results for a given type of navigation situation.