Genetic algorithm-based multiple moving target reaching using a fleet of sailboats

: This paper addresses the problem of Dynamic Traveling Salesman Problem (DTSP) for a multi-agent system using a ﬂeet of sailboats. A genetic algorithm (GA) is proposed which attributes to each agent a varying number of targets to be collected. GA allows to obtain a suboptimal solution in the shortest time possible. Moreover, this paper adapts it to the speciﬁc problem involving a ﬂeet of sailboats, which is a challenging task with comparison to Unmanned Surface Vehicle (USV) or motorized vehicles in terms of the propulsion. Therein motors can be ﬂexibly controlled while sailboat movements are constrained by available wind direction and speed. Thus the method takes into account wind conditions at various locations of the sailboat. Simulation results demonstrate the effectiveness of the proposed approach.


Introduction
For the past decades, the development of marine robotics has been stimulated by the needs of oceanography and ocean exploitation. Considerable progresses have been made in developing and using various platforms of autonomous marine systems.
Despite of their limited speed and wind dependence, autonomous sailboats have the potential for marine science as their use of renewable solar and wind energies is fit for long-duration missions. Other potential applications such as surveillance and mapping generate further interest in them. Autonomous sailing is however faced with two inherent difficulties: the sailboat velocity is indeed uncontrollable at certain orientations such as upwind, and there is also an absence of accurate control for the boat velocity in many cases; the maximal velocity of sailboats depends entirely on the wind speed. Thus, while the position and the speed of surface vehicles can be controlled by motors, the limitation on the speed of sailboats and the wind conditions must be taken into account. Many low-level and high-level control systems designed for sailboats can be found in the literature [13,14,18,20,21,24,25] to follow line, avoid obstacles, path tracing or reach a target point. This paper focuses on the problem of a fleet of sailboats to collect data from moving targets (buoys, fish, boats), as an application of the Dynamic Traveling Salesman Problem (DTSP).
The Travelling Salesman Problem (TSP) probably represents the most studied optimization problem. However, the problem involving moving targets, or Dynamic TSP (DTSP), is still an open issue. To solve DTSP, several methods exist using for example Ant Colony Optimization (ACO) [1,2,12], Genetic Algorithm (GA) [3,9], Integer Linear Program (ILP) solvers [22,23] or Self-Organizing Map (SOM) [7,26]. ACO obtains good performance for DTSP where cities appear and disappear, but are completely inappropriate for moving targets. Genetic Algorithms (GA) [3,9] offer a sub-optimal trajectory with the most reduced time or distance to collect targets, but require a long processing time and there lack of approaches in the literature for attributing targets to a multi-agent system (MAS). ILP solvers [22,23] and SOM [7,26] allow to obtain results with less calculation time. However, ILP solvers require specific configurations such as targets moving with zero accelerations and following linear paths while SOM's trajectories for moving targets are not optimal.
In this paper, the GA developed in [3] has been improved by adapting it to a multi-agent algorithm for tracking multiple targets simultaneously, and by adapting this algorithm to the particular problem coupled with sailboat dynamics using a method similar to [4]. It allows to control a fleet of pursuers like in [7,26] but with an optimal trajectory of the shortest time to collect all targets like in [3]. However, in opposite with [4], this work is adapted to sailboat dynamics and various wind conditions. We focus here on wind influence, but other oceanic data, like waves or surface currents, can be added in a similar way.
The main contribution of this paper is twofold: first, the proposal of a genetic algorithm for collecting moving targets using a multi-agent system and coming back home after retrieving their targets; second, the adaptation of this GA to the particular problem involving a fleet of sailboats to collect buoys by taking into account wind conditions changing with time and space.
The potential application of this method is to use sailboats for picking up buoys previously cast off in sea and to bring them back to the base. For that, the paper is divided into two main parts: the first part presents the genetic algorithm that finds the smaller time to collect all the moving targets, to return to the initial position, and to choose the number of targets for each agent; the second part adapts the proposed algorithm to the sailboat problem. A calculation of interception time and position is proposed, using an approximation of the average sailboat velocity to reduce the processing time in the loop of the GA. This average velocity takes into account several varying parameters such as wind direction and speed.
The rest of the paper is organised as follows. The related work is introduced in Section 2. Problem statement is described in Section 3. Genetic algorithm is exposed in Section 4 with its parent selection, crossover and mutation in Sections 4.4, 4.5 and 4.6, respectively. The method of target attribution is explained in Section 4.3. The adaptation of the GA for a fleet of sailboats is described in Section 5 and 6, where a method to evaluate an average sailboat velocity and target interception position are proposed in Section 6.2 and 6.1. Section 7 presents some simulation results. Section 8 concludes the paper.

