Embedding Swarm Intelligence in Internet of Things Networks: A Social Insect Approach

This paper introduces a framework for embedding intelligence in the Internet of Things (IoT) networks. The framework draws upon agent-based modeling, swarm intelligence, social insect behavior, and evolutionary adaptation. The key principles for each of these areas are first discussed. These concepts are then discussed from an IoTs perspective. The resulting capabilities and potential of embedding this type of intelligence are outlined.


INTRODUCTION
An approach to developing distributed solutions for problems is to take an approach based on Complex Adaptive Systems (CAS). CAS are dynamic systems that adapt to an environment and evolve as necessary when conditions in the environment change [1]. This adaptation and evolution are within the context of all other parts of the environment, an ecosystem. Adaptation occurs in concert with other related systems. In this sense, this is coevolution. A key aspect of CAS is that understanding the individual systems alone does not provide an understanding of the whole's systems behavior. The whole system is more than the sum of its parts.
One area of study in CAS is swarmed intelligence. Swarm intelligence is biologically motivated by the study of social insects, flocks of birds, herds, and pedestrians. Colonies of social insects (bees, ants, wasps) achieve adaptive, sustainable, reliable, intelligent complex systemlevel performance without central control [2]. The interesting thing about this is that the performance is derived from the interaction of individual insects which are unreliable and unintelligent. These algorithms have been found to address complex problems that were difficult before or required faster completion time.
Swarm intelligence relies on individual elements with decision making and action capabilities. It is then logical to examine the role of agent-based modeling in swarm intelligence applications by treating each social insect as an agent. Agent-based modeling (ABM) is based on developing computational solutions through a configuration of agents interacting with each other [3]. ABM provides a framework for examining the interactions of artificial agents in a simulated environment. This can lead to an understanding of how agent-based outcomes can occur in a real setting. Agents typically have decision-making procedures as well as a set of possible actions to take based on the decisions made.
The introduction of the Internet of Things (IoT) concept provides a local/global perspective of internetconnected things. This is local in the sense that each thing has a local role. Global in the sense that the combined actions of things can result in global outcomes. IoT is a system of interrelated computing and mechanical devices [4]. The devices can interact over a network with or without involving human interaction. IoT now includes technologies such as real-time analytics, machine learning, and embedded systems including sensors, sensor networks, home, and building automation. We first identify the relevant background in SI and ABM. We then determine the underlying framework and conditions for implementing SI, in general, using agentbased modeling. We provide a system architecture for utilizing SI in the IoT ecosystem.

SWARM INTELLIGENCE, ABM, IoT
Swarm Intelligence (SI), Agent-Based Modeling (ABM), and IoT have been increasingly explored as methodologies to solve complex problems or to more efficiently solve problems. The problems range from communications networks to vehicle routing to business problems. In this section, we will discuss the background in these areas and related research.

SI for Optimization and decision making
One of the key areas of application of SI is in optimization. As a consequence, SI has been applied to routing problems in communications networks [5], [6]. It has been proposed for vehicle routing [7] and general traffic routing including pedestrian traffic [8]. Prominent among the optimization algorithms are Ant Colony Optimization (ACO), Particle Swarm Optimization (PSO), and Artificial Bee Colony Optimization (ABCO) [8]. These have been used for a single objective and multi-objective problems.
It is the nature of SI that decision making is distributed [9]. This distributed decision-making leads from a simple task to a complex or larger task. The interactions between the swarm members and between swarm members and the environment are under decentralized control. These interactions lead to selforganization that results in emergent behavior from the swarm. A distributed form of decision-making results in a system that is more efficient, effective, and scalable than a centralized control form [10]. There are a variety of SI algorithms focused on providing faster and more robust solutions to solve complex problems. Each of the algorithms is better suited for different classes of problems [10].

