An adaptive bio-inspired optimisation model based on the foraging behaviour of a social spider

Abstract Existing bio-inspired models are challenged with premature convergence among others. In this paper, an adaptive social spider colony optimisation model based on the foraging behaviour of social spider was proposed as an optimisation problem. The algorithm mimics the prey capture behaviour of the social spider in which, the spider senses the presence of the prey through vibrations transmitted along the web thread. Spiders are the search agents while the web is the search space of the optimisation problem. The natural or biological phenomenon of vibration was modeled using wave theory while optimisation theory was considered in optimizing the objective function of the optimisation problem. This objective function was considered to be the frequency of vibration of the spiders and the prey as this is the function that enables the spider differentiates the vibration of the prey from that of neighbouring spiders and therefore forages maximally. To address the parameter tuning problem, the search pattern was controlled by the position of the prey for convergence. The proposed model was tested for convergence using several benchmark functions with different characteristics to evaluate its performance and results compared to an existing state of the arts’ spider algorithm. Results showed that the proposed model performed better by searching the optimum solution of the benchmark functions used to test the model.

Abstract: Existing bio-inspired models are challenged with premature convergence among others. In this paper, an adaptive social spider colony optimisation model based on the foraging behaviour of social spider was proposed as an optimisation problem. The algorithm mimics the prey capture behaviour of the social spider in which, the spider senses the presence of the prey through vibrations transmitted along the web thread. Spiders are the search agents while the web is the search space of the optimisation problem. The natural or biological phenomenon of vibration was modeled using wave theory while optimisation theory was considered in optimizing the objective function of the optimisation problem. This objective function was considered to be the frequency of vibration of the spiders and the prey as this is the function that enables the spider differentiates the vibration of the prey from that of neighbouring spiders and therefore forages maximally. To address the parameter tuning problem, the search ABOUT THE AUTHORS Samera Uga Otor is a lecturer at Benue State University, Makurdi, Nigeria. Her research interests are Cybersecurity and Green technology.
Bodunde Odunola Akinyemi is a lecturer at Obafemi Awolowo University (OAU), Ile -Ife. Her current research interest include Data communication and networking. She is a Member of the Nigeria Computer Society (MNCS) and a chartered IT practitioner (MCPN).
Temitope Adegboye Aladesanmi is a research partner at Cyber Security Lab., OAU, Ile-Ife, Nigeria. His current research interest include cyber security and risk mitigation. He is a chartered IT practitioner (MCPN) and a life member of the Nigeria Computer Society (MNCS).
Ganiyu Adesola Aderounmu is a professor at OAU, Ile-Ife, Nigeria. He is a fellow of the Nigeria Society of Engineers (FNSE) and the current president of the Nigeria Computer Society.

PUBLIC INTEREST STATEMENT
An optimisation problem is a process that finds the best or optimal solution to a problem by minimising or maximising the solution variable. Bio-inspired solutions are innovations inspired by nature that imitates the natural way to search for an optimal solution.
For an algorithm to perform maximally, userdefined parameters require proper tuning. In Bio-Inspired Optimisation models, the values of the parameters of the natural phenomenon used to model them are user-defined, thus leading to the need for the parameters to be tuned for convergence. However, most tunings are done with unpredictable user-defined parameters, which led to premature convergence, exploration and exploitation discrepancies, algorithm complexity and unrealistic results. Consequently, the Bio-Inspired solution search processes are faced with the challenge of parameter tuning for convergence.
This study aimed to improve the search process by developing a bio-inspired optimisation model capable of self-tuning its search pattern to achieve fast convergence while maintaining its balance in exploration and exploitation to avoid premature convergence while searching for an optimal solution. .