Related work
The Traveling Salesman Problem (TSP) probably represents the most studied optimization problem. It can be presented as a sub-problem in many transportation and logistics applications, for example, finding the shortest path for vehicles or the fastest path to collect data using a robot. TSP can be divided into a multitude of different problems [15,19]. However, the literature on TSP is still rare with regards to moving targets, like in fishing [3], surveillance [11] or in military applications [5,23]. These research topics are grouped under the title of "Dynamic Traveling Salesman Problem ", DTSP, with two main versions existing in the literature. The first one consists of inserting or deleting cities into a given problem instance [1,2,12] and the second keeps constant the number of cities but changes the distance among them [5,22,23], addressing for traffic jams, highways, or the collection of data with moving targets.
In [1,2,12], an Ant Colony Optimization (ACO) algorithm was proposed to solve DTSP due to their strong adaptation capabilities. When a new city appears, the knowledge of old optimization is transferred to the new scenario, and so as to reduce the calculation time. The proposed algorithm maintains a good balance between the computation time and the quality of the solution through effective local search algorithms. However, ACO can only be used for the first version of the DTSP, and it is not adapted to move targets, which is the focus of this paper.
Another adapted method for DTSP is the Genetic Algorithm (GA). In [9], a GA-based method is proposed based on the prediction of target trajectories for solving DTSP problems. A genetic algorithm is a meta-heuristic method inspired by the process of natural selection to generate high-quality solutions to the optimization problem. GA starts with initializing the population with randomly generated but feasible solutions. Each solution is then evaluated by using a fitness function describing the desired configuration, for example, the shorter time or distance to reach all the targets. A selection of parents is made to generate children through crossover and mutation from parents. Children become the new population and the reproduction cycle continues. In [9], each target is moving in a direction at a constant velocity from an initial position, and the pursuer starts from the origin at a constant velocity. Two different crossovers are used with the guarantee that if the two parents are valid tours, the child is also a valid tour. A most evolved GA is proposed in [3]. This one evaluates its fitness to reduce the final time of a vessel to collect moving buoys. A simple prediction of future locations of the buoys is evaluated using Newton's motion equations based on historical real data provided by GPS fitted on buoys. Comparisons between the proposed method and Nearest Neighbor (NN) or simple Genetic Algorithms GA-TSP method are provided. It is worthy noting that the assumption made therein is that only one pursuer rather than multiple pursuers is engaged to collect the targets. In [4] the same approach to [3] is discussed with the extension to a multi-agent system for fishing boats.
[5] is one of the first papers that study DTSP directly rather than the adapted TSP to a single or multiple pursuers. It proposes and proves a geometric optimal solution to minimize the time to collect targets moving with a zero acceleration and following linear path passing through the origin. Each pursuer has to catch one target and come back to the origin before starting the next target. A similar configuration is studied in [22,23]. Here, the DTSP is studied for the application of multiple weapons to multiple target assignments, where the weapons play the role of the salesmen, and targets play the role of the cities to be visited. The specific constraint here is that the problem needs to be solved in a very short time. The algorithm turns out to be a modern ILP solver, allowing to solve instances of relevant size for a weapon-to-target assignment problem in a reasonable short time. The solutions are often globally optimal. However, the chosen constraints make these two problems limited to a specific configuration.
In [7,26], a SOM-based approach is proposed to control a team of AUVs to visit moving targets in a dynamic 3-D ocean current environment. This method can deal with complicated cases such as the number of AUVs is smaller or larger than the number of targets. Initially, SOM is used to define the shortest path between static targets, making it useful for energy saving. By updating continuously targets assignment to UAVs and taking into account current perturbations on UAVs and targets, the proposed algorithm adapts itself to reach the moving target and to choose a shortest path. Note the principle is to adapt assignments to current behavior without any effort to predict them, thus the trajectories are not optimal and could be improved if a target prediction becomes available. Moreover, adapting it to obtain the shortest time rather than the shortest distance in the presence of moving targets seems rather complicated.

