Adaptive Patterns for Intelligent Distributed ... - Semantic Scholar

2 downloads 0 Views 430KB Size Report
C. Pinciroli, V. Trianni, R. O'Grady, G. Pini, A. Brutschy, M. Brambilla, N. Mathews, E. Fer- rante, G. Di Caro, F. Ducatelle, T. Stirling, A. Gutirrez, L.M. Gambardella ...
Adaptive Patterns for Intelligent Distributed Systems: a Swarm robotics Case Study Mariachiara Puviani, Giacomo Cabri, Letizia Leonardi

Abstract Adaptation of intelligent distributed systems poses several challenges that deserve a different approach from the study of the adaptation of single components. There are some adaptive architectural patterns that can be applied to a system in order to let adaptive behaviours emerge. The research about these patterns is still in its early stage, but some evaluation is possible. To this purpose, in this paper we present a case study where a swarm of robots is required to coordinate and adapt to perform a task. We will present the results of several experiments performed with the ARGoS robot simulator and propose some critical considerations about them that will help to lay the path for further research about adaptive patterns in intelligent distributed systems.

1 Introduction Nowadays adaptation in intelligent distributed systems is an emerging research area. Adaptation, that is defined as the ability of a system to change its behaviour to dynamic operating conditions [7], is a very important aspect. Adaptation can occur autonomously or not: in the first case the system can be defined intelligent. Adaptation can be applied to intelligent distributed systems at two levels: at the level of a single component and at the level of a whole system. At the first mentioned Mariachiara Puviani DISMI - Universit`a degli Studi di Modena e Reggio Emilia, Via Amendola 2, Reggio Emilia, Italy e-mail: [email protected] Giacomo Cabri DII - Universit`a degli Studi di Modena e Reggio Emilia, Via Vignolese 905, Modena, Italy e-mail: [email protected] Letizia Leonardi DII - Universit`a degli Studi di Modena e Reggio Emilia, Via Vignolese 905, Modena, Italy e-mail: [email protected]

1

2

Mariachiara Puviani, Giacomo Cabri, Letizia Leonardi

level, adaptation occurs whenever components are able to automatically change their behaviour according to the changes in their context (e.g. internal state, environment, other components). At the second mentioned level, the entire system can exhibit adaptive capabilities, and in this case adaptation can be achieved in two different ways: the former way consists in explicitly programming each component to manage a specific portion of the global goal; while the latter way is based on the idea that multiple components driven by independent and even possibly conflicting rules must, as a whole, achieve a global goal through a new behaviour that the system will exhibit. The latter described adaptation is what happens in swarm robotics: each robot acts individually using local information. The global goal of the system is achieved by means of not only the behaviour of each single component, but also by means of the collective behaviour of all the components involved in the system. In this paper, we present swarm robotics’ simulations to show how adaptivity comes out in different situations, and to study which adaptive pattern can be useful in different situations. This evaluation helps us to understand how different patterns work and to decide which pattern is more useful. The paper is organised as follows: in Section 2 we introduce the idea of adaptive patterns for swarm robotics. Then, we present the case study in Section 3. The main contribution of the paper, the results of the simulations along with their explanation, is presented in Section 4. Finally, in Section 5 we conclude the paper and sketch possible directions for future work.

2 Adaptive architectural patterns for swarm robotics An adaptive architectural pattern1 is a conceptual scheme that describes a specific adaptation mechanism. It specifies how the component/system architecture can express adaptivity. When developing an intelligent distributed system that needs to be adaptive, the use of an appropriate pattern that will enact adaptivity will help developers in their work. The pattern permits to the developer to be guided to make the system exhibit a required behaviour, even when unexpected situations occur. Unfortunately, it is not always possible to immediately recognize which is the most appropriate pattern that the developers can use when building intelligent distributed systems. Thus, it is useful to have guidelines that explain the features of each patten, so the developers can choose the one they think is the most appropriate one for their needs. In order to verify if an adaptive pattern is the appropriate one for a specific system, we use a “black-box” approach: we implement the system considering when it needs to adapt and under which conditions it will adapt. In this way we can consider, for each case study, the tolerance under which the system can adapt itself during its execution in 1

In the following, we use the term pattern or adaptive pattern to mean always adaptive architectural pattern

Adaptive Patterns for Intelligent Distributed Systems: a Swarm robotics Case Study

3

order to continue to satisfy its goals and constraints. This tolerance describes an area where the system should remain to be considered adaptive. In [2], we proposed a preliminary list of patterns and offered examples for their use. In this paper, we proceed to understand whether exploiting a specific pattern can be useful to implement an intelligent distributed system. In our swarm robotics case study, starting from the work found in literature (e.g. [1] and [6]), we apply the pattern that in [2] we called “pattern based on swarm intelligence connected with the environment” (see Figure 1), which is considered the most appropriate one. In this pattern, as in the proposed case study, an explicit representation of the system goal is not possible: the collaborative and adaptive behaviour is exhibited only at runtime. The behaviour of each robot is explicit, but it is not explicit how they can behave altogether because the single components are not able to directly communicate one with the other, but an implicit communication is made using the environment that propagate the adaptation (i.e. stigmergy [3]).

Fig. 1 From [2]: “pattern based on swarm intelligence connected with the environment”

To study if this pattern is appropriate for swarm robotics systems, we present the case study implemented in simulation.

3 Adaptation in swarm robotics Swarm intelligence scenarios are an ideal starting point to understand how adaptation works in intelligent distributed systems. In swarm robotics, task allocation [4] is a well known problem, where the goal of each robot is to search for food items placed in an area, and bring them back to the nest (each robot can carry at most one item). Each robot has also the sub-goal of avoiding obstacles (e.g., walls, other robots or objects) on its way. Thus, each robot needs to change its route in order to avoid obstacles while adapting its behaviour to a diminishing number of available food items. The goal of the system is to increase the nest energy with food items. This energy tends to decrease during the simulation, due to the energy consumption of each

4

Mariachiara Puviani, Giacomo Cabri, Letizia Leonardi

robot. The main constraint of each robot is to avoid running out of batteries. Running outside the nest, robots are consuming energy taken from the nest itself. Each robot must save its energy in order to keep the whole system up and running.

4 Swarm robotics simulations In order to simulate the robot behaviour for our case study, we use ARGoS2 . ARGoS is a state-of-the-art, open source robot simulator focusing on the simulation of large heterogeneous robot swarms [5]. We define a simple arena where robots are free to move, and a nest positioned at the base of it (see Figure 2) from where the robots will start and hopefully come back. In the arena where the robots move, a set of food items is uniformly distributed (see Figure 2). For the purposes of our study, it was not necessary to deal with the complex manipulation that is required to move real objects. Instead, we modeled the objects as black dots on the ground. When a robot navigates upon a black dot, the dot is removed from the ground and the object is automatically assigned to the robot. The robots must bring the food to the nest (grey area of the arena), and there they can also recharge their batteries: when a robot has a food item or its battery level is low (under a certain threshold), it needs to go to the nest. To do that it uses its light sensors to identify the yellow lights that indicate the nest. While searching for food, robots use proximity sensors to avoid obstacles (and also other robots or walls), and ground sensors to recognize the food items.

Fig. 2 Our simulation arena: white floor, gray nest and black dots as food items.

Each robot, at each tick of the simulator clock, can be in one of the following states: 2

http://iridia.ulb.ac.be/argos/

Adaptive Patterns for Intelligent Distributed Systems: a Swarm robotics Case Study

5

• REST: the robot is in the nest to recharge its battery (and to leave a food item); • EXPLORE: the robot is out to search for food; • GO TO THE NEST: the robot needs to come back to the nest because it has to leave a food item, or because it needs to recharge its battery; • STOP - (out of energy): the robot stops because it is out of energy. Transitions among these states are probabilistically determined (see Figure 3). For example, when a robot is exploring, its probability to return to the nest (Pr) gradually increases because batteries are discharging. On the contrary, the probability to explore (Pe) increases if food is found and carried to the nest. It is not always possible for all the robots to explore. In particular, when the level of the nest energy is not enough to recharge all their batteries, the robot’s probability to explore decreases.

Fig. 3 State automata modeling robot behavior

Changes in probabilities (Pe and Pr) make the behaviour of each robot adapt according to the behaviour of all the other robots and to environmental changes (i.e. change in the number of food items, addition of obstacles and so on). Every robot, while behaves in order to satisfy its goal, changes its probabilities. The other robots, sensing the changes that are propagated in the environment, adapt their behaviour in their turn. Doing that they change probabilities again, and make the system to continuously adapt. Every time a robot finds an item, this is captured by the robot itself, and disappears from the arena. When the robot leaves it in the nest, a new food item appears into the arena (using a uniform distribution). The nest energy, that must be conserved as long as possible, has a starting value. Every time a food item reaches the nest, the energy is increased by a specific value that represents the energy contained in the food item (e.g. 500). So, the more food items are carried to the nest, the more the total level of energy is increased. On the other hand, every time a robot is running outside the nest, an amount of energy

6

Mariachiara Puviani, Giacomo Cabri, Letizia Leonardi

representing the battery consumption, is decreased from the nest energy: we set this energy consumption as 1 energy unit per second. When its battery level goes under a certain threshold, the robot decides to come back to the nest in order to avoid battery exhaustion. Once into the nest, robots automatically recharge their batteries if there is enough energy in the nest. Each robot in our simulation uses the “pattern based on swarm intelligence connected with the environment” presented in Section 2. In the following, we show how adaptation of the ensemble of robots works under different operational conditions, and if the chosen pattern is always suitable for the studied system.

4.1 Changing number of food items In this situation, we have a fixed number of robots (20) acting in the arena, and we set a variable number of food items (starting from 5 to 50 food items). We can observe the different behaviour of the system when we change the number of items: robots try to adapt their actions in order to avoid too long unfruitful explorations while trying to collect as much food as possible to increase the nest energy. Figure 4 shows simulation results, changing the number of food items in the arena. Specifically, Figure 4 (a) shows the number of walking robots (WR) in time, while Figure 4 (b) shows the number of collected food items (CF) in time. As expected, Figure 4 (a) shows that for the time from 0 to 750 sec, the behaviour of the system is quite the same for all the different scenarios: initially the robots are all out searching for food, and then they start to adapt to the environment. The robots stay out of the nest, looking for food, only if there is a large amount of food around, because their probability of finding food in a short time increases. In this situation, they are not losing energy and are motivated to resume exploring, after the pause in the nest, especially when the number of food items is higher than the number of robots. The chance of increasing the nest energy in this case is higher than the use of the energy itself. A robot can spend less than 50% of its energy to find the food and to return to the nest due to the large amount of food. Doing that, it increases the nest energy of more than what it spends. As an example, in this simulation the charged battery costs 1000 to the nest and each food item gives 500. When the food items present in the arena are more than 30, the average of battery consumption for each robot is 400, so there is a constant increase of energy (about 100). We can see another adaptive behaviour in the system when the number of food items is low (5 Food Items - FI - or 10 FI): robots stay out of the nest for long time because they are more than the number of items in the arena, so their probability to return to the nest (Pr) and stay there rapidly increases. Another expected result comes from the adaptation of the behaviour of every single robot: the number of collected items grows more rapidly when we have a higher availability of food in the arena (see Figure 4 (b)). That is because robots can quickly find food and their probability of staying out (Pe) for nothing decreases.

Adaptive Patterns for Intelligent Distributed Systems: a Swarm robotics Case Study

7

a)

b) Fig. 4 Walking robots (a) and overall collected food items (b), changing the number of food items; time on X axis.

As a summarizing consideration, in this situation the used adaptation pattern seems to be the appropriate one because the number of robots is fixed and the environment, that is the means of adaptation, is frequently changing, so it is the better way to propagate adaptation.

4.2 Changing obstacles In this situation, we show how the system of robots adapts in different environments, i.e. environments with different obstacle locations. The number of robots is fixed (10), as the number of food items (15). Figure 5 shows the three experimental settings we used: the first one with no obstacles, the second with a short wall in the middle of the arena, and the third one with a long wall.

8

Mariachiara Puviani, Giacomo Cabri, Letizia Leonardi

a)

b)

c)

Fig. 5 Simulation arenas. White floor, grey nest and food items represented as black dots.

a)

b) Fig. 6 Walking robots (a). Overall collected food items (b).

We can see from Figure 6 (a), that the number of walking robots is the same for the first part of the simulation (for around 700 sec). After that, the number of robots walking within the arena with a long obstacle sharply reduces. This happens because it is more difficult to find food and to come back to the nest, due to the

Adaptive Patterns for Intelligent Distributed Systems: a Swarm robotics Case Study

9

obstacle. So robots spend more energy to avoid the obstacle and the probability to stay in the nest (Pr) is higher. The same considerations can be done looking at the collected food (see Figure 6 (b)) in the three different settings. The number of food items that are brought to the nest is less when we have the long obstacle in the arena. It is interesting to observe that the number of items is larger (8 instead of 7) when there is the short obstacle in the arena, with respect to the case in which there is no obstacle at all. In fact, the short obstacle forced the robot to change their path to avoid it, and in this case, the change of path helps in finding the nest way or in finding a new food item. In this situation, we see that it can be useful also to consider a different pattern then the used one, for the scenario with the long obstacle in the arena. Here a direct communication between robots is more useful to map the environment and help robots in their task: the obstacle makes robots that do not know the environment, frequently change their direction. This makes the robots to consume battery and not to be sure to find food items. A possible adaptive pattern can be the one with a direct communication between robots - like negotiation, as the one of Figure 7. The possibility to communicate how the external environment is in a given time tick, helps robots to find new food items and to localise the nest.

Fig. 7 Pattern based on negotiation

5 Conclusions The swarm robotics case study presented in this paper allowed us to show that the behaviour of a system made of robots can be dynamically and autonomically adapted to different environmental conditions (e.g. obstacles, number of robots,

10

Mariachiara Puviani, Giacomo Cabri, Letizia Leonardi

number of food items in the arena), in order to reach a global goal, with a global emerging behaviour. Using an appropriate adaptive pattern makes it possible to obtain an intelligent adaptive system also starting from components that behave simply in a probabilistic way (like robots) and that have a little amount of information about the environment and others components. Starting from the different simulations of a given adaptive architectural pattern, the experience suggests that some adaptive patterns are more suitable than others to build a specific system because they better specify adaptation mechanisms for the involved components and for the whole system. We showed that the “pattern of swarm intelligence connected with the environment” was the most appropriate for this kind of systems, for the majority of the cases. We have also shown that for some specific situation (like the one of the last simulation), this adaptive pattern is not the best one, and it would be better to apply another one that better suits the adaptive situation. In this paper we shown how it is possible to evaluate system’s requirements in order to choose a pattern that better exploit adaptation. Choosing this pattern a developer can be helped in building an adaptive intelligent distributed system. Having the possibility of selecting the adaptive pattern that meets system’s requirements in the most appropriate way, allowed us not only to verify that the behaviour described in the selected pattern really comes out in concrete case studies, but also enables to introduce the concept of self-expression, as presented in [8]: sometimes it is possible that the starting adaptive pattern, which is the most appropriate one with the initial systems configuration, needs to be changed at runtime due to changes in the scenario. So, our future work will focus on enabling the selfexpression, i.e. the capability of changing the adaptive pattern when the change of situation may require it. Acknowledgements Work supported by the ASCENS project (EU FP7-FET, Contract No. 257414).

References 1. E. Bonabeau, M. Dorigo, and G. Theraulaz. Swarm intelligence: from natural to artificial systems. Oxford University Press, USA, 1999. 2. G. Cabri, M. Puviani, and F. Zambonelli. Towards a taxonomy of adaptive agent-based collaboration patterns for autonomic service ensembles. In Collaboration Technologies and Systems (CTS), 2011 International Conference on, pages 508–515. IEEE, 2011. 3. P.P. Grass´e. La reconstruction du nid et les coordinations interindividuelles chezbellicositermes natalensis etcubitermes sp. la th´eorie de la stigmergie: Essai d’interpr´etation du comportement des termites constructeurs. Insectes sociaux, 6(1):41–80, 1959. 4. M.J.B. Krieger and J.B. Billeter. The call of duty: Self-organised task allocation in a population of up to twelve mobile robots. Robotics and Autonomous Systems, 30(1):65–84, 2000. 5. C. Pinciroli, V. Trianni, R. O’Grady, G. Pini, A. Brutschy, M. Brambilla, N. Mathews, E. Ferrante, G. Di Caro, F. Ducatelle, T. Stirling, A. Gutirrez, L.M. Gambardella, and M. Dorigo. ARGoS: a modular, multi-engine simulator for heterogeneous swarm robotics. In Proceed-

Adaptive Patterns for Intelligent Distributed Systems: a Swarm robotics Case Study

11

ings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2011), pages 5027–5034. IEEE Computer Society Press, Los Alamitos, CA, September 2011. 6. E. Sahin, T.H. Labella, V. Trianni, J.L. Deneubourg, P. Rasse, D. Floreano, L. Gambardella, F. Mondada, S. Nolfi, and M. Dorigo. SWARM-BOT: Pattern formation in a swarm of selfassembling mobile robots. In Systems, Man and Cybernetics, 2002 IEEE International Conference on, pages 145–150, Hammamet, Tunisia, October 2003. IEEE. 7. D. Weyns and T. Holvoet. An architectural strategy for self-adapting systems. In Proceedings of the 2007 International Workshop on Software Engineering for Adaptive and Self-Managing Systems, page 3, Minnesota, USA, May 2007. IEEE Computer Society. 8. F. Zambonelli, N. Bicocchi, G. Cabri, L. Leonardi, and M. Puviani. On self-adaptation, selfexpression, and self-awareness in autonomic service component ensembles. In Self-Adaptive and Self-Organizing Systems Workshops (SASOW), 2011 Fifth IEEE Conference on, pages 108– 113. IEEE, 2011.