## 3 Material and Methods
### Methodology
#### 3.2.1 Swarm Intelligence Algorithm
In CSA, the concept of deception is incorporated in a SI algorithm. According to the pseudo-code in the Idle-CSA Algorithm 2, one FP can operate as both a position giver and a position receiver at the same time. The per iteration update formula in CSA is as follows. \[X^{i,iter+1}=X^{i,iter}+r_{i}xf^{i,iter}\big{(}m^{j,iter}-X^{i,iter}\big{)} \tag{2}\]  
Notation: \begin{tabular}{l l} \(X^{i,iter}\) & Position of crow \(i\) at time \(iter\) in search space; \\ \(r_{i}\) & Random number with uniform distribution between 0 and 1; \\ \(fl^{i,iter}\) & Denotes the flight length of crow \(i\) at iteration \(iter\); \\ \(m^{j,iter}\) & Denotes either the position of hiding place of crow \(j\) at time \(iter\) \\  & or a random new location in search space (crows' deception). \\ \end{tabular}   
```
1:Initialize each FP position
2:Initialize each Tree position
3:Set reach of step; reach. 4:Set base position; basepos. 5:Set radius; radius. 6:while termination condition not satisfied:
7:Choose another FP randomly. 8:Get a response from that FP. 9:\(response=getResponse()\). 10:\(<\)case: receive position\(>\). 11:Define target move; \(m=response\)
12:Get current FP position; \(X_{current}\). 13:Calculate distance between target move and current FP position; \(d\). 14:Calculate new position; \(X_{new}=X_{current}+(m-X_{current})*r*d\)
15:Memorize position; \(X_{memory}=X_{new}\)
16:Update new position. 17:Calculate distance between FP and nearest Tree; \(d_{tree}=d(X_{new}-X_{tree})\). 18:if\(d_{tree}\leq 3\) (\(T_{nearest}\) found):
19:if FP carry poll of \(T_{poll}\
eq T_{nearest}\):
20:Pollination. 21:endif
22:endif
23:endif
24:\(<\)case: give position\(>\)
25:\(getResponse()\):
26:\(X_{memory}=X_{current}\). 27:if\(r>\) awareness. 28:\(response=X_{memory}\). 29:else
30:\(response=basepos+r-radius\). 31:endif
32:end getResponse
33:endwhile
```  
**Method 3:** Idle-Cuckoo Search via Levy Flights Algorithm  
Cuckoo search is an algorithm that combines the breeding activity of a certain cuckoo species with Levy flying behavior. Cuckoo search has two search modes: local search and global search, regulated by the redirect probability. As a result, the search space may be examined more effectively globally, increasing the probability of discovering the global optimum. This is because local searches use around one-quarter of the overall search time, whereas global searches use three-quarter of the total search time [26]. As an SI algorithm, the main difference compared to other SI algorithms is that a FP applies the position update of a different individual to itself instead of the other individual, resembling the parasitic habit of a cuckoo putting its eggs into another bird's nest. \[X_{i}^{(t+1)}=X_{j}^{t}+\alpha\bigoplus Levy(\lambda) \tag{3}\]  
Notation:  
\[X_{i}^{(t+1)} \begin{array}{ll}\text{Generating new solutions $X^{(t+1)}$ for a cuckoo $j$; Levy step is added}\\ \text{to position of individual $j$;}\\ \text{The step size which should be related to the problem scale;}\\ \text{Weight factor of Levy step;}\\ \text{Entry-wise multiplications.}\end{array} \]Furthermore, cuckoo search is more efficient since the global search uses Levy flights rather than the typical random walk. In Algorithm 3, we used the recommended value of 0.1 for step size \(\alpha\) to avoid too distant moves of FP. The details of the Levy flight will be discussed in the following algorithm, as this uses the same concept. ```
1:Initialize each FP position
2:Initialize each Tree position
3:while termination condition not satisfied:
4:\(FP_{current}\) choose another one random FP, \(FP_{1}\). 5: Get position of FP; \(X_{1}=FP_{1}\) position. 6: Calculate new position using Equation (3); \(X_{new}=X_{1}+RandomLevy()*0.1\). 7: Update new position
8: Calculate distance between FP and nearest Tree; \(d_{tree}=d(X_{new}-X_{tree})\). 9:if\(d_{tree}\leq 3\) (\(T_{nearest}\) found):
10:if FP carry poll of \(T_{poll}\
eq T_{nearest}\):
11: Pollination.