Problem statement
In this paper, the problem can be summarized with the following assumptions: •N sailboats, also called agent, are deployed to collect N t moving targets with N ≤ N t . Each agent is numbered from 1 to N and each target is numbered from 1 to N t ; •Targets must be collected with the least time, i.e. a target is assigned to a particular sailboat if it is able to be at the target at the earliest possible time, even if it needs to travel a longer distance compared to other nearby sailboats; •Targets need to be recovered once by only one boat; •Targets cannot be added or removed during the mission; •Agents start in an initial "home " location and must come back to the "home " to complete its mission after they have reached their targets; •The number of targets attributed to sailboats is not necessarily equal, but each agent collects at least one target. Each target is represented by a number. For instance, [4,2,3,1] means that the sailboat has to recover target 4, then target 2, target 3 and finally target 1, before coming back to the home position.

Genetic algorithm
A genetic algorithm achieves a quasi-optimal solution from a random set of initial feasible solutions called population. From the initial generating population, each solution is then evaluated by using a fitness function describing the desired configuration. In our case it is the shortest time to reach all the moving targets. For that, a prediction for the movement of each target and a calculation for the interception time are required. Once the fitness is evaluated, a selection of the parents is made by organizing a competition between them. Children are generated from crossovers and mutations among parents, and then they become the new population. The reproduction cycle continues until a stopping criteria is reached. The best solution of each iteration is kept in memory to make the final choice.
In this paper, the GA has been built to minimize the distance to be travelled by the agent during the collecting process. The following subsections described the algorithm design. Figure 1 shows the flowchart of the algorithm. Note this algorithm can deal with all kinds of vehicles because time to perform manoeuvres are supposed to be negligible compare to time to reach the target (more details on these hypothesis will be provided in Section 5.1).

