| Algorithm 3 Pseudocode of DBOA. |
| 1: Initialization part. |
| 2: Determine parameters of BOA algorithm. N—number of butterfly in population, n—dimension, c—sensor modality and a, , p parameters. |
| 3: Random generate starting population . |
| 4: Calculate the value of the fitness function F (hence intensity of the stimulus ) for each butterfly in population. |
|
Iterative part. |
| for do |
| for do |
| Calculate value of fragnance for with the use of Equation (13). |
| 5: end for |
| Set the best agent among the butterflies. |
| for do |
| Set a random number r from range . |
| if then |
| 10: Convert solution in accordance with the Equation (14). |
| else |
| Convert solution in accordance with the Equation (15). |
| end if |
| end for |
| 15: Change value of the parameter a. |
| Adopt the LSAM algorithm to convert the agents population with mutation rate . |
| end for |
| return . |