Part I: 'waggle dance' and some interesting facts about the bee brain. (Part II will deal with examples of amazing cognitive performances of bees and other insects.)
Many people don't like insects, bees sting, ants bite, bugs stink, gnats drink our blood and wasps even claim a part from our sweet cake. :) I however admire these little creatures for their skills to defend themselves and be able to survive whatever the environmental conditions are.
Because of the limited amount of available time and the huge amount of interesting data I decided to write part I now and add part II as soon time allows. Enjoy reading now! :)
Insects are associated with many attributes ... but being intelligent is usually not one of them ...
At least nowadays more and more people are getting aware about how useful many insects are as pollinators of our fruit trees and as honey producers ('useful' in a sense to benefit our survival on the planet; considered from a less egocentric point of view every creature has its value, independent from its utility for us humans).
In addition in my opinion insects will be a precious food source of the future because of their huge biomass, their high protein content and proliferation rate and their low required space when farming them.
Obviously insects are associated with many different attributes ... but being intelligent is normally not one of them ...
I will show you by means of a few examples why I think that some insects are actually amazingly 'intelligent'. Of course I am aware that many of their behavioral patterns (even if fascinating) are innate and proceed instinctive, but there exist hints that insects actually show kind of conscious thinking and are even aware of themselves as single individuals. You don't believe me? This @jaki01 must be crazy (or has been stung be a really poisonous insect ...) - I am with you - but read yourself! :-)
Remark: I will restrict myself on examples of insects belonging to the order Hymenoptera (which contains for example ants, bees, bumblebees and wasps), because they are well known and also has been objects of many studies.
The waggle dance of the 'European honey bee'
As Jon Lieff describes within a beehive with the aid of pheromones the queen influences the choice of bees to either feed the larvae or work as foragers or scouts. The rather small group of scouts is busy with seeking new food resources (nectar, pollen, water). In case they found something they return to their hive and inform the other bees by using a 'dance language', the 'waggle dance', about the good news.
During this dance a bee walks on a straight line while waggling its abdomen (the waggle phase). At the end of the line it turns to the right and makes a semicircle back to the starting point (the return phase). Then comes a waggle phase again after which the bee turns to the left to circle back to the starting point. This can happen up to more than 100 times, whereby after every waggle phase the scout alternating turns to the right and then the left side again to begin its semicircles. Watched at it from above it looks like the figure eight.
Deciding for having any impact on the behavior of the other bees is that the dancers are emitting signals in the form of impulses of frequencies between 240 to 260 Hz. Beside these impulses, which are transmitted by the molecules of the air, also vibrations of the same frequencies are forwarded by the wax of the honeycombs.
This symbolic language contains the following information:
The distance between the hive and the food resource is specified by the duration of the waggle phase which is all the longer (because the bees waggle more intense) the further away the target is. The more excited the scout is about the newly discovered place the livelier it moves its abdomen and the more persistent it is dancing to gain the attention from other bees (if many scouts return at the same time there happens actually kind of a 'democratic' competition which one gets more followers).
The direction of the target is coded in the waggle dance as well: imagine a straight line between the hive and the sun. Then the angle between this line and the straight line walked during the waggle phase is also the angle in which foragers have to leave the hive in relation to the sun to reach the food resource.
This also works at cloudy weather, because the insects determine the position of the sun by the direction of polarization of the light. In the darkness of their hives, where in most cases horizontal dancing is not possible, dancing on an exactly vertical line would mean the food resource lies in the same direction as the sun, whereas deviations from this line show again the angle in which the direction to the target differs from the direction to the sun. And how can bees know where in the darkness is above? By means of gravity and the earth's magnetic field ...
Amazingly one can observe that scouts which stay in the nest for a longer timescale have the ability to adjust the angles of their dances according to the changing position of the sun.
Most of the time this waggle dance is used if any flowers are further than 100 meters away from the hive, otherwise the more simple 'round dance' is the means of choice.
The waggle dance is also used when bees are seeking new nest-site locations (which is even supposed to be the origin of this behavior).
The following drawings may hopefully lead to a better understanding of how the waggle dance is working:
As fascinating the waggle dance is, one cannot really speak of intelligent behavior here. It is about an innate instinctive activity, but you need to know about it to understand the following examples.
I recommend German speaking Steemians to read the very detailed description of the waggle dance by the famous bee researcher Prof. Dr. Randolf Menzel: "Was denken Bienen, wenn sie tanzen?"
Two solitary bees on Cirsium spec..
Some facts about the bee brain.
Bee brains belong to the biggest ones within the class of insects. 'Big' means that their volume amounts to roughly 1 mm3 (approximately the size of a sesame seed) containing about 960000 neurons (ant brains show similar sizes).
Beside the size related to the body mass (and amongst many other factors) the packing density of the nerve cells in the brain is relevant. It is especially high in the brains of birds (as flying animals they cannot afford to have very heavy brains), octopuses(!) and ... some insects like for example ants and bees. These animals reach that by using smaller neurons. Apart from more nerve cells per volume that also leads to a significantly increased processing speed of the brain (comparable with modern microprocessors whose speed is the result of extremely short data paths). The density of honey bee brains is about 10 times higher compared to mammal brains which means they are able to process 10 trillion computations per second.
One reason for the amazing cognitive performances of bees and other hymenoptera (I will deal with some examples in part II) can be found in a special
brain structure called mushroom bodies (MBs)
which contains nearly 200000 parallel neurons, the
They are segmented into several modules which allow multi-sensory input (olfactory, visual, mechanosensory, gustatory).
These different informations are allocated on and processed parallel by many different neurons within the mushroom bodies, but finally converge in a small number of output neurons.
This system of divergence and then multi-modal convergence helps the insects to integrate different kinds of information, interlink them and even draw logical conclusions (as we will see next time)., 
Some other interesting aspects I would like to mention:
Learning of bees seems to be coupled with emotions, similar like in our own case. Researches of Clint Perry and colleagues of the Queen Mary University of London showed that due to dopamine-dependent positive emotions bumblebees which received pretest sucrose were more motivated and 'optimistic' to check the edibility of the unknown content of a cylinder and also recovered faster from negative environmental cues like a simulated predator attack.
Because of the comparable low number of neurons single nerve cells can have a much higher impact on the behavior of the animal. In an interview Randolf Menzel goes so far to label certain neurons as 'individuals' respectively 'individual neurons' which by getting active all alone have the power to regulate a certain behavioral pattern, for example to make a bee remember a certain scent.
The plasticity of the bee brain is amazing. Some time ago scientists assumed that organisms with such a low number of nerve cells should be 'hardwired' - once connected, neurons would stay like that, unable to react on environmental changes and learning new things. However neuroplastic changes have been observed for specific dendritic spine activity in the mushroom bodies during learning.
Finally also acetylation of histones, and methylation of DNA are used in learning and memory consolidation like mammals do (same source).
Photos are own work where not otherwise stated.