Initialization
As usual in genetic algorithms, the initial population is chosen randomly. Let define the population matrix Lpop of size  A solution associated to subject i is the order in which targets are to be collected by agents. Let also define the randomly split matrix L split of size Npop × (N − 1) associated to the population Lpop, with L split (i, :) is the split vector associated to the subject i. The split list L split (i, :) assigns the N t targets inside Lpop (i, :) to the N agents such that •Agent 1 has to collect targets [Lpop (i, 1) , . . . , Example: Suppose N = 3 agents {a, b, c}, and solution i is associated to the list Lpop (i, :) = [2, 4, 1, 3, 7, 6, 5] with the split list L split (i, :) = [3,5]. Thus Agent a pursues [2,4], agent b pursues [1,3] and agent c pursues [7,6,5].
Let N k be the number of targets collected by Agent k such as The fitness of each solution is evaluated as described in the Section 4.2.

Fitness evaluation and fitness list
For each subject i in the population, let f i be the fitness of the subject i and F i ∈ R Nt be the list of fitness discrepancy. The fitness f i of the solution corresponds to the time performed by the slowest agent in the fleet to collect all its targets and to return back home. Let define also the following sum of fitnessf i,k and f i,k .f i,k is the fitness of an Agent k in the solution i: it is to be used for fitness calculation. f i,k is the fitness of an Agent k in the solution i when the agent reaches the second last target, and will be used in Section 4.3. One has where j min,k and j max,k are respectively the index of the first and last targets collected by agent k inside list F i . Thus, one has The fitness evaluation can be expressed with the following Algorithm 1.

Algorithm 1: fitness evaluation
Require: Initially, let F i = 0 Nt×1 be the current fitness, t = 0 be the current time instant, n = 1 be the current agent index and pn = [0, 0] be its initial position.
, the next agent is selected: then take t = 0, t old = 0 and n = min (n + 1, N − 1). end if • Take the target k = Lpop (i, j) and evaluate its current position p t k (t) (using for example Section 5.3). • Using p t k (t) and current Agent n position pn (t), evaluate their interception pointp (k, n) and interception time t k,n > t (using for example Section 6.1).
• Update Agent n position, fitness and time : take t old = t, • Agent n has reached all its target. Evaluate time t 0,n to come back to home.

Update target distribution
To balance the time performed by agents, L split needs to be updated. An equal distribution of the targets is not always a good option because some targets can be collected quickly by one agent while others can be very far from the group requiring one dedicated agent to collect it. The target attribution is chosen to reduce the global fitness f i by balancing the individual fitnessf i,k . For that, fitnessf i,k after Agent k coming back home is compared with fitness of other agents reaching their second last target f i, . If this fitness is lower, one target of a slower agent is attributed to Agent k. The second last target is chosen to compare fitness. Remind that each agent needs to collect at least one target.
Since the fitness of an agent must be re-evaluated when its number of targets has been modified. Only one modification by agents is allowed in the following approach. Let q = 0 Nt be the binary test variable to manage it. The method is described in Algorithm 2.
If ∃j ∈ [1, . . . , N ] q (j) = 1, the modification has been made on L split . A new evaluation of the fitness f i is required before conducting the parent's selection exposed in Section 4.4.

Parent's selection
Once the fitness of each solution has been calculated, a selection of these solutions is performed to become the parent of the next generation. N parent = Npop 2 are generated. For that, a Tournament Selection Method (TSM) is used as the selection procedure. TSM is a robust and simple method for selecting priority solutions with the best fitness, but with a chance to Algorithm 2: update fitness list for j = 1 : (N − 1) do for k = (j + 1) : N , do if q (j) = 1, then break : a modification has already be made for Agent j.
Agent k has at least two targets, it has not been modified yet and its fitness f i,k is larger than the fitness f i,j of Agent j, then Agent j takes a target to Agent k to balance their tasks i.e. Agent k has not been modified yet, Agent j has at least two targets and its fitness f i,j is larger than the fitness f i,k of Agent k, then Agent k takes a target to Agent j to balance their tasks select also a solution with bad fitness to keep genetic diversity for avoiding the convergence to a local minimum. TSM can be described as follows: 1.Select randomly two subjects (i, j) inside N parent with their associated fitness f i , f j and split list L split (i, :) , L split (j, :) . 2.Define the best subject using f i and f j .
We take here P T = 1 to ensure the best solution. As the tournament is performed by selecting randomly a couple of solutions, the diversity is not lost because two solutions with a large fitness can also be selected. A loop is performed to select the N parent . Solution Lpop (i, :), split list L split (i, :) and fitness list F (i, :) of a chosen parent i are stocked inside the lists L parent , L parent, split and F parent . Once the N parent parents from the initial population have been chosen, a crossover or mutation is provoked for each parent with a probability of Pcross and P mut = 1 − Pcross. Two descendants from each of the N parent parents are generated to recreate the new generation of Npop subjects. If the crossover is selected for parent 1, another parent 2 is chosen randomly from the other remaining N parent − 1 parents. Two children are generated from each parent. Children are stocked inside the list L child of size Npop × N t and L child, split of size Npop × (N − 1).

Crossover
Crossover is a method where the child inherits the characteristics of two parents for obtaining a better result. Crossover operator is chosen with probability Pcross, taken here Pcross = 0.7. In case of crossover, the second parent is selected randomly. A modified crossover inspired by the Greedy Crossover Method and adapted for our specific problem is proposed here.
For a couple of parents (i, j) ∈ [1, . . . , N parent ] 2 , let define the parent 1 with the route R 1 = L parent (i, :), fitness list F 1 = F parent (i, :) and slip list S 1 = L parent, split (i, :). Similarly, let define R 2 , F 2 and S 2 for the parent 2. Finally, let R child, 1 ,S child, 1 and R child, 2 , S child, 2 be the attributes of children.
Given the two parent routes R 1 and R 2 , the first offspring is built with the following steps: A) Choose a random number b inside [2, . . . , N t − 1]. B) Check if the route leading from 1 to b or from b to the N t is the same in both R 1 and R 2 , i.e. R 1 (1 If f 1 ≤ f 2 , take S child, 1 = S 1 and S child, 2 = S 1 . Else, take S child, 1 = S 2 and S child, 2 = S 2 . 2.If R 1 (b : end) = R 2 (b : end), (a)Update children route: and R child, 2 (b : N t ) = R 1 (1 : b). (b)Define children split list: Evaluate f 1 = Nt j=b F 1 (j) and f 2 = Nt j=b F 2 (j). If f 1 ≤ f 2 , take S child, 1 = S 1 and S child, 2 = S 1 . Else, take S child, 1 = S 2 and S child, 2 = S 2 . C) Otherwise 1.the fitness of R 1 and R 2 of the b's right edge are compared, i.e. f 1 = b j=1 F 1 (j) and f 2 = b j=1 F 2 (j). The shorter one is chosen as base for first children route The shorter one is chosen as base for the second children route, i.e. if f 1 ≤ f 2 , take R child, 2 (b : N t ) = R 1 (b : N t ) and S child, 2 = S 1 , else take R child, 2 (b : N t ) = R 2 (b : N t ) and S child, 2 = S 2 . D) To complete S child, 1 and S child, 2 , build a new route using the fitness of the both parents or each one 1.For S child, 1 (or S child, 2 ) , if S child, 1 (1 : b) has already be defined, thus for p from b + 1 to N t : (a)Put a = S child, 1 (p) and find the ranks n 1 and n 2 of element a inside the list S 1 and S 2 , i.e. find S 1 (n 1 ) = a and S 2 (n 2 ) = a.