Introduction
Bio-inspired solutions are innovations inspired by nature or biology. Considering early researchers like Plato, Isaac Newton etc., whose findings were based on a natural phenomenon like air, water, fire, rainbow and gravitational force, every innovation in life can be traced back to nature. According to Benyus (2002), "bio-inspired solutions revolutionize how we invent, compute, heal ourselves, harness energy, repair the environment and feed the world". Bio-inspired innovators are driven by how nature solves every problem encountered in life. Furthermore, Forbes (2000) defined a bio-inspired solution as "the use of biology or biological process as means, inspiration, or enabler in developing new computing technologies and new areas of computer science and equally the use of information science concept and tools to explore biology from a different theoretical perspective".
Swarm intelligence is one of such solutions. It imitates natural way to solve a problem. It is a branch of artificial intelligence that deals with the cooperative behaviour of swarms of animals or insects that interact in a multifaceted way between individuals with no supervision or central controller. Such swarms include termites, bees, spiders whose colonies consist of the male, female, soldiers and foragers as the case may be. Each colony member performs well-defined duties such as reproduction, foraging, maintenance of the nest among others without a central controller. For instance, ants forage by tracing the shortest path to food source through simple pheromone trail and cooperatively builds and maintains the ant hill, honey bees perform marriage and forages through attractive waggle dance, fireflies mate through light attraction while spiders forage and mate through the exchange of vibration cues among others.
Bio-inspired optimisation solutions have some advantages such as scalability, fault tolerance, adaptation, speed, modularity, autonomy, and parallelism which makes them perform better as compared to the conventional solutions in many problem-solving approaches (Cuevas, Cienfuegos, Zaldívar, & Pérez-Cisneros, 2013). However, according to Yang (2012a), these algorithms have several limitations such as algorithm framework, optimal balance between exploration and exploitation, best performance measures, implications of free lunches as to how to find the best algorithm(s), automatic parameter tuning among others. Therefore, there is still room to improve on them by researching more on nature so as to develop a self-evolving algorithm that can automatically tune its behaviour to solve complex problems (Yang, 2014a).
Thus, this paper developed an optimisation model that mimics the foraging behaviour of the social spider called the Adaptive Social Spider Colony Optimisation (ASSCO) model for global optimisation with the view to provide a search pattern that is self-evolving with fast convergence while maintaining the explorative and exploitative capabilities of the optimisation solution.
The remaining part of the paper is organised as follows: section two gives a brief review of related works, section three describes the materials and methodology employed, section four gives a detailed analysis of results obtained from simulation and section five is the conclusion and future research areas opened up.

