# 7.5. Application of thermal gradients

The ability to discriminate a local optimum (e.g. a temperature spot which is less than optimal, but closer to the optimum than its immediate vicinity) from the global optimum (e.g. an area with 36°C) is a well-established measure for the quality of search and optimization algorithms. These algorithms can be benchmarked by applying them to specifically tailored test problems which are best visualized as 3D-lanscapes in which the third dimension represents the quality to be optimized (e.g. temperature in the case of the thermal gradient).

The bee arena allows us to establish various forms of simple and complex thermal gradients to test the capability of the bees to find the temperature optimum. To study the success of the bees in local optimization tasks (Fig. 16):

1. Maintain a static thermal gradient while the bees roam the arena.

2. Determine the ratio of bees aggregated at the optimum (most likely the majority) to bees aggregated at one or more of the sub-optima.

3. Measure the success of the group by counting the number of bees ultimately aggregated in the optimum area or by taking the time it takes until a given number of bees find the optimum.

For temporal optimization tasks:

4. Create dynamically-changing gradients to test the dynamic components of the aggregation behaviour of the bees, e.g. by shifting the location of the global optimum or switching the location of the global and local optimum gradually (Fig. 17) or instantly.

5. Measure the latency between the optimum shift and the bees’ re-aggregation at the new optimum site (this latency also depends on group size).

Dynamic gradients are convenient to
test the ability of honey bees to revise a group decision and to react to
changes in the environment. Note that larger clusters tend to be more stable
and thus take longer to dissolve (Kernbach *et
al*., 2009).

*Fig. 15.*** **Temperature
distribution in the arena. The figure shows a heat map of the temperature
distribution as a false colour representation (** A**) and the corresponding
3D-representation (

**). The temperature optimum is located to the left, the pessimum to the right.**

*B*

*Fig. 16.*** **Assorted
optimization problems. The 3D-mesh depicts the temperature distribution in the
arena. The highest peak represents the temperature optimum. The bees' task is
to find the global optimum while avoiding getting stuck in local optima. The
image sequence shows tasks which increase in difficulty. They range from a
simple gradient with a single optimum area (** A**) via various gradients
with one or more local optima (

**) to the quite complicated Schwefel's problem (**

*B-D***).**

*E*

*Fig. 17.*** **Example of
a dynamic gradient. The experiment starts with a simple gradient with the
temperature optimum at the left (** A**). Once a deliberate ratio or number
of bees has aggregated in this area, the temperature of the optimum is
decreased while a new local optimum is generated at the opposite side of the
arena (

**). Subsequently, the former local optimum becomes the global (**

*B-D***) and ultimately the only optimum (**

*E***). After a certain delay, the aggregation at the left side will dissolve and reappear at the right side.**

*F*