Mutation
Mutation is used to preserve and introduce genetic diversity. It avoids the algorithm to converge to a local minimum when the population is similar. Mutation operator is associated with a mutation probability P mut such P mut = 1 − Pcross, taken here P mut = 0.3. Different mutation types exist (Flipbit, Boundary, Gaussian, etc.), but the simplest one where only one modification is made with an equal probability for each element is chosen here. First, take one parent L parent (i, :) with L split (i, :) and give its information to the child such as R 1 = L parent (i, :) and L 1 = L split (i, :). Two elements of the list R 1 are exchanged randomly following a uniform distribution. It allows mixing targets inside an agent list and/or exchange targets between two agents in the same operation. However, the split list L 1 stays unchanged by the mutation. This operation maintains the genetic diversity of our population and ensures proper convergence of the algorithm.
Perform this operation twice with the same parent to obtain two children R 1 and R 2 . Stock R 1 and R 2 inside the list L child and S 1 and S 2 inside the list L child, split .

New generation
Once the Npop children have been generated from the initial population, the children become the new population such Lpop = L child and L split = L child, split , and cycle from Section 4.2 to Section 4.7 continues. Before updating the population, the solution S min of the current population with the best fitness f min is compared to the best solution of all previous loops noted S opt , L split,opt , f opt . If f min ≤ f opt , the solution is stocked to become the new optimal solution, i.e. S opt = S min , L split,opt = L split,min , f opt = f min .

Stopping criteria
This process finishes when the number of loops achieves a chosen Nmax = 1000 iterations without any fitness improvement, or when 10000 iterations have been performed for avoiding an infinite loop if the solution does not converge. The solution S opt , L split,opt is thus considered as the quasi-optimal route. This one reflects the shortest time to recover all the targets from the agents' initial position.