Agent-Based Modeling
Agent-Based Modeling (ABM) is a modeling methodology based on a network of agents. The agents are autonomous. Each agent has a set of rules (decision making), attributes, and behavioral responses to the environment including other agents. It is a bottom-up method of modeling. In this regard, ABM can have a role in investigating SI.
Additionally, agent-based learning can enable agents to adapt to changes in the environment. Internal changes are made which results in changing behavioral responses. Agents can have learning capabilities that allow them to adapt to changes in the system, altering the internal attributes and the behaviors towards other agents. In this regard, ABM is useful for modeling complex adaptive systems that require computational complexity not feasible with other approaches [11].
ABM has been explored for applications in ecology, biology, telecommunications, and traffic management. For IoT, ABM has been applied to distributed decision making in IoT networks for road traffic management [11.

IoT
Since its inception, IoT has received a lot of research interest in terms of application areas, system architectures, and theory [12]. Most of the research has been on the communication aspects of IoT devices [12]. However, there is a need for cognitive, agent-based computing frameworks [13]. Toward that end, research has been conducted in developing Smart IoT. Smart IoT is defined as an ecosystem that supports making sense of all the IoT data and information [14]. Semantic, Cognitive, and Perceptual Computing have been introduced to deal with the challenges of providing Smart IoT [15]. The characteristics of Smart IoT are: • Heterogeneity of devices • Incompleteness in covering the environment such sensors not reaching all areas.
• Uncertainty-distributed networks can have issues with veracity • Dynamism-IoT devices are constantly impacted by the environment.
We discuss addressing the IoT with embedded intelligence in the rest of the paper.

Achieving SI in IoT
As discussed before Swarm Intelligence (SI) is the collective behavior of a system of interacting agents. It is a self-organized and decentralized system based on intelligence in the agents. In this section, we will identify the underlying requirements for achieving swarm intelligence. We first present two popular, biologically inspired, swarm intelligence algorithms [16]. We then identify the key aspects that result in swarm intelligence. The pheromone is a volatile chemical that is dispensed by ants as they go about their tasks. The volatility of the pheromone plays an important signaling role that enables ants to achieve their outcomes. To a certain extent, ants move on a probabilistic basis. While an initial ant may have a long route from the food source to the nest, over time the path gets adjusted based on the strength of the pheromone and probabilistic action(direction) to take. Additionally, individual ants adapt their activity based on changes in the environment and interactions with other ants. For instance, ants switch from foraging to food retrieval or vice versa based on encounters with other ants and the current task they are carrying out. While an individual ant does not have intelligence, the colony can find the shortest path to their food or place the ant cemetery equidistant from the nest and the trash pile. Ant Colony Optimization (ACO) is based on path optimization in finding the shortest route to the food source.

Ant Colony and Bee Colony Optimization
Bee Colony Optimization (BCO) is based on the idea that bees divide their tasks (work) among other bees. The tasks include foraging, storage, honey production, pollen collection, retrieving, and communication. Bees are capable of organizing the work of the colony to adapt to changes in the environment such as cooling the hive when the temperature rises above a certain point. Bees are good at organizing their colonies [17]. Like the ACO, the BCO algorithm is comprised of the following: • Bees divide into groups based on tasks • Unassigned bees scout for a food source • Food source detected is communicated to bees who begin collecting nectar by randomly going from one flower to another • Bees find the shortest path to the food source from the hive. • Bees communicate the path to other bees by signaling (waggle dance). • Bees collect nectar and return to the hive and store nectar. These algorithms capture key aspects of Swarm Intelligence: communication, locally controlled actions, probabilistic decision making, and emergent behavior resulting from mass interactions. The next section identifies the underlying requirements for achieving outcomes via Swarm Intelligence.

Requirements for SI
The underlying requirements for achieving outcomes via Swarm Intelligence are based on the study of ants and bees in the natural world [18]. Before we introduce the requirements, we want to address several assumptions that are made regarding swarms. A collective swarm system is made up of relatively stupid elements without a single intelligent controller. The behavior of the swarm emerges in a bottom-up manner not top-down. The system is adaptive between elements and the environment. The system self organizes, again without a master controller. Adaptive behavior occurs over time and a successful system becomes more intelligent over time. Finally, the more interactions between elements of the system the more reliable the behavior and the margin of error decrease.
The fundamental principles [18] that lead to macrointelligence and adaptability are: • In this section, we identified the underlying principles for achieving SI. These are used as the requirements for a system architecture designed to provide Swarm Intelligence in an IoT network. The next section discusses the overview of the elements of the SI IoT architecture.

Toward an SI IoT architecture
Applying SI to IoT needs to consider that a SI will be applied in the human context. The first step toward this is to take into account the differences between natural systems such as ants and man-made systems such as IoT [21]. Additionally, man-made systems are intentionally designed and created. One key difference is the proximity aspect of a swarm. Physical proximity, a requirement in swarms, is not always possible nor always desired in manmade systems. However, the notion of proximity can be implemented through modes of communication. This can result in the self-organization of connected agents. Another difference is that the agents in the man-made systems are directly programmable while swarm agents require evolutionary changes over time. Since man-made systems do not evolve naturally, conscious implementation of SI needs to occur with specific goals as outcomes. This leads to a hierarchical organization. In the natural world, this occurs by changes in the system state that triggers swarm activity. Such as when the queen moves from one nest to a larger next.
Three schools of thought can be found in the literature on implementing SI in man-made systems. Each focus on SI from a specific angle [21]: 1. Algorithmic school: This approach addresses the development and application of SI inspired mathematical algorithms to resolve computational problems.

Organizational school:
This group investigates how SI principles can be applied in the design of processes and structures where the swarm's agents are people.

Automation school:
Here they consider automated devices such as robots, computers, or software as the agents. The objective is the application of SI principles to improve the execution of specific tasks, often employing the algorithms developed by the first school. The architecture we propose here follows the third school with the development of a man-made autonomous system. This system can identify, compose, and select from among alternative courses of action to accomplish goals. The state of the agent, the environments, and its local memory are used in this regard to adapt and at times deal with unplanned situations.
As discussed before there are advantages in using SI principles in the design of man-made autonomous systems [21], including: • Parallelism-tasks can be decomposed and performed in parallel, • Efficiency-tasks can be decomposed so that different agents of the system can cooperatively achieve a better end-result than individuals. • Fault tolerance-an individual agent does not necessarily affect achieving a given task.
In general, there is a lack architectural knowledge of IoT focused approaches [22]. The potential for providing an IoT platform that results in smarter devices, intelligent ongoing processing, and communication has motivated recent research into deriving IoT architectures. An IoT system can be defined to be based on a number of functional blocks that facilitate various system functions such as sensing, identification, actuation, communication, and management [22].
These functional blocks are: These functional components can be characterized as being centralized systems-oriented based on wellestablished networking protocols. While these functional operations will need to be addressed, in this research we focus on the architectural requirements for deriving intelligent systems.
The underlying swarm intelligence aspects that are the drivers for an SI IoT system [23] are: • Cooperation: agents cooperate so that nondeterministic, complex, collective behavior emerges to solve complex problems. A four-level architecture based on Swarm Intelligence was proposed for achieving Smart Cities [25]. They define a smart city as a whole system composed of several sub-systems where each sub-system is composed of a set of applications and each application is a swarm of entities (sensors and actuators). The smart city entities need or provide resources to other entities from the same or different groups. Thus, the four levels are system, subsystem, application, and sensor/actuators. This system shows promise in addressing the underlying swarm intelligence principles.
The architecture framework we explore here is more general in nature. We envision that there are four layers in the architecture similar to [25]. First, there is a cognitive layer that addresses the key features of SI. The next layer is that of communication which is based on channels of communication for the system. The channels must be robust enough that "messages" are able to reach the intended recipients similar to how the internet network protocols work. The third layer is the search space. This is the agent level in the system. Additionally, the identity of each agent must be discernable and each agent's status and other information can be queried. This requires that each agent (or the system) maintains agent-based information. This localization of information occurs at the agent level. The fourth layer is the sensor/actuator layer. This addresses the fact that not all devices are agents. Figure 1 provides an overview of the system. layer as well as obtain and provide device and system information. Several channels of communication are used to compartmentalize the different types of communication such as goal setting, device status, programming instructions, and task assignment. This layer provides communication in both directions. A key channel is this level is a stigmergy channel [26]. Stigmergy is a mechanism for indirect communication between agents or actions. The idea is that an agent leaves a trace in the environment (the search space) that affects succeeding actions or agents. This can result in reinforcing system behavior that has evolved. Stigmergy supports selforganization resulting in complex forms without planning, control, or direct communication between agents. It supports collaboration between simple agents that have little intelligence, memory, or awareness of other agents.
The next level is the search space. This can be a physical space such as agents (cell phones) moving through the city or a virtual space such as communities of shared interest via the internet even though the individuals may be geographically separated. Individuals can be devices or people. Since agents can have local decision making based on interactions or stigmergy information, capabilities such as adaptability, parallel activity, selforganizing, and perception are available to the agents. By examining activities at this level, the system can adapt accordingly. For instance, the system can determine that traffic is backing up and reroutes automobiles. This type of information is already available in mapping applications that display the level of traffic. Drivers then may take appropriate action. In some cases, the applications provide updated directions in real-time based on conditions. Similarly, this occurs on the internet when internet messages are rerouted based on the current state of the outgoing network paths.
The sensor/actuator layer deals with signals. The focus of these devices is primarily to provide raw data and carry out actions. At the same time, it is possible that a device can be a combination of agent and sensor/actuator technology. For instance, a security camera may contain processing that can determine that the actions of a person are suspicious and take a picture or send an alert. A simple form of this is outdoor lights that contain a motion sensor. An additional aspect to this level is that the devices individually or in combination can perceive. This type of perception is specific to the devices and based on the environment. This is similar to how an ant determines that it is the type to change the current task from foraging to exploring as the food source is getting depleted or how sensors in a stream can detect chemical runoff in combination as well as to detect the source.

CONCLUSION
In this paper, we examined the role of Swarm Intelligence in the IoT. The specific aspects of SI are inspired by the study of social insects such as ants, termites, and bees. We emphasized that SI principles and underlying characteristics can have a strong role in developing SI IoT systems. While there has been significant and interesting research in the application of SI to IoT, to a certain extent the research has been focused on specific applications. The goal of this study is to broaden the focus and understand the overall framework for SI embedded IoT. We propose an architecture for integrating Si-based algorithms in IoT-based systems. At the same time, we chose to keep the study general and did not examine specific technical aspects such as communications protocols, network interfaces, or the OSI model. As future work, we plan to explore the implementation of the fourlevel architecture.