Related works
The bio-inspired family of techniques, that studies and emulates the behaviour of social animals as they collectively organize their nest, seek for the shortest paths to food sources from their nest for optimal foraging, or move from one place to another as an organised group to solve complex tasks are referred to as swarm intelligence. Such behaviour includes: waggle dances recruitment in bees, which results in optimal foraging, simple pheromone trail by ant as a result of seeking the shortest path to food source from the nest, flocking of birds and schooling of fish with collision avoidance, abiotic and biotic pollination of flowers as means of reproduction and monitoring of the spider web through information transmitted by vibration cues for foraging by social Spiders which is our focus.
While some spiders exhibit some form of aggressive behaviour towards one another as they forage, others exhibit some form of social behaviour (Maxence, Carly, Allen, & Avile´S, 2010;Yip & Eric, 2008). Therefore, in terms of foraging spiders are classified as solitary foragers, communalterritorial foragers and communal non-territorial foragers. Solitary foragers spin non-overlapping webs, they are aggressive, intolerant and cannibalistic during prey capture and feeding (Pekar, Hruskova, & Lubin, 2005). While communal-territorial foragers build individual webs, but these webs are connected together via web support thread (Greta & Rypstra, 1992), and communal nonterritorial spiders spin a common web, attack, feed on prey and maintain the web cooperatively with little or no aggression to other group members (Craig, 1991).
Several bio-inspired models have been developed over the years, they include: those based on collective behaviour of swarm such as the Particle Swarm Optimization (PSO) algorithm inspired by the social behaviour of flocks of birds and school of fish in attempt to accomplish a task (Kennedy & Eberhart, 1995), the Ant Algorithm Dorigo, Maniezzo, & Alberto, 1996;Marco & Alberto, 1996) and its variants (Sudip, Mohammad, & Prabhat, 2016), inspired by the foraging behaviour of ants, in attempt to find the shortest path from nest to food resulting in cooperative foraging, Bat Algorithm (BA) based on echolocation of micro-bats (Yang, 2010), Grey wolf algorithm based on hunting behaviour of Grey wolf (Mirjalili, Mirjalili, & Lewis, 2014), social spider algorithms based on the mating behaviour of spiders (Cuevas & Cienfuegos, 2014;Cuevas et al., 2013) and the foraging behaviour of social spiders (James & Victor, 2015), cuckoo search algorithm based on the parasitic behaviour of cuckoo birds (Yang, 2014b), and the firefly algorithm based on light attraction produced to attract mating partners by the opposite sex, potential prey and for protective warning against predators. Others are based on the behaviour of honey bees such as marriage in honey bees (Abbass, 2001), mating behaviour (Afshar, Haddad, Marino, & Adams, 2007) and foraging (Karaboga, 2005;Kumar & Kumar, 2013) which inspired the development of bee algorithms. Furthermore, the flower algorithm based on the study of abiotic (that is, a pollination that requires a pollinator such as insect to transfer the pollen grain) and biotic pollination (a pollination that requires no pollinator, but the pollen grains are carried by wind) of flowers was developed by (Yang, 2012b), In recent times, these Algorithms with little modification have been employed to address some real-life problems. For instance, the variants of Ant and Particle swarm Algorithms were used to design a scheduler for shop job assignment (Ulrich & Gunther, 2016;Zhang, Qin, Meng, Wang, & Zhu, 2016), also, the variants of Spider and firefly Algorithms were used to solve economic and power dispatch problem (Elsayed, Hegazy, Bendary, & El-Bages, 2016;Sulaiman, Daniyal, & Mustafa, 2012) clustering of dataset (Zhou, Zhou, Luo, & Abdel-Basset, 2017) and scheduling assembly flow shop problem (Zhang & Xing, 2018) among others.
Meanwhile, most of these algorithms mimic unquantifiable parameters such as pheromone trail, waggle dance among other and they are tuned with user-defined or unpredictable parameters (Sangita, Samir, & Sheli, 2014) for convergence. In lieu of this, to achieve success in nature's way of mimicking computing process there is a need to be mindful of the way the computer works by transmission of signals using time domain or frequency domain which are quantifiable parameters.
Therefore, the adaptive social spider colony optimisation model (ASSCO) developed in this paper did not only employ a self-evolving search pattern it also used quantifiable parameters such as frequency composition of the wave signal generated by the spiders and prey vibration to represent the objective function. ASSCO was modelled using a sinusoidal wave theory alongside the optimisation theory. It is well known that all waves can be expressed using several combinations of sinusoids by performing Fourier analysis on them. Hence, this study can easily be employed to develop real-life computing solutions.

Biological entity
In this paper, the biological concept mimicked is the foraging behaviour of social spiders as they communicate through vibration cues for optimal foraging on the web. Therefore, the biological entity is social spider. The social spiders considered in this work are cooperative web-building spiders. These spiders communicate through vibration signal transmitted on the spider web either to transmit information between individuals in the colony or to sense the presence of a prey on the web. Spiders use several methods to capture prey, ranging from actively pursuing the prey to cautiously following the prey, sitting-and-waiting to ambush and sometimes even prey attraction and aggressive mimicry (Uetz, 1992). However, most of them depend on the vibration cue. Spiders are known to differentiate between the vibration from prey and that of a neighbouring spider with all sense of alertness no matter how small the impact of the vibration is. Therefore, Social spider foraging is aimed at determining the position of prey through the vibration generated along the web by the captured prey.