Dynamic model
The GA exposed in Section 4 can be performed for different agents and targets dynamics. In this paper, the problem is focused on targets, for example buoys, pursued by sailboats, and so the specific constraints of sailboat dynamics. In opposite to motorboats and USV that can control their position and velocity flexibly, the position and the velocity of sailboats depend on wind direction and speed. Moreover, autonomous sailboat has difficulty in accelerating or decelerating rapidly. Thus, the following sections expose the strategy for implementing the GA with sailboats. First, the dynamics of the sailboat and an approximation of its average velocity for variable wind conditions are to be exposed. Second, a method to evaluate the interception time with a target is provided, using the approximation of the sailboat velocity. This interception time is used in the GA.

Sailboat dynamics
The dynamic model of a sailboat is complex and it requires the knowledge of parameters difficult to obtain in practice. However, for a specific wind direction and speed, it is possible to create a diagram of the average velocity of a sailboat. Since the distance between two targets is supposed to be large here, the dynamic model can be simplified to assume a constant sailboat velocity for a defined orientation and wind speed. Moreover, the time to perform maneuvers are much smaller than the time to reach the target. This simple dynamic model allows to implement the algorithm with a modest processing time. Line following control for a sailboat has been studied in [8,10,17,18]. The sailboat k dynamics is approximated the following model: where T ≥ 0 a chosen time, p s,k = x s,k , y s,k , v s,k = V s,k cos θ s,k , sin θ s,k are the sailboat k Cartesian coordinate and velocity, with θ s,k the constant sailboat heading during t ∈ [t 0 , t 0 + T ] chosen to intercept sailboat target as exposed in Section 6, and V s,k is the average velocity of the sailboat during t ∈ [t 0 , t 0 + T ], function of θ s,k and wind parameters as exposed in Section 5.2.

Current sailboat velocity
Sailboats' velocity depends on the apparent wind direction ψaw and the apparent wind speed vaw, which can be evaluated from the current sailboat direction and speed and the true wind direction ψ tw and the wind speed v tw . As shown in [6,21], a diagram of the average velocity of a sailboat with regards to the wind direction can be plotted using only the true wind, see Figure 2. Thus, one may write V s,k = f θ s,k , ψ tw , v tw where f is a known function corresponding to the polar diagram of the sailboat velocity.
Let [ψ tw + π − δ, ψ tw + π + δ] with the hauled angle δ be the dead area where sailboat is considered as upwind (pink area in Figure 2), with δ is taken equal to π 4 . When a desired orientationθ s,k is inside the dead area, the sailboat needs to perform tacks at 45 • aroundθ s,k : the distance performed to be multiplied by two, which is equivalent to the sailboat travelling in the direction θ s,k =θ s,k with a velocity divided by two. Thus, the sailboat velocity model can be approximated by where f is a known function corresponding to the polar diagram of sailboat velocity, for example, Figure 2. In the same way, one may define which is the velocity of the sailboat when it follows a tacking trajectory. These notations are to be used in the next sections.

Target moving prediction
The literature offers different methods to simulate and predict current movements in the sea [16], but all are based on complex models and require the values of those parameters that are difficult to obtain. Thus a simple model is used here to reduce the processing time for the GA.
The Newton's motion equation is considered to evaluate target dynamics: where p t,k , v t,k = V t,k cos θ t,k , sin θ t,k and a t,k are the target k coordinate, velocity and acceleration, and T a discrete time. Suppose we have access to v t,k and a t,k using a method like Time series, Newton's motion equation or by tacking them constant. The comparison of these three methods is provided in [3]. Note in these methods a t,k is very small. In [3] for example, future locations of the buoys are evaluated using Newton's motion equations based on historical real data provided by GPS.

Target interception
To define the fitness in the GA, the interception instant and the position between the sailboat and its target is required. The following sections explain how to find them with different constraints due to the wind conditions.

