# Comparison of Heuristic Algorithms in Discrete Search and Surveillance Tasks Using Aerial Swarms
## 3 Proposed Search Algorithm, a Set of Behaviors: A1
### Search Behavior
#### 3.1.2 Cell Types and Properties  
The properties of each discretization cell, i.e., the concentration, creation and diffusion of pheromones, variables \(\phi_{i,j}^{k}\), \(D_{i,j}^{k}\) and \(S_{P_{i,j}}^{k}\) associated with the cell \((i,j)\) at moment \(k\), depend on three types of cells:  
* Non-observed cells: cells that have not been observed yet: \[S_{i,j}^{k}=S_{no}\] (17a) \[D_{i,j}^{k}=D_{no}\] (17b)
* Observed cells: cells already observed by any agent: \[S_{i,j}^{k}=S_{o}\] (18a) \[D_{i,j}^{k}=D_{o}\] (18b)
* Recently-observed cells: if a cell has just been observed, there is n instantaneous drop of its pheromone concentration of: \[\Delta_{ro}\phi_{i,j}^{k+1}=\delta_{ro}\cdot\phi_{i,j}^{k}\] (19) where \(\Delta_{ro}\) indicates variation due to the fact that the cell has recently been observed and \(\delta_{ro}\in[-1,\ 0]\). This drop is accounted only once, so that at the next time step, a recently-visited cell becomes a regularly-visited cell. * Isolated cells: Each non-observed cell has associated a so-called isolation index, \(\theta_{i,j}^{k}\), which is the number of observed cells surrounding it. If the cell has already been observed, its isolating index is forced to be equal to zero. Every time step the isolation index changes, there is an increment in the pheromone concentration of: \[\Delta_{\theta}\phi_{i,j}^{k+1}=\rho_{\Delta\theta}\cdot\Delta\theta_{i,j}^{k+ 1}\cdot\phi_{i,j}^{k}\] (20) where \(\Delta\theta_{i,j}^{k+1}\geq 0\) is the variation of the isolation index from time \(k\) to \(k+1\): \[\Delta\theta_{i,j}^{k+1}=\theta_{i,j}^{k+1}-\theta_{i,j}^{k}\] (21) The parameter \(\rho_{\Delta\theta}\geq 0\) makes the concentration increase when its isolation index changes. Moreover, there is an extra pheromone creation proportional to the isolation index in these cells: \[\Delta_{\theta}S_{i,j}^{k}=\rho_{\theta}\cdot\theta_{i,j}^{k}\] (22)In Figure 4, the above-mentioned cells have been represented. The white discretization cells have not been observed yet. At each time step, the cells that have just been observed become recently-observed cells, in dark green. In the next step, those cells become regular observed cells, in light green. Note that even though there may be a variation in the isolation index at position \((w,h)\), the variation of the isolation index is forced to be zero, since the cell becomes observed. In the example shown in the figure, the pheromone concentration in those four cells will suffer a variation, exclusively due to the type of the cell (\(\Delta_{tc}\)), of:  
\[\Delta_{tc}\phi_{i,j}^{k+1} =S_{o}\cdot\Delta t \tag{23}\] \[\Delta_{tc}\phi_{i-1,j+1}^{k+1} =S_{no}\cdot\Delta t+\Delta_{\theta}\phi_{i-1,j+1}^{k+1}=(S_{no}+ \Delta_{\theta}S_{i,j}^{k+1})\Delta t=(S_{no}+\rho_{\theta}\cdot\theta_{i,j}^{ k+1})\Delta t\] \[D_{i,j}^{k}=D_{no}\]0 \[D_{i,j}^{k}=D_{no}\]1  
Besides these changes in the concentration of pheromones, the natural diffusion, Equation (15), will also apply during each time step. If there is a prior probability distribution of the possible location of the targets, it can be easily implemented in the algorithm. Given a probability distribution \(q_{t}(x,y)\), each discretization cell \((i,j)\) is assigned a probability value \(p_{t_{i,j}}\):  
\[D_{i,j}^{k}=D_{no}\]2 \[D_{i,j}^{k}=D_{no}\]3  
being therefore:  
\[D_{i,j}^{k}=D_{no}\]4  
and this probability distribution is finally normalized with the maximum value:  
\[D_{i,j}^{k}=D_{no}\]5  
\[D_{i,j}^{k}=D_{no}\]6 Types of cells in the search behavior. The white cells have not been already observed. The light green cells are the already observed cells, whereas the darker green are the cells just observed. and therefore, \(0\leq p_{t_{i,j}}\leq 1\). The sources of pheromones, as well as the initial value of the pheromones (see Equations (15a) and (16a)) are then multiplied by the associated normalized probability \(\tilde{p}_{t_{i,j}}\). In this way, the regions where it is more probable to find a target generate more pheromones, and the agents are more attracted to them.