Theories employed
The theories employed are the optimisation and wave theories. The spiders communicate through vibration signals transmitted along the web thread to accomplish this task. The spiders are the search agents while the web is the search space of the optimisation problem. The Spiders' ability to differentiate between prey-produced vibrations from vibrations produced by other spiders with high a sense of accuracy is believed in this work to be as a result of the frequency of vibration (i.e. the amount of oscillation per unit time) of the web by the prey. As the trapped prey tries to escape, it vibrates the web more frequently at a fixed position than the spider while moving on the web. This is because the spiders are cautious while moving on the web so as to detect correctly when prey is caught on the web. This accuracy of detection is represented in this work as the difference in frequency composition of vibration (signal) of the prey to that of neighbouring spiders sensed by the spiders on the web threads (links). These signals are described by a function V which is the vibration cue as shown in Figure 1. ASSCO differs majorly from existing spider algorithm as it modeled the vibration cue V using a simplified wave transmission model with prey as a source of the wave, producing a signal that propagates through the web to the spiders as the search agents. This signal is characterised by the frequency composition of the wave. It also models a search pattern that is tuned by the position of the prey to locate the global optimum of the optimisation benchmark functions. This was done by positioning the prey at the optimum solutions of the benchmark functions and performing the search with respect to the position of individual spiders as well as that of the prey on the web.
The aim of using the wave theory is for ease of application to the real-world problems as computers also propagates signals and all wave signals as earlier stated can be represented by combination of sinusoids through Fourier transform. Accordingly, the search pattern was designed in this way so as to explore and exploit the search space. Exploration here refers to the ability of the search agent to search as much as possible a very wide area of the search space by exploiting (that is movement with respect to neighbouring spider's position on the web) the positions of the spiders and prey.
The proposed algorithm was tested for convergence using several standard unconstrained optimisation benchmark functions with diverse properties in other to be unbiased in the results obtained (Momin & Xin-She, 2013). Parameter sensitivity test was also carried out to select the best parameter value for the test. Unimodal functions were used to test for exploitation and  multimodal for exploration. A Wilcoxon rank sum test was also carried out on the results obtained to ascertain their statistical significance.
The results obtained showed that ASSCO was able to locate the best solutions for both unimodal and multimodal functions, which reveals a good exploration and exploitation capability of the ASSCO model.

Design of the objective function
As an optimisation problem, the objective function needs to be defined. The objective function of an optimisation problem consists of values that form the solution space of the optimisation problem. In this work it represents the ability of the spider to perform the task of prey capture maximally, therefore prey capture success is dependent on this function. In this research, the frequency of vibration (that is, the number of oscillations per unit time) is the factor that differentiates the spider's vibration from that of the prey, it enables a spider to react to the prey in a different way from a neighbouring spider on a web. Therefore, the frequency represented as f 1;t is proportional to the fitness value (solution quality) of the objective function to be optimised f x i;t À Á .
Hence, the frequency of vibration is represented as follows: Where: f x i;t À Á is the fitness value of the evaluated objective function with regards to the spider's position x i;t . Considering optimisation theory, the objective function is any of the standard benchmark functions used to validate global optimisation problems presented in Figures 2, 3 and 4. The variables f max and f min represents the maximum fitness and minimum fitness values of the entire population obtained by evaluating the objective function with regards to the spider's positions. These frequencies are defined also considering optimisation as: C is the proportionality constant defined as a small exponential decay function for the prey because the frequency fades or decreases with time (that is, the frequency at which the prey vibrates the web as soon as it is caught is at maximum and fades with time as it gets tired or gets incapacitated by the spider), and for the spider, the value increases as it approaches the prey and becomes equal to that of the prey (that is, the frequency of the spider increases as it approaches the prey and at the point of the global position which is the position of the prey, it equals the frequency of the prey. This is because at that point the spider in an attempt to incapacitate the prey vibrates the web more than when it moves cautiously to get the prey).

Information sharing between the spider and the prey on the web
Information is propagated through the web via vibrations. Therefore, this work modelled the information communication between the prey and the spider using wave theory. Vibration transmit information about the source of vibration such as frequency and position to the receiver or individual perceiving it. The vibration of the web by the prey and spiders was observed to be periodic and at a point source, likened to a sinusoidal wave (signal). Therefore, this is represented in this work as the displacement of a sinusoidal wave, another theory upon which this work is based. Hence, the vibration at source positions at amplitude A by individuals (spiders and prey) on the web V k¼1;...;n ; with n being the total number of individuals on the web is proportional to the displacement of a sinusoidal wave. It is represented as: Where α is a constant representing the unit time in seconds and k 2 i; p f g, with i denoting the spiders; p the prey and f k;t the frequency of vibration.
Furthermore, the individuals closer to the vibration source perceive a higher vibration than those located far away based on distance (the closer the more the effect of vibration felt because of attenuation). This means that the strength of vibration decreases with distance. To take care of the attenuation, the distance R i;j between the individual x i that perceive a vibration generated by an individual x j is represented by the Euclidean distance between them as; In this research, we assumed that the vibration generated by spiders can be felt by neighbouring spiders and that generated by the prey can be perceived by spiders only. This is to take care of exploration and exploitation of the search space to avoid premature convergence. Therefore, considering attenuation due to distance the vibration is further recalculated as follows: (i) Information communication (in form of vibration) between spiders on the web: The spider i can perceive the vibration generated by the spider j as follows: the vibration V i;j perceived by spider i at position ðx i Þ from spider j transmitting information to spider i at position ðx j Þ considering j as the individual closest to i and has a higher frequency Fbest than i ðthat is f j > f i Þ with displacement V j is given by: Where: R 2 i;j is the Euclidean distance between spider i and j (ii) Information communication (in form of vibrations) between the prey and spiders: The vibration V p;i perceived by the spiders i ¼ 1; 2; . . . n at positions x i21;2;...n with n being the spiders population, as a result of information transmitted by the prey p, with the prey having the best frequency Ftar in the entire population of spiders and preys with displacement V p is given by: Where: R p:i is the Euclidean distance between the prey p and spider i

Movement of the spider towards the prey
Once the spider perceives the vibration from the prey, it moves towards the prey to attack the prey. This movement is modelled considering how to do random walk in three ways to take care of exploration and exploitation search as follows: (ii) The movement of the spiders with regards to vibration perceived by neighbouring spiders: The spider also explores the search space by moving towards the nearest member V i;j , with the highest frequency Fbest in the entire spider population who therefore produce the highest vibration among the population of spiders but less or equal to that of the prey Ftar as: (ii) The movement of the spiders with regards to vibration perceived from the prey takes two forms: (a) The movement as the result of the closest spider to the prey which perceives the highest vibration from the prey and therefore moves first towards the prey who is the fittest in the entire population as: The spiders in the entire population also perform an exploitative change in position towards the prey as a result of vibration v p;i perceived from the prey as: This movement is further related based on the concept of random walk equation as the addition of equations 7, 8, 9 and the initial position x i to generate the new position x iþ1 as follows: where θ 1 represents the angle of deflection of the prey from the spider calculated as a rand 1; d ð ÞÀb with rand 1; d ð Þ representing random number drawn from the set 1; d ½ (with d representing the dimension of the search space) to control the randomness and step size, a; b 2 0:1; 0:5 f g

The optimisation solution search pattern
The position of the prey was fixed at the global optimum of the test functions to control the search pattern. The search is represented in form of an algorithm. It consists of the following phases: (i) The initialisation phase: at this phase, the population and positions of spiders were initialised randomly and preys position was fixed at the optimum solution of the fitness function. Each position of the spiders, a d-dimensional vector is the parameter values to be optimised and they are distributed randomly between the lower x l ð Þ bound and upper bound x u ð Þ of the optimisation fitness function represented by the following: Where rand 1; d ð Þ helps to distribute the positions randomly and d is the dimension of the search space defined in the problem.
The objective function is also defined and its solution space consists of the upper and the lower bound of the fitness function raise to the power of d. The initial fitness values (frequencies) are then calculated and the value with the highest frequency among the spiders stored as Fbest (best frequency) and that of the prey stored as Ftar (target frequency).
(ii) The iteration phase: in each iteration, all the spiders on the web are expected to change positions from their initial positions to a new position and the fitness function is evaluated at each iteration using equation 1. The vibration of every spider S i¼1;...n in the population is also evaluated using equation 3 to obtain the best vibration among the spiders with the

Evaluate the fitness of spiders and prey positions using the fitness functions
While not maximum iteration for i = 1:totspidn 5.3 Spider generates vibration with respect to their frequencies f i at time tAÃsin f i;t α 5.4 Neighbouring spiders receive this vibration with spider at position i closest to j, with i having a higher frequency Fbest than j as V i:j ¼ V j :e ÀR 2 i;j 5.5 Spider S performs random walk towards prey p as  position of the prey remaining constant as the prey does not change its position, it vibrates at a fixed point (the global optimum). This tunes the search pattern towards the global optimum. It proceeds as follows: The prey generate a vibration V P using equation 3 which is received by all the spiders on the web according to their various distances on the web as V P:i . The spiders upon receipt of the vibration move towards the prey but not directly. They also generate vibration V i using equation 3 in their various. The vibrations generated by the spiders are received by neighbouring spiders as V i:j . The spider S upon receipt of the vibration from neighbouring spider updates it's Fbest by selecting the strongest vibration from the neighbouring spider closest to it if this vibration is higher but not equal to V P:i . Else it maintains its Fbest. The spider then performs random walk towards the strongest vibration perceived using equation 10. This loops until the maximum iteration is reached.
(iii) The stopping phase: This can be defined as the maximum iteration number reached. At this stage, the algorithm outputs the best solution found at each iteration and the global best solution found for the function. The algorithm is as presented in Code Snippet 1.

Model validation
The model was validated through simulation in MATLAB for convergence using the fitness functions presented in Figures 5 and 6 to validate the exploration and exploitation capabilities of the algorithm in an unbiased way. The functions which are 25 in number were compiled from (Cuevas The mean optimum values of the functions are plotted with dot and the second-order polynomial regression curve is plotted with line as presented in Figure 5.
From Figure 5 it was observed from the fitness values obtained that ASSCO performs well for both unimodal and multimodal function for the values used, however best results were obtained when the amplitude of the preys vibration is at 4 and 5. This is believed to be as a result of the vibration of the prey being approximately equal to that of the spider when the amplitudes are approximately the same. Therefore, the values 5 and 4 were adopted at the amplitude of the spider and prey respectively to test the model for convergence.
Code Snippet 1: The Adaptive Social Spider Colony Optimisation Algorithm (2) Convergence test: The parameter settings in Table 1 and benchmark functions in Figures 2, 3 and 4, were used to test the model. Unimodal functions were used to test for exploitation and multimodal for exploration. It was discovered that ASSCO model was able to locate almost all the best solution of the functions in less than 200 iterations (that is shown when the value on the iteration axis is equal to zero) than SSO model. The results also showed that ASSCO was able to locate the best solutions for both unimodal and multimodal functions than SSO which reveals a good exploration and exploitation capability of the ASSCO model. Thus, ASSCO model has a better convergence, exploration and exploitation than the SSO model. The mean results obtained are as presented in Table 2 and some of the graphs in Figure 6.
(3) Wilcoxon Rank Sum Test Results: To confirm the significance of the results obtained in the convergence test for ASSCO and SSO values, a Wilcoxon rank sum test, a non-parametric statistical hypothesis test was also carried out on the values of the best solution obtained from each function using a 5% significant level, a null hypothesis H 0 : X = Y . Where X = ASSCO values and Y = SSO values and an alternate hypothesis which consider a significant difference between the values of X and Y (H 1 = Y > X). The P values obtained are as presented in Table 3.
The P values indicate that the results obtained from ASSCO are highly statistically significant since they are less than 5% (that is less than the significant level set).

Conclusion
In this paper, a bio-inspired optimisation model inspired by the foraging behaviour of a social spider was developed as global optimisation problem. This algorithm modelled this behaviour using optimisation and wave theories to optimize the objective function and vibration transmitted between the spiders and prey. The web served as the search space and the spiders the search agents of the optimisation problem. In order to build a self-evolving search pattern, the position of the prey was considered to be fixed at the global optimum of all the benchmark function to be optimised, while the spider positions were distributed randomly between the upper and lower bound of the search space. The spiders conduct themselves towards the prey guided by the vibrations of both the prey and individual neighbouring spiders. To explore the space the spiders move with respect to one another's position while also exploiting the position of the prey to locate the global optimum solution of the problem. This takes care of both exploration and exploitation and premature convergence. The proposed model was tested using 25 benchmark functions with diverse characteristics so as to be unbiased in the test for convergence and a Wilcoxon rank sum test was also conducted. Results obtained were compared to existing Social Spider Optimisation (SSO) by [3]. Results showed that the proposed model converged at less iteration than SSO while maintaining its explorative and exploitative capabilities. It was also able to locate the global optimum of both unimodal and multimodal function in fewer iterations.

Future recommendations
In future ASSCO search pattern can be improved by positioning preys not only at the global minimum but at local minimum points of the objective function for better tuning and to locate all minimum points of the test functions. This can also enhance the application of ASSCO to clustering considering these points as the cluster centroids. It can also be used to analyse signals for signal processing in information transmission in a communication network.