Interception time calculation
Consider the first sailboat velocity, noted V * s (t 0 ), at the initial instant t = t 0 can be evaluated using Section 6.2 with the first evaluation of the sailboat orientation where p * t = [x * t , y * t ] = [xs (t 0 ) , ys (t 0 )], ps (t 0 ) = [xs (t 0 ) , ys (t 0 )] and ps t f = xs t f , ys t f . For initial position of the sailboat ps (t 0 ) and the target p t (t 0 ), the interception time t f can be expressed as t f = t 0 + T where T can be found by solving similarly for a t,x and a t,y . The corresponding proof is provided in 9.1. The value of T is the smallest positive real part of these solutions. If no solution corresponds to this criterion, it means that the sailboat cannot reach the target. Using T , the intersection time t f = T + t 0 and the interception position p t t f = p t (t 0 ) + v t (t 0 ) T + 1 2 a t,k (t 0 ) T 2 can be defined. From it, one may find the desired orientation of the sailboat ∀t ∈ t 0 , t f The evaluated orientation θs (t 0 ) induces a new evaluation of the sailboat velocity Vs (t 0 ) using θ * s (t 0 ) and taking p * t = Fig. 3: Map of wind distribution , a second evaluation of T is required using V * s (t 0 ) = Vs (t 0 ) and p * t = p t t f .

Average sailboat velocity during interception
In practice when vessels sail on a large area, the wind direction and speed are not identical at all positions and they are changing with the time, influencing the sailboat velocity and so the interception point. An average value of the sailboat velocity Vs must be defined by taking into account these conditions. However, since evaluating the true average sailboat velocity by taking into account variations is complicated and time consuming, an approximation of this average value is performed by taking a fixed number of points N dif f between the initial position of the sailboat and its target. These ones are defined at an equal distance of each other, and their number is proportional to the number of changes. This method allows performing the velocity approximation in a short time for the GA.
Wind matrices Let first define the wind distribution map Mw divided in a grid of size N h × Nv. The wind orientation and velocity are supposed to be identical inside a square as shown in Figure 3.
Let M ψ (t) and Mv (t) be matrices of wind orientation ψ tw and velocity v tw which contain the different values of ψ tw , v tw corresponding to the wind map distribution. For example, M ψ (1, 1) (t) = −π 4 corresponds to the first case in the map of the Figure 3. Assume there exist a duration ∆tc such M ψ (t) and Mv (t) can be considered constant during this interval I = [t, t + ∆tc], i.e. ∀ (t 1 , t 2 ) ∈ I M ψ (t 1 ) ≈ M ψ (t 2 ) and Mv (t 1 ) ≈ Mv (t 2 ). The wind data are supposed to be collected using systems like NOAA or CMEMs.
Let define the index coordinate P t (t) ∈ [1 : N h ] × [1 : Nv] of the target coordinate p t inside Mw. In the same way, let define Ps for the sailboat coordinate ps. Notation M ψ (Ps) (t) corresponds to the value of the wind orientation for the sailboat at time t.
Choice of N dif f Let define the distance d st = (x * a first rude approximation of the time required to reach target position with the minimum velocity of the sailboat. Then, one may define where x is the whole part of x. One may observe: •N dif f = 2 if P t = Ps, i.e. the sailboat and the target are in the same area with similar wind conditions, and ift ∆tc < 1, which means the sailboat catches its target before wind conditions have changed significantly. Thus, only two points, the initial position and the final position, are used to measure the wind conditions and to evaluate the sailboat velocity. •N dif f = 3 if •P t and Ps are two adjacent areas with two different wind conditions. Thus, take the initial position, the final position and a middle point to know in which area the sailboat travels during the longest time (for example, if the target/sailboat is close to an edge of an area, the distances inside areas are not equal).
•P t and Ps are in the same area but the traveling time is enough for wind conditions to change significantly. Thus, take the initial position, the final position and a middle point to know in which wind condition the sailboat travels during the longest time.
•P t and Ps are in two distant areas. N dif f is chosen to be large enough to take at least one measurement in each crossed area plus one. For example, if Ps = (1, 1) and P t = (1, 4), the sailboat needs to cross 4 areas, thus N dif f = |1 − 4| + 2 = 5, the 4 areas plus one.
•P t and Ps are in the same area, but the sailboat moves slowly with comparison to the change of wind conditions. Similarly with the previous points, N dif f is chosen to take a measurement for each wind condition. •Combination of both previous cases.

Average velocity calculation
are target value defined in Section 6.1, •Evaluate the index coordinatePs (t) associated tops •Take ψ tw = M ψ P s (t) (t) and v tw = Mv P s (t) (t).
•Evaluatev using ψ tw , v tw and θs with the method exposed in Section 5.2 •Evaluatev using method exposed in Section 5.2 by taking ψ tw = M ψ (P t (t)) (t), v tw = Mv (P t (t)) (t) and θs. Take v = v +v N dif f Choose V * s (t 0 ) = v (or Vs (t 0 ) = v respectively) in Section 6.1.

Simulation
In this section, the result of the proposed GA algorithm is compared with the performance of the algorithm exposed in [4]. Since [4] studied fishing motor boat and not sailboats, the new prediction of the sailboat velocity and targets interceptions exposed in Section 6 are used in the existing GA algorithm to obtain a fair comparison between these two methods. Moreover, "home" has been added as a final target to reach in the previous GA to come back at the initial position. Major difference between these two algorithms is the second part of the crossover which manages the number of targets assigned to each agent. In [4], an asexual crossover is employed.
Let N = {N 1 , . . . , N N } be the set of number of targets collected by each agents and let N tour be the number of iterations made by the GA to find a solution. Figures 4 (a),(b),(c) and (d) compare the results of these two methods. Target positions and orientations are chosen randomly. In Figure 4 (a) and (b), paths selected by both approaches are evaluated without taking into account the wind direction. In Figure 4 (c) and (d) where the effects of the wind direction are added. The trajectory evaluated by the GA allows the sailboat to collect targets while avoiding certain configurations such as going upwind (bold lines).
In Figure 5, a configuration in cross is chosen to obtain a simpler configuration to understand. Two different velocities of the target are chosen, V t = 1 and V t = 0.5, and the maximal sailboat velocity is Vs = 8. For V t = 0.5 in Figure 5 (a) and (b), one may observe that the solutions found by the proposed GA and the existing GA are close. However, when V t = 1 in Figure 5 (c) and (d), the targets are sparse. In this configuration, the tasks for collection become more challenging. The random selection of the population at the beginning of the GA makes the optimal solution difficult to find. A SOM like [7,26] could obtain a better performance than the GA approaches for this particular configuration while these two GA methods can be more efficient than the SOM in other complex configurations.
It can be observed that the proposed GA fitness is smaller than the existing GA fitness while the existing GA converges faster to its final solution. It can be explained by the second part of the crossover, which makes the number of targets assigned to the agents less stable and so the evaluation of its fitness. This allows to better balance the mission time between sailboats.

Conclusion
In this paper, a genetic algorithm for collecting multiple moving targets using a multi-agent system is provided. This proposed algorithm finds the shortest time to collect all the moving targets and come back to the initial position. A new method to choose GA.  the number of targets to attribute to each agent has been developed so as to reduce the overall time of the mission. This method can be easily adapted to different kinds of vehicles.
Adaptation of this genetic algorithm for a fleet of sailboats is also provided. A calculation of interception instant and position is proposed. This proposed algorithm uses an approximation of the average sailboat velocity to reduce the processing time in the loop of the GA. This average velocity takes into account several parameters such as wind direction and speed, which change with the time and the localization of the sailboats. Simulation results show the effectiveness of the proposed method with comparison to a existing GA.
In future work, the attribution of targets to agents is to be explored so as to guarantee an optimal configuration for some particular scenarios, for example, when the targets are grouped